Skip to content

Commit

Permalink
Merge branch 'feature/open-api-generator' of https://github.com/phoen…
Browse files Browse the repository at this point in the history
…ixnap/python-sdk-bmc into feature/open-api-generator
  • Loading branch information
sokoli1 committed Jan 30, 2024
2 parents 4f36b80 + 8979985 commit ae600cc
Show file tree
Hide file tree
Showing 8 changed files with 144 additions and 8 deletions.
19 changes: 18 additions & 1 deletion pnap_audit_api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,24 @@ with pnap_audit_api.ApiClient(configuration) as api_client:

```

To generate a token using the [python-keycloak](https://pypi.org/project/python-keycloak/) library:
```python
from keycloak import KeycloakOpenID

clientId = "YOUR_CLIENT_ID"
clientSecret = "YOUR_CLIENT_SECRET"
serverUrl = "https://auth.phoenixnap.com/auth/"
realmName = "BMC"
grantType = "client_credentials"

keycloakOpenId = KeycloakOpenID(server_url=serverUrl,
realm_name=realmName,
client_id=clientId,
client_secret_key=clientSecret)

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


## Documentation for API Endpoints

All URIs are relative to *https://api.phoenixnap.com/audit/v1*
Expand Down Expand Up @@ -123,4 +141,3 @@ Authentication schemes defined for the API:
## Author

support@phoenixnap.com

19 changes: 18 additions & 1 deletion pnap_bmc_api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,24 @@ with pnap_bmc_api.ApiClient(configuration) as api_client:

```

To generate a token using the [python-keycloak](https://pypi.org/project/python-keycloak/) library:
```python
from keycloak import KeycloakOpenID

clientId = "YOUR_CLIENT_ID"
clientSecret = "YOUR_CLIENT_SECRET"
serverUrl = "https://auth.phoenixnap.com/auth/"
realmName = "BMC"
grantType = "client_credentials"

keycloakOpenId = KeycloakOpenID(server_url=serverUrl,
realm_name=realmName,
client_id=clientId,
client_secret_key=clientSecret)

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


## Documentation for API Endpoints

All URIs are relative to *https://api.phoenixnap.com/bmc/v1*
Expand Down Expand Up @@ -183,4 +201,3 @@ Authentication schemes defined for the API:
## Author

support@phoenixnap.com

19 changes: 18 additions & 1 deletion pnap_ip_api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,24 @@ with pnap_ip_api.ApiClient(configuration) as api_client:

```

To generate a token using the [python-keycloak](https://pypi.org/project/python-keycloak/) library:
```python
from keycloak import KeycloakOpenID

clientId = "YOUR_CLIENT_ID"
clientSecret = "YOUR_CLIENT_SECRET"
serverUrl = "https://auth.phoenixnap.com/auth/"
realmName = "BMC"
grantType = "client_credentials"

keycloakOpenId = KeycloakOpenID(server_url=serverUrl,
realm_name=realmName,
client_id=clientId,
client_secret_key=clientSecret)

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


## Documentation for API Endpoints

All URIs are relative to *https://api.phoenixnap.com/ips/v1*
Expand Down Expand Up @@ -128,4 +146,3 @@ Authentication schemes defined for the API:
## Author

support@phoenixnap.com

19 changes: 18 additions & 1 deletion pnap_location_api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,24 @@ with pnap_location_api.ApiClient(configuration) as api_client:

```

To generate a token using the [python-keycloak](https://pypi.org/project/python-keycloak/) library:
```python
from keycloak import KeycloakOpenID

clientId = "YOUR_CLIENT_ID"
clientSecret = "YOUR_CLIENT_SECRET"
serverUrl = "https://auth.phoenixnap.com/auth/"
realmName = "BMC"
grantType = "client_credentials"

keycloakOpenId = KeycloakOpenID(server_url=serverUrl,
realm_name=realmName,
client_id=clientId,
client_secret_key=clientSecret)

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


## Documentation for API Endpoints

All URIs are relative to *https://api.phoenixnap.com/location-api/v1*
Expand Down Expand Up @@ -97,4 +115,3 @@ Endpoints do not require authorization.
## Author

support@phoenixnap.com

19 changes: 18 additions & 1 deletion pnap_network_api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,24 @@ with pnap_network_api.ApiClient(configuration) as api_client:

```

To generate a token using the [python-keycloak](https://pypi.org/project/python-keycloak/) library:
```python
from keycloak import KeycloakOpenID

clientId = "YOUR_CLIENT_ID"
clientSecret = "YOUR_CLIENT_SECRET"
serverUrl = "https://auth.phoenixnap.com/auth/"
realmName = "BMC"
grantType = "client_credentials"

keycloakOpenId = KeycloakOpenID(server_url=serverUrl,
realm_name=realmName,
client_id=clientId,
client_secret_key=clientSecret)

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


## Documentation for API Endpoints

All URIs are relative to *https://api.phoenixnap.com/networks/v1*
Expand Down Expand Up @@ -139,4 +157,3 @@ Authentication schemes defined for the API:
## Author

support@phoenixnap.com

19 changes: 18 additions & 1 deletion pnap_network_storage_api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,24 @@ with pnap_network_storage_api.ApiClient(configuration) as api_client:

```

To generate a token using the [python-keycloak](https://pypi.org/project/python-keycloak/) library:
```python
from keycloak import KeycloakOpenID

clientId = "YOUR_CLIENT_ID"
clientSecret = "YOUR_CLIENT_SECRET"
serverUrl = "https://auth.phoenixnap.com/auth/"
realmName = "BMC"
grantType = "client_credentials"

keycloakOpenId = KeycloakOpenID(server_url=serverUrl,
realm_name=realmName,
client_id=clientId,
client_secret_key=clientSecret)

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


## Documentation for API Endpoints

All URIs are relative to *https://api.phoenixnap.com/network-storage/v1*
Expand Down Expand Up @@ -142,4 +160,3 @@ Authentication schemes defined for the API:
## Author

support@phoenixnap.com

19 changes: 18 additions & 1 deletion pnap_rancher_solution_api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,24 @@ with pnap_rancher_solution_api.ApiClient(configuration) as api_client:

```

To generate a token using the [python-keycloak](https://pypi.org/project/python-keycloak/) library:
```python
from keycloak import KeycloakOpenID

clientId = "YOUR_CLIENT_ID"
clientSecret = "YOUR_CLIENT_SECRET"
serverUrl = "https://auth.phoenixnap.com/auth/"
realmName = "BMC"
grantType = "client_credentials"

keycloakOpenId = KeycloakOpenID(server_url=serverUrl,
realm_name=realmName,
client_id=clientId,
client_secret_key=clientSecret)

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


## Documentation for API Endpoints

All URIs are relative to *https://api.phoenixnap.com/solutions/rancher/v1beta*
Expand Down Expand Up @@ -128,4 +146,3 @@ Authentication schemes defined for the API:
## Author

support@phoenixnap.com

19 changes: 18 additions & 1 deletion pnap_tag_api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,24 @@ with pnap_tag_api.ApiClient(configuration) as api_client:

```

To generate a token using the [python-keycloak](https://pypi.org/project/python-keycloak/) library:
```python
from keycloak import KeycloakOpenID

clientId = "YOUR_CLIENT_ID"
clientSecret = "YOUR_CLIENT_SECRET"
serverUrl = "https://auth.phoenixnap.com/auth/"
realmName = "BMC"
grantType = "client_credentials"

keycloakOpenId = KeycloakOpenID(server_url=serverUrl,
realm_name=realmName,
client_id=clientId,
client_secret_key=clientSecret)

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


## Documentation for API Endpoints

All URIs are relative to *https://api.phoenixnap.com/tag-manager/v1*
Expand Down Expand Up @@ -127,4 +145,3 @@ Authentication schemes defined for the API:
## Author

support@phoenixnap.com

0 comments on commit ae600cc

Please sign in to comment.