Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
5aecd54
Updated versions
fybJenkins Mar 12, 2025
40ee7c7
Add changes
github-actions[bot] Mar 12, 2025
bc24c9d
Merge pull request #73 from phoenixnap/release/v3.0.1
valerioponte Mar 12, 2025
7a994d7
Add changes
github-actions[bot] Mar 12, 2025
bc09e19
Add changes
github-actions[bot] Mar 12, 2025
e5b6ff6
Add changes
github-actions[bot] Mar 13, 2025
dce60f0
Add changes
github-actions[bot] Apr 7, 2025
a14d9c4
Add changes
github-actions[bot] Apr 9, 2025
9e8221c
updated ubuntu version
fybJenkins Mar 23, 2026
2159667
Add changes
github-actions[bot] Mar 23, 2026
0f27ede
updated generator version
fybJenkins Mar 23, 2026
5e5f78f
Merge branch 'develop' of github.com:phoenixnap/python-sdk-bmc into d…
fybJenkins Mar 23, 2026
e62e83f
Add changes
github-actions[bot] Mar 23, 2026
27c878c
updated versions
fybJenkins Mar 23, 2026
6d87958
changing default python
fybJenkins Mar 23, 2026
17b10a4
updated templates
fybJenkins Mar 23, 2026
beaddfa
Add changes
github-actions[bot] Mar 23, 2026
04b61db
removing repository property
fybJenkins Mar 23, 2026
8c2c2f0
Add changes
github-actions[bot] Mar 23, 2026
f0cbd1c
removed close method to test generation
fybJenkins Mar 23, 2026
09c0305
Merge branch 'develop' of github.com:phoenixnap/python-sdk-bmc into d…
fybJenkins Mar 23, 2026
ca90ba6
Add changes
github-actions[bot] Mar 23, 2026
d03a8db
removed all close method usages
fybJenkins Mar 23, 2026
17f2347
Merge branch 'develop' of github.com:phoenixnap/python-sdk-bmc into d…
fybJenkins Mar 23, 2026
9ae1af4
updated versions
fybJenkins Mar 24, 2026
07bc934
Add changes
github-actions[bot] Mar 24, 2026
3a54637
regex fix and payload amendments: bmc-api
fybJenkins Mar 25, 2026
245b266
fixed network api tests
fybJenkins Mar 25, 2026
362e5c9
resolved location api test issues
fybJenkins Mar 25, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/workflows/_common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:
jobs:
lint:
name: Lint ${{ inputs.package-name }}
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/workflows/composite/lint-sdk
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/_generate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:
jobs:
generate:
name: Generate ${{ inputs.package-name }}
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/workflows/composite/generate-sdk
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ on:
jobs:
publish-python-packages:
name: Publish ${{ inputs.package_to_publish }} to PyPI
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ on:
jobs:
test:
name: Test ${{ inputs.package-name }} py v ${{ matrix.python-version }}
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
services:
mockserver:
image: mockserver/mockserver:5.15.0
Expand All @@ -28,7 +28,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [ '3.7', '3.12' ]
python-version: [ '3.10', '3.14' ]
steps:
- uses: actions/checkout@v3
- uses: ./.github/workflows/composite/test-sdk
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/composite/setup-python/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ inputs:
python-version:
description: 'Version of Python to setup.'
required: false
default: '3.7'
default: '3.10'
runs:
using: "composite"
steps:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/generate-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
prerequisite:
name: Prerequisite for Generation
if: github.ref == 'refs/heads/develop' || startsWith(github.ref, 'refs/heads/feature')
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- name: Prerequisite
run: |
Expand Down Expand Up @@ -86,7 +86,7 @@ jobs:
# Push generated code
push-changes:
name: Push Changes
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
needs:
- generate-bmcapi
- generate-ranchersolutionapi
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/validate-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ jobs:
- build-and-test-invoicingapi
- build-and-test-paymentsapi
- run-generic-tests
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
if: always()
steps:
- name: Download Artifacts
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Test Results/
**/test-reports/
__pycache__
*.egg-info
*.egg-info
.venv/
2 changes: 1 addition & 1 deletion openapitools.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"$schema": "node_modules/@openapitools/openapi-generator-cli/config.schema.json",
"spaces": 2,
"generator-cli": {
"version": "7.2.0"
"version": "7.20.0"
}
}
17 changes: 12 additions & 5 deletions pnap_audit_api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ Knowledge base articles to help you can be found
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:

- API version: 1.0
- Package version: 2.0.4
- Package version: 2.0.5
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
For more information, please visit [https://phoenixnap.com/](https://phoenixnap.com/)

## Requirements.

Python 3.7+
Python 3.9+

## Installation & Usage
### pip install
Expand Down Expand Up @@ -48,9 +48,16 @@ Then import the package:
import pnap_audit_api
```

### Tests

Execute `pytest` to run the tests.

## Getting Started

Please follow the [installation procedure](#installation--usage) and then run the following:

```python

import time
import pnap_audit_api
from pnap_audit_api.rest import ApiException
from pprint import pprint
Expand All @@ -76,7 +83,7 @@ with pnap_audit_api.ApiClient(configuration) as api_client:
var_from = '2021-04-27T16:24:57.123Z' # datetime | From the date and time (inclusive) to filter event log records by. (optional)
to = '2021-04-29T16:24:57.123Z' # datetime | To the date and time (inclusive) to filter event log records by. (optional)
limit = 10 # int | Limit the number of records returned. (optional)
order = 'ASC' # str | Ordering of the event's time. SortBy can be introduced later on. (optional) (default to 'ASC')
order = ASC # str | Ordering of the event's time. SortBy can be introduced later on. (optional) (default to ASC)
username = 'johnd@phoenixnap.com' # str | The username that did the actions. (optional)
verb = 'verb_example' # str | The HTTP verb corresponding to the action. (optional)
uri = '/ams/v1/clients/12345' # str | The request uri. (optional)
Expand Down Expand Up @@ -107,6 +114,7 @@ keycloakOpenId = KeycloakOpenID(server_url=serverUrl,
client_secret_key=clientSecret)

ACCESS_TOKEN = keycloakOpenId.token(grant_type=grantType)['access_token']
```


## Documentation for API Endpoints
Expand Down Expand Up @@ -143,4 +151,3 @@ Authentication schemes defined for the API:
## Author

support@phoenixnap.com

4 changes: 2 additions & 2 deletions pnap_audit_api/docs/Error.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ json = "{}"
# create an instance of Error from a JSON string
error_instance = Error.from_json(json)
# print the JSON string representation of the object
print Error.to_json()
print(Error.to_json())

# convert the object into a dict
error_dict = error_instance.to_dict()
# create an instance of Error from a dict
error_form_dict = error.from_dict(error_dict)
error_from_dict = Error.from_dict(error_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

Expand Down
4 changes: 2 additions & 2 deletions pnap_audit_api/docs/Event.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ json = "{}"
# create an instance of Event from a JSON string
event_instance = Event.from_json(json)
# print the JSON string representation of the object
print Event.to_json()
print(Event.to_json())

# convert the object into a dict
event_dict = event_instance.to_dict()
# create an instance of Event from a dict
event_form_dict = event.from_dict(event_dict)
event_from_dict = Event.from_dict(event_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

Expand Down
6 changes: 2 additions & 4 deletions pnap_audit_api/docs/EventsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ Retrieves the event logs for given time period. All date & times are in UTC.
* OAuth Authentication (OAuth2):

```python
import time
import os
import pnap_audit_api
from pnap_audit_api.models.event import Event
from pnap_audit_api.rest import ApiException
Expand All @@ -46,7 +44,7 @@ with pnap_audit_api.ApiClient(configuration) as api_client:
var_from = '2021-04-27T16:24:57.123Z' # datetime | From the date and time (inclusive) to filter event log records by. (optional)
to = '2021-04-29T16:24:57.123Z' # datetime | To the date and time (inclusive) to filter event log records by. (optional)
limit = 10 # int | Limit the number of records returned. (optional)
order = 'ASC' # str | Ordering of the event's time. SortBy can be introduced later on. (optional) (default to 'ASC')
order = ASC # str | Ordering of the event's time. SortBy can be introduced later on. (optional) (default to ASC)
username = 'johnd@phoenixnap.com' # str | The username that did the actions. (optional)
verb = 'verb_example' # str | The HTTP verb corresponding to the action. (optional)
uri = '/ams/v1/clients/12345' # str | The request uri. (optional)
Expand All @@ -70,7 +68,7 @@ Name | Type | Description | Notes
**var_from** | **datetime**| From the date and time (inclusive) to filter event log records by. | [optional]
**to** | **datetime**| To the date and time (inclusive) to filter event log records by. | [optional]
**limit** | **int**| Limit the number of records returned. | [optional]
**order** | **str**| Ordering of the event's time. SortBy can be introduced later on. | [optional] [default to 'ASC']
**order** | **str**| Ordering of the event's time. SortBy can be introduced later on. | [optional] [default to ASC]
**username** | **str**| The username that did the actions. | [optional]
**verb** | **str**| The HTTP verb corresponding to the action. | [optional]
**uri** | **str**| The request uri. | [optional]
Expand Down
4 changes: 2 additions & 2 deletions pnap_audit_api/docs/UserInfo.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ json = "{}"
# create an instance of UserInfo from a JSON string
user_info_instance = UserInfo.from_json(json)
# print the JSON string representation of the object
print UserInfo.to_json()
print(UserInfo.to_json())

# convert the object into a dict
user_info_dict = user_info_instance.to_dict()
# create an instance of UserInfo from a dict
user_info_form_dict = user_info.from_dict(user_info_dict)
user_info_from_dict = UserInfo.from_dict(user_info_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

Expand Down
46 changes: 32 additions & 14 deletions pnap_audit_api/pnap_audit_api/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,41 @@
""" # noqa: E501


__version__ = "2.0.4"
__version__ = "2.0.5"

# Define package exports
__all__ = [
"EventsApi",
"ApiResponse",
"ApiClient",
"Configuration",
"OpenApiException",
"ApiTypeError",
"ApiValueError",
"ApiKeyError",
"ApiAttributeError",
"ApiException",
"Error",
"Event",
"UserInfo",
]

# import apis into sdk package
from pnap_audit_api.api.events_api import EventsApi
from pnap_audit_api.api.events_api import EventsApi as EventsApi

# import ApiClient
from pnap_audit_api.api_response import ApiResponse
from pnap_audit_api.api_client import ApiClient
from pnap_audit_api.configuration import Configuration
from pnap_audit_api.exceptions import OpenApiException
from pnap_audit_api.exceptions import ApiTypeError
from pnap_audit_api.exceptions import ApiValueError
from pnap_audit_api.exceptions import ApiKeyError
from pnap_audit_api.exceptions import ApiAttributeError
from pnap_audit_api.exceptions import ApiException
from pnap_audit_api.api_response import ApiResponse as ApiResponse
from pnap_audit_api.api_client import ApiClient as ApiClient
from pnap_audit_api.configuration import Configuration as Configuration
from pnap_audit_api.exceptions import OpenApiException as OpenApiException
from pnap_audit_api.exceptions import ApiTypeError as ApiTypeError
from pnap_audit_api.exceptions import ApiValueError as ApiValueError
from pnap_audit_api.exceptions import ApiKeyError as ApiKeyError
from pnap_audit_api.exceptions import ApiAttributeError as ApiAttributeError
from pnap_audit_api.exceptions import ApiException as ApiException

# import models into sdk package
from pnap_audit_api.models.error import Error
from pnap_audit_api.models.event import Event
from pnap_audit_api.models.user_info import UserInfo
from pnap_audit_api.models.error import Error as Error
from pnap_audit_api.models.event import Event as Event
from pnap_audit_api.models.user_info import UserInfo as UserInfo

39 changes: 15 additions & 24 deletions pnap_audit_api/pnap_audit_api/api/events_api.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# coding: utf-8

"""
Audit Log API

Expand All @@ -13,28 +11,18 @@
""" # noqa: E501


import io
import warnings

from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
from typing import Dict, List, Optional, Tuple, Union, Any

try:
from typing import Annotated
except ImportError:
from typing_extensions import Annotated

from pydantic import Field
from typing import Any, Dict, List, Optional, Tuple, Union
from typing_extensions import Annotated
from datetime import datetime

from pydantic import StrictInt, StrictStr, field_validator

from datetime import datetime
from pydantic import Field, StrictInt, StrictStr, field_validator
from typing import List, Optional

from typing_extensions import Annotated
from pnap_audit_api.models.event import Event

from pnap_audit_api.api_client import ApiClient
from pnap_audit_api.api_client import ApiClient, RequestSerialized
from pnap_audit_api.api_response import ApiResponse
from pnap_audit_api.rest import RESTResponseType

Expand Down Expand Up @@ -349,7 +337,7 @@ def _events_get_serialize(
_content_type,
_headers,
_host_index,
) -> Tuple:
) -> RequestSerialized:

_host = None

Expand All @@ -360,7 +348,9 @@ def _events_get_serialize(
_query_params: List[Tuple[str, str]] = []
_header_params: Dict[str, Optional[str]] = _headers or {}
_form_params: List[Tuple[str, str]] = []
_files: Dict[str, str] = {}
_files: Dict[
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
] = {}
_body_params: Optional[bytes] = None

# process the path parameters
Expand Down Expand Up @@ -417,11 +407,12 @@ def _events_get_serialize(


# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
[
'application/json'
]
)
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
'application/json'
]
)


# authentication setting
Expand Down
Loading
Loading