Use operationId to set friendlier names

This commit is contained in:
Quentin 2022-09-13 16:10:52 +02:00
parent cbdd714b5a
commit 68927c7a7e
Signed by: quentin
GPG key ID: E9602264D639FF68
36 changed files with 3745 additions and 1239 deletions

2
garage

@ -1 +1 @@
Subproject commit a628359122cd6204118e6238a65859d50e4cd472 Subproject commit 37005e198cadd4e1bbb795b4fcfd64b49a51eb23

View file

@ -1,16 +1,13 @@
.gitignore .gitignore
.gitlab-ci.yml .gitlab-ci.yml
.openapi-generator-ignore
.travis.yml .travis.yml
README.md README.md
docs/AddKeyRequest.md
docs/AddNode200ResponseInner.md
docs/ClusterLayout.md docs/ClusterLayout.md
docs/ConnectPost200ResponseInner.md docs/GetNodes200Response.md
docs/ImportKeyRequest.md
docs/KeyApi.md docs/KeyApi.md
docs/KeyGetRequest.md
docs/KeyIdAccessKeyDeleteRequest.md
docs/KeyIdAccessKeyDeleteRequestAllow.md
docs/KeyIdAccessKeyDeleteRequestDeny.md
docs/KeyImportPostRequest.md
docs/KeyInfo.md docs/KeyInfo.md
docs/KeyInfoBucketsInner.md docs/KeyInfoBucketsInner.md
docs/KeyInfoBucketsInnerPermissions.md docs/KeyInfoBucketsInnerPermissions.md
@ -18,27 +15,27 @@ docs/KeyInfoPermissions.md
docs/LayoutApi.md docs/LayoutApi.md
docs/LayoutVersion.md docs/LayoutVersion.md
docs/ListKeys200ResponseInner.md docs/ListKeys200ResponseInner.md
docs/MembershipApi.md
docs/NodeClusterInfo.md docs/NodeClusterInfo.md
docs/NodeNetworkInfo.md docs/NodeNetworkInfo.md
docs/StatusGet200Response.md docs/NodesApi.md
docs/UpdateKeyRequest.md
docs/UpdateKeyRequestAllow.md
docs/UpdateKeyRequestDeny.md
garage_admin_sdk/__init__.py garage_admin_sdk/__init__.py
garage_admin_sdk/api/__init__.py garage_admin_sdk/api/__init__.py
garage_admin_sdk/api/key_api.py garage_admin_sdk/api/key_api.py
garage_admin_sdk/api/layout_api.py garage_admin_sdk/api/layout_api.py
garage_admin_sdk/api/membership_api.py garage_admin_sdk/api/nodes_api.py
garage_admin_sdk/api_client.py garage_admin_sdk/api_client.py
garage_admin_sdk/apis/__init__.py garage_admin_sdk/apis/__init__.py
garage_admin_sdk/configuration.py garage_admin_sdk/configuration.py
garage_admin_sdk/exceptions.py garage_admin_sdk/exceptions.py
garage_admin_sdk/model/__init__.py garage_admin_sdk/model/__init__.py
garage_admin_sdk/model/add_key_request.py
garage_admin_sdk/model/add_node200_response_inner.py
garage_admin_sdk/model/cluster_layout.py garage_admin_sdk/model/cluster_layout.py
garage_admin_sdk/model/connect_post200_response_inner.py garage_admin_sdk/model/get_nodes200_response.py
garage_admin_sdk/model/key_get_request.py garage_admin_sdk/model/import_key_request.py
garage_admin_sdk/model/key_id_access_key_delete_request.py
garage_admin_sdk/model/key_id_access_key_delete_request_allow.py
garage_admin_sdk/model/key_id_access_key_delete_request_deny.py
garage_admin_sdk/model/key_import_post_request.py
garage_admin_sdk/model/key_info.py garage_admin_sdk/model/key_info.py
garage_admin_sdk/model/key_info_buckets_inner.py garage_admin_sdk/model/key_info_buckets_inner.py
garage_admin_sdk/model/key_info_buckets_inner_permissions.py garage_admin_sdk/model/key_info_buckets_inner_permissions.py
@ -47,7 +44,9 @@ garage_admin_sdk/model/layout_version.py
garage_admin_sdk/model/list_keys200_response_inner.py garage_admin_sdk/model/list_keys200_response_inner.py
garage_admin_sdk/model/node_cluster_info.py garage_admin_sdk/model/node_cluster_info.py
garage_admin_sdk/model/node_network_info.py garage_admin_sdk/model/node_network_info.py
garage_admin_sdk/model/status_get200_response.py garage_admin_sdk/model/update_key_request.py
garage_admin_sdk/model/update_key_request_allow.py
garage_admin_sdk/model/update_key_request_deny.py
garage_admin_sdk/model_utils.py garage_admin_sdk/model_utils.py
garage_admin_sdk/models/__init__.py garage_admin_sdk/models/__init__.py
garage_admin_sdk/rest.py garage_admin_sdk/rest.py
@ -57,23 +56,4 @@ setup.cfg
setup.py setup.py
test-requirements.txt test-requirements.txt
test/__init__.py test/__init__.py
test/test_cluster_layout.py
test/test_connect_post200_response_inner.py
test/test_key_api.py
test/test_key_get_request.py
test/test_key_id_access_key_delete_request.py
test/test_key_id_access_key_delete_request_allow.py
test/test_key_id_access_key_delete_request_deny.py
test/test_key_import_post_request.py
test/test_key_info.py
test/test_key_info_buckets_inner.py
test/test_key_info_buckets_inner_permissions.py
test/test_key_info_permissions.py
test/test_layout_api.py
test/test_layout_version.py
test/test_list_keys200_response_inner.py
test/test_membership_api.py
test/test_node_cluster_info.py
test/test_node_network_info.py
test/test_status_get200_response.py
tox.ini tox.ini

View file

@ -53,11 +53,11 @@ import time
import garage_admin_sdk import garage_admin_sdk
from pprint import pprint from pprint import pprint
from garage_admin_sdk.api import key_api from garage_admin_sdk.api import key_api
from garage_admin_sdk.model.key_get_request import KeyGetRequest from garage_admin_sdk.model.add_key_request import AddKeyRequest
from garage_admin_sdk.model.key_id_access_key_delete_request import KeyIdAccessKeyDeleteRequest from garage_admin_sdk.model.import_key_request import ImportKeyRequest
from garage_admin_sdk.model.key_import_post_request import KeyImportPostRequest
from garage_admin_sdk.model.key_info import KeyInfo from garage_admin_sdk.model.key_info import KeyInfo
from garage_admin_sdk.model.list_keys200_response_inner import ListKeys200ResponseInner from garage_admin_sdk.model.list_keys200_response_inner import ListKeys200ResponseInner
from garage_admin_sdk.model.update_key_request import UpdateKeyRequest
# Defining the host is optional and defaults to http://localhost:3903/v0 # Defining the host is optional and defaults to http://localhost:3903/v0
# See configuration.py for a list of all supported configuration parameters. # See configuration.py for a list of all supported configuration parameters.
configuration = garage_admin_sdk.Configuration( configuration = garage_admin_sdk.Configuration(
@ -79,18 +79,16 @@ configuration = garage_admin_sdk.Configuration(
with garage_admin_sdk.ApiClient(configuration) as api_client: with garage_admin_sdk.ApiClient(configuration) as api_client:
# Create an instance of the API class # Create an instance of the API class
api_instance = key_api.KeyApi(api_client) api_instance = key_api.KeyApi(api_client)
key_import_post_request = KeyImportPostRequest( add_key_request = AddKeyRequest(
name="test-key", name="test-key",
access_key_id="GK31c2f218a2e44f485b94239e", ) # AddKeyRequest | \"You can optionnaly set a friendly name for this key\" (optional)
secret_access_key="b892c0665f0ada8a4755dae98baa3b133590e11dae3bcc1f9d769d67f16c3835",
) # KeyImportPostRequest | Information on the key to import (optional)
try: try:
# Import an existing key # Create a new API key
api_response = api_instance.key_import_post(key_import_post_request=key_import_post_request) api_response = api_instance.add_key(add_key_request=add_key_request)
pprint(api_response) pprint(api_response)
except garage_admin_sdk.ApiException as e: except garage_admin_sdk.ApiException as e:
print("Exception when calling KeyApi->key_import_post: %s\n" % e) print("Exception when calling KeyApi->add_key: %s\n" % e)
``` ```
## Documentation for API Endpoints ## Documentation for API Endpoints
@ -99,30 +97,28 @@ All URIs are relative to *http://localhost:3903/v0*
Class | Method | HTTP request | Description Class | Method | HTTP request | Description
------------ | ------------- | ------------- | ------------- ------------ | ------------- | ------------- | -------------
*KeyApi* | [**key_import_post**](docs/KeyApi.md#key_import_post) | **POST** /key/import | Import an existing key *KeyApi* | [**add_key**](docs/KeyApi.md#add_key) | **POST** /key | Create a new API key
*KeyApi* | [**key_post**](docs/KeyApi.md#key_post) | **POST** /key | Create a new API key *KeyApi* | [**delete_key**](docs/KeyApi.md#delete_key) | **DELETE** /key?id={access_key} | Delete a key
*KeyApi* | [**keyidaccess_key_delete**](docs/KeyApi.md#keyidaccess_key_delete) | **DELETE** /key?id={access_key} | Delete a key *KeyApi* | [**get_key**](docs/KeyApi.md#get_key) | **GET** /key?id={access_key} | Get key information
*KeyApi* | [**keyidaccess_key_get**](docs/KeyApi.md#keyidaccess_key_get) | **GET** /key?id={access_key} | Get key information *KeyApi* | [**import_key**](docs/KeyApi.md#import_key) | **POST** /key/import | Import an existing key
*KeyApi* | [**keyidaccess_key_post**](docs/KeyApi.md#keyidaccess_key_post) | **POST** /key?id={access_key} | Update a key
*KeyApi* | [**keysearchpattern_get**](docs/KeyApi.md#keysearchpattern_get) | **GET** /key?search={pattern} | Select key by pattern
*KeyApi* | [**list_keys**](docs/KeyApi.md#list_keys) | **GET** /key | List all keys *KeyApi* | [**list_keys**](docs/KeyApi.md#list_keys) | **GET** /key | List all keys
*LayoutApi* | [**layout_apply_post**](docs/LayoutApi.md#layout_apply_post) | **POST** /layout/apply | Apply staged layout *KeyApi* | [**search_key**](docs/KeyApi.md#search_key) | **GET** /key?search={pattern} | Select key by pattern
*LayoutApi* | [**layout_get**](docs/LayoutApi.md#layout_get) | **GET** /layout | Details on the current and staged layout *KeyApi* | [**update_key**](docs/KeyApi.md#update_key) | **POST** /key?id={access_key} | Update a key
*LayoutApi* | [**layout_post**](docs/LayoutApi.md#layout_post) | **POST** /layout | Send modifications to the cluster layout *LayoutApi* | [**add_layout**](docs/LayoutApi.md#add_layout) | **POST** /layout | Send modifications to the cluster layout
*LayoutApi* | [**layout_revert_post**](docs/LayoutApi.md#layout_revert_post) | **POST** /layout/revert | Clear staged layout *LayoutApi* | [**apply_layout**](docs/LayoutApi.md#apply_layout) | **POST** /layout/apply | Apply staged layout
*MembershipApi* | [**connect_post**](docs/MembershipApi.md#connect_post) | **POST** /connect | Connect target node to other Garage nodes *LayoutApi* | [**get_layout**](docs/LayoutApi.md#get_layout) | **GET** /layout | Details on the current and staged layout
*MembershipApi* | [**status_get**](docs/MembershipApi.md#status_get) | **GET** /status | Status of this node and other nodes in the cluster *LayoutApi* | [**revert_layout**](docs/LayoutApi.md#revert_layout) | **POST** /layout/revert | Clear staged layout
*NodesApi* | [**add_node**](docs/NodesApi.md#add_node) | **POST** /connect | Connect target node to other Garage nodes
*NodesApi* | [**get_nodes**](docs/NodesApi.md#get_nodes) | **GET** /status | Status of this node and other nodes in the cluster
## Documentation For Models ## Documentation For Models
- [AddKeyRequest](docs/AddKeyRequest.md)
- [AddNode200ResponseInner](docs/AddNode200ResponseInner.md)
- [ClusterLayout](docs/ClusterLayout.md) - [ClusterLayout](docs/ClusterLayout.md)
- [ConnectPost200ResponseInner](docs/ConnectPost200ResponseInner.md) - [GetNodes200Response](docs/GetNodes200Response.md)
- [KeyGetRequest](docs/KeyGetRequest.md) - [ImportKeyRequest](docs/ImportKeyRequest.md)
- [KeyIdAccessKeyDeleteRequest](docs/KeyIdAccessKeyDeleteRequest.md)
- [KeyIdAccessKeyDeleteRequestAllow](docs/KeyIdAccessKeyDeleteRequestAllow.md)
- [KeyIdAccessKeyDeleteRequestDeny](docs/KeyIdAccessKeyDeleteRequestDeny.md)
- [KeyImportPostRequest](docs/KeyImportPostRequest.md)
- [KeyInfo](docs/KeyInfo.md) - [KeyInfo](docs/KeyInfo.md)
- [KeyInfoBucketsInner](docs/KeyInfoBucketsInner.md) - [KeyInfoBucketsInner](docs/KeyInfoBucketsInner.md)
- [KeyInfoBucketsInnerPermissions](docs/KeyInfoBucketsInnerPermissions.md) - [KeyInfoBucketsInnerPermissions](docs/KeyInfoBucketsInnerPermissions.md)
@ -131,7 +127,9 @@ Class | Method | HTTP request | Description
- [ListKeys200ResponseInner](docs/ListKeys200ResponseInner.md) - [ListKeys200ResponseInner](docs/ListKeys200ResponseInner.md)
- [NodeClusterInfo](docs/NodeClusterInfo.md) - [NodeClusterInfo](docs/NodeClusterInfo.md)
- [NodeNetworkInfo](docs/NodeNetworkInfo.md) - [NodeNetworkInfo](docs/NodeNetworkInfo.md)
- [StatusGet200Response](docs/StatusGet200Response.md) - [UpdateKeyRequest](docs/UpdateKeyRequest.md)
- [UpdateKeyRequestAllow](docs/UpdateKeyRequestAllow.md)
- [UpdateKeyRequestDeny](docs/UpdateKeyRequestDeny.md)
## Documentation For Authorization ## Documentation For Authorization

View file

@ -0,0 +1,12 @@
# AddKeyRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **str** | | [optional]
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View file

@ -0,0 +1,13 @@
# AddNode200ResponseInner
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**success** | **bool** | | [optional]
**error** | **str** | | [optional]
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View file

@ -0,0 +1,15 @@
# GetNodes200Response
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**node** | **str** | | [optional]
**garage_version** | **str** | | [optional]
**known_nodes** | [**{str: (NodeNetworkInfo,)}**](NodeNetworkInfo.md) | | [optional]
**layout** | [**ClusterLayout**](ClusterLayout.md) | | [optional]
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View file

@ -0,0 +1,14 @@
# ImportKeyRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **str** | | [optional]
**access_key_id** | **str** | | [optional]
**secret_access_key** | **str** | | [optional]
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View file

@ -4,102 +4,17 @@ All URIs are relative to *http://localhost:3903/v0*
Method | HTTP request | Description Method | HTTP request | Description
------------- | ------------- | ------------- ------------- | ------------- | -------------
[**key_import_post**](KeyApi.md#key_import_post) | **POST** /key/import | Import an existing key [**add_key**](KeyApi.md#add_key) | **POST** /key | Create a new API key
[**key_post**](KeyApi.md#key_post) | **POST** /key | Create a new API key [**delete_key**](KeyApi.md#delete_key) | **DELETE** /key?id={access_key} | Delete a key
[**keyidaccess_key_delete**](KeyApi.md#keyidaccess_key_delete) | **DELETE** /key?id={access_key} | Delete a key [**get_key**](KeyApi.md#get_key) | **GET** /key?id={access_key} | Get key information
[**keyidaccess_key_get**](KeyApi.md#keyidaccess_key_get) | **GET** /key?id={access_key} | Get key information [**import_key**](KeyApi.md#import_key) | **POST** /key/import | Import an existing key
[**keyidaccess_key_post**](KeyApi.md#keyidaccess_key_post) | **POST** /key?id={access_key} | Update a key
[**keysearchpattern_get**](KeyApi.md#keysearchpattern_get) | **GET** /key?search={pattern} | Select key by pattern
[**list_keys**](KeyApi.md#list_keys) | **GET** /key | List all keys [**list_keys**](KeyApi.md#list_keys) | **GET** /key | List all keys
[**search_key**](KeyApi.md#search_key) | **GET** /key?search={pattern} | Select key by pattern
[**update_key**](KeyApi.md#update_key) | **POST** /key?id={access_key} | Update a key
# **key_import_post** # **add_key**
> KeyInfo key_import_post() > KeyInfo add_key()
Import an existing key
Imports an existing API key. This feature must only be used for migrations and backup restore. **Do not use it to generate custom key identifiers or you will break your Garage cluster.**
### Example
* Bearer Authentication (bearerAuth):
```python
import time
import garage_admin_sdk
from garage_admin_sdk.api import key_api
from garage_admin_sdk.model.key_import_post_request import KeyImportPostRequest
from garage_admin_sdk.model.key_info import KeyInfo
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:3903/v0
# See configuration.py for a list of all supported configuration parameters.
configuration = garage_admin_sdk.Configuration(
host = "http://localhost:3903/v0"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: bearerAuth
configuration = garage_admin_sdk.Configuration(
access_token = 'YOUR_BEARER_TOKEN'
)
# Enter a context with an instance of the API client
with garage_admin_sdk.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = key_api.KeyApi(api_client)
key_import_post_request = KeyImportPostRequest(
name="test-key",
access_key_id="GK31c2f218a2e44f485b94239e",
secret_access_key="b892c0665f0ada8a4755dae98baa3b133590e11dae3bcc1f9d769d67f16c3835",
) # KeyImportPostRequest | Information on the key to import (optional)
# example passing only required values which don't have defaults set
# and optional values
try:
# Import an existing key
api_response = api_instance.key_import_post(key_import_post_request=key_import_post_request)
pprint(api_response)
except garage_admin_sdk.ApiException as e:
print("Exception when calling KeyApi->key_import_post: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**key_import_post_request** | [**KeyImportPostRequest**](KeyImportPostRequest.md)| Information on the key to import | [optional]
### Return type
[**KeyInfo**](KeyInfo.md)
### Authorization
[bearerAuth](../README.md#bearerAuth)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**500** | The server can not handle your request. Check your connectivity with the rest of the cluster. | - |
**400** | Invalid syntax or requested change | - |
**200** | The key has been imported into the system | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **key_post**
> KeyInfo key_post()
Create a new API key Create a new API key
@ -113,8 +28,8 @@ Creates a new API access key.
import time import time
import garage_admin_sdk import garage_admin_sdk
from garage_admin_sdk.api import key_api from garage_admin_sdk.api import key_api
from garage_admin_sdk.model.key_get_request import KeyGetRequest
from garage_admin_sdk.model.key_info import KeyInfo from garage_admin_sdk.model.key_info import KeyInfo
from garage_admin_sdk.model.add_key_request import AddKeyRequest
from pprint import pprint from pprint import pprint
# Defining the host is optional and defaults to http://localhost:3903/v0 # Defining the host is optional and defaults to http://localhost:3903/v0
# See configuration.py for a list of all supported configuration parameters. # See configuration.py for a list of all supported configuration parameters.
@ -136,18 +51,18 @@ configuration = garage_admin_sdk.Configuration(
with garage_admin_sdk.ApiClient(configuration) as api_client: with garage_admin_sdk.ApiClient(configuration) as api_client:
# Create an instance of the API class # Create an instance of the API class
api_instance = key_api.KeyApi(api_client) api_instance = key_api.KeyApi(api_client)
key_get_request = KeyGetRequest( add_key_request = AddKeyRequest(
name="test-key", name="test-key",
) # KeyGetRequest | \"You can optionnaly set a friendly name for this key\" (optional) ) # AddKeyRequest | \"You can optionnaly set a friendly name for this key\" (optional)
# example passing only required values which don't have defaults set # example passing only required values which don't have defaults set
# and optional values # and optional values
try: try:
# Create a new API key # Create a new API key
api_response = api_instance.key_post(key_get_request=key_get_request) api_response = api_instance.add_key(add_key_request=add_key_request)
pprint(api_response) pprint(api_response)
except garage_admin_sdk.ApiException as e: except garage_admin_sdk.ApiException as e:
print("Exception when calling KeyApi->key_post: %s\n" % e) print("Exception when calling KeyApi->add_key: %s\n" % e)
``` ```
@ -155,7 +70,7 @@ with garage_admin_sdk.ApiClient(configuration) as api_client:
Name | Type | Description | Notes Name | Type | Description | Notes
------------- | ------------- | ------------- | ------------- ------------- | ------------- | ------------- | -------------
**key_get_request** | [**KeyGetRequest**](KeyGetRequest.md)| \"You can optionnaly set a friendly name for this key\" | [optional] **add_key_request** | [**AddKeyRequest**](AddKeyRequest.md)| \"You can optionnaly set a friendly name for this key\" | [optional]
### Return type ### Return type
@ -181,11 +96,13 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **keyidaccess_key_delete** # **delete_key**
> keyidaccess_key_delete(access_key) > delete_key(access_key)
Delete a key Delete a key
Delete a key from the cluster. Its access will be removed from all the buckets. Buckets are not automatically deleted and can be dangling. You should manually delete them before.
### Example ### Example
* Bearer Authentication (bearerAuth): * Bearer Authentication (bearerAuth):
@ -220,9 +137,9 @@ with garage_admin_sdk.ApiClient(configuration) as api_client:
# example passing only required values which don't have defaults set # example passing only required values which don't have defaults set
try: try:
# Delete a key # Delete a key
api_instance.keyidaccess_key_delete(access_key) api_instance.delete_key(access_key)
except garage_admin_sdk.ApiException as e: except garage_admin_sdk.ApiException as e:
print("Exception when calling KeyApi->keyidaccess_key_delete: %s\n" % e) print("Exception when calling KeyApi->delete_key: %s\n" % e)
``` ```
@ -255,8 +172,8 @@ void (empty response body)
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **keyidaccess_key_get** # **get_key**
> KeyInfo keyidaccess_key_get(access_key) > KeyInfo get_key(access_key)
Get key information Get key information
@ -297,10 +214,10 @@ with garage_admin_sdk.ApiClient(configuration) as api_client:
# example passing only required values which don't have defaults set # example passing only required values which don't have defaults set
try: try:
# Get key information # Get key information
api_response = api_instance.keyidaccess_key_get(access_key) api_response = api_instance.get_key(access_key)
pprint(api_response) pprint(api_response)
except garage_admin_sdk.ApiException as e: except garage_admin_sdk.ApiException as e:
print("Exception when calling KeyApi->keyidaccess_key_get: %s\n" % e) print("Exception when calling KeyApi->get_key: %s\n" % e)
``` ```
@ -333,12 +250,12 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **keyidaccess_key_post** # **import_key**
> KeyInfo keyidaccess_key_post(access_key) > KeyInfo import_key()
Update a key Import an existing key
Updates information about the specified API access key. Imports an existing API key. This feature must only be used for migrations and backup restore. **Do not use it to generate custom key identifiers or you will break your Garage cluster.**
### Example ### Example
@ -348,7 +265,7 @@ Updates information about the specified API access key.
import time import time
import garage_admin_sdk import garage_admin_sdk
from garage_admin_sdk.api import key_api from garage_admin_sdk.api import key_api
from garage_admin_sdk.model.key_id_access_key_delete_request import KeyIdAccessKeyDeleteRequest from garage_admin_sdk.model.import_key_request import ImportKeyRequest
from garage_admin_sdk.model.key_info import KeyInfo from garage_admin_sdk.model.key_info import KeyInfo
from pprint import pprint from pprint import pprint
# Defining the host is optional and defaults to http://localhost:3903/v0 # Defining the host is optional and defaults to http://localhost:3903/v0
@ -371,33 +288,20 @@ configuration = garage_admin_sdk.Configuration(
with garage_admin_sdk.ApiClient(configuration) as api_client: with garage_admin_sdk.ApiClient(configuration) as api_client:
# Create an instance of the API class # Create an instance of the API class
api_instance = key_api.KeyApi(api_client) api_instance = key_api.KeyApi(api_client)
access_key = "GK31c2f218a2e44f485b94239e" # str | The exact API access key generated by Garage import_key_request = ImportKeyRequest(
key_id_access_key_delete_request = KeyIdAccessKeyDeleteRequest(
name="test-key", name="test-key",
allow=KeyIdAccessKeyDeleteRequestAllow( access_key_id="GK31c2f218a2e44f485b94239e",
create_bucket=True, secret_access_key="b892c0665f0ada8a4755dae98baa3b133590e11dae3bcc1f9d769d67f16c3835",
), ) # ImportKeyRequest | Information on the key to import (optional)
deny=KeyIdAccessKeyDeleteRequestDeny(
create_bucket=True,
),
) # KeyIdAccessKeyDeleteRequest | For a given key, provide a first set with the permissions to grant, and a second set with the permissions to remove (optional)
# example passing only required values which don't have defaults set
try:
# Update a key
api_response = api_instance.keyidaccess_key_post(access_key)
pprint(api_response)
except garage_admin_sdk.ApiException as e:
print("Exception when calling KeyApi->keyidaccess_key_post: %s\n" % e)
# example passing only required values which don't have defaults set # example passing only required values which don't have defaults set
# and optional values # and optional values
try: try:
# Update a key # Import an existing key
api_response = api_instance.keyidaccess_key_post(access_key, key_id_access_key_delete_request=key_id_access_key_delete_request) api_response = api_instance.import_key(import_key_request=import_key_request)
pprint(api_response) pprint(api_response)
except garage_admin_sdk.ApiException as e: except garage_admin_sdk.ApiException as e:
print("Exception when calling KeyApi->keyidaccess_key_post: %s\n" % e) print("Exception when calling KeyApi->import_key: %s\n" % e)
``` ```
@ -405,8 +309,7 @@ with garage_admin_sdk.ApiClient(configuration) as api_client:
Name | Type | Description | Notes Name | Type | Description | Notes
------------- | ------------- | ------------- | ------------- ------------- | ------------- | ------------- | -------------
**access_key** | **str**| The exact API access key generated by Garage | **import_key_request** | [**ImportKeyRequest**](ImportKeyRequest.md)| Information on the key to import | [optional]
**key_id_access_key_delete_request** | [**KeyIdAccessKeyDeleteRequest**](KeyIdAccessKeyDeleteRequest.md)| For a given key, provide a first set with the permissions to grant, and a second set with the permissions to remove | [optional]
### Return type ### Return type
@ -428,85 +331,7 @@ Name | Type | Description | Notes
|-------------|-------------|------------------| |-------------|-------------|------------------|
**500** | The server can not handle your request. Check your connectivity with the rest of the cluster. | - | **500** | The server can not handle your request. Check your connectivity with the rest of the cluster. | - |
**400** | Invalid syntax or requested change | - | **400** | Invalid syntax or requested change | - |
**200** | Returns information about the key | - | **200** | The key has been imported into the system | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **keysearchpattern_get**
> KeyInfo keysearchpattern_get(pattern)
Select key by pattern
Find the first key matching the given pattern based on its identifier aor friendly name and return its information.
### Example
* Bearer Authentication (bearerAuth):
```python
import time
import garage_admin_sdk
from garage_admin_sdk.api import key_api
from garage_admin_sdk.model.key_info import KeyInfo
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:3903/v0
# See configuration.py for a list of all supported configuration parameters.
configuration = garage_admin_sdk.Configuration(
host = "http://localhost:3903/v0"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: bearerAuth
configuration = garage_admin_sdk.Configuration(
access_token = 'YOUR_BEARER_TOKEN'
)
# Enter a context with an instance of the API client
with garage_admin_sdk.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = key_api.KeyApi(api_client)
pattern = "test-k" # str | A pattern (beginning or full string) corresponding to a key identifier or friendly name
# example passing only required values which don't have defaults set
try:
# Select key by pattern
api_response = api_instance.keysearchpattern_get(pattern)
pprint(api_response)
except garage_admin_sdk.ApiException as e:
print("Exception when calling KeyApi->keysearchpattern_get: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**pattern** | **str**| A pattern (beginning or full string) corresponding to a key identifier or friendly name |
### Return type
[**KeyInfo**](KeyInfo.md)
### Authorization
[bearerAuth](../README.md#bearerAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**500** | The server can not handle your request. Check your connectivity with the rest of the cluster. | - |
**200** | Returns information about the key | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
@ -584,3 +409,180 @@ This endpoint does not need any parameter.
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **search_key**
> KeyInfo search_key(pattern)
Select key by pattern
Find the first key matching the given pattern based on its identifier aor friendly name and return its information.
### Example
* Bearer Authentication (bearerAuth):
```python
import time
import garage_admin_sdk
from garage_admin_sdk.api import key_api
from garage_admin_sdk.model.key_info import KeyInfo
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:3903/v0
# See configuration.py for a list of all supported configuration parameters.
configuration = garage_admin_sdk.Configuration(
host = "http://localhost:3903/v0"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: bearerAuth
configuration = garage_admin_sdk.Configuration(
access_token = 'YOUR_BEARER_TOKEN'
)
# Enter a context with an instance of the API client
with garage_admin_sdk.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = key_api.KeyApi(api_client)
pattern = "test-k" # str | A pattern (beginning or full string) corresponding to a key identifier or friendly name
# example passing only required values which don't have defaults set
try:
# Select key by pattern
api_response = api_instance.search_key(pattern)
pprint(api_response)
except garage_admin_sdk.ApiException as e:
print("Exception when calling KeyApi->search_key: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**pattern** | **str**| A pattern (beginning or full string) corresponding to a key identifier or friendly name |
### Return type
[**KeyInfo**](KeyInfo.md)
### Authorization
[bearerAuth](../README.md#bearerAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**500** | The server can not handle your request. Check your connectivity with the rest of the cluster. | - |
**200** | Returns information about the key | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **update_key**
> KeyInfo update_key(access_key)
Update a key
Updates information about the specified API access key.
### Example
* Bearer Authentication (bearerAuth):
```python
import time
import garage_admin_sdk
from garage_admin_sdk.api import key_api
from garage_admin_sdk.model.update_key_request import UpdateKeyRequest
from garage_admin_sdk.model.key_info import KeyInfo
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:3903/v0
# See configuration.py for a list of all supported configuration parameters.
configuration = garage_admin_sdk.Configuration(
host = "http://localhost:3903/v0"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: bearerAuth
configuration = garage_admin_sdk.Configuration(
access_token = 'YOUR_BEARER_TOKEN'
)
# Enter a context with an instance of the API client
with garage_admin_sdk.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = key_api.KeyApi(api_client)
access_key = "GK31c2f218a2e44f485b94239e" # str | The exact API access key generated by Garage
update_key_request = UpdateKeyRequest(
name="test-key",
allow=UpdateKeyRequestAllow(
create_bucket=True,
),
deny=UpdateKeyRequestDeny(
create_bucket=True,
),
) # UpdateKeyRequest | For a given key, provide a first set with the permissions to grant, and a second set with the permissions to remove (optional)
# example passing only required values which don't have defaults set
try:
# Update a key
api_response = api_instance.update_key(access_key)
pprint(api_response)
except garage_admin_sdk.ApiException as e:
print("Exception when calling KeyApi->update_key: %s\n" % e)
# example passing only required values which don't have defaults set
# and optional values
try:
# Update a key
api_response = api_instance.update_key(access_key, update_key_request=update_key_request)
pprint(api_response)
except garage_admin_sdk.ApiException as e:
print("Exception when calling KeyApi->update_key: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**access_key** | **str**| The exact API access key generated by Garage |
**update_key_request** | [**UpdateKeyRequest**](UpdateKeyRequest.md)| For a given key, provide a first set with the permissions to grant, and a second set with the permissions to remove | [optional]
### Return type
[**KeyInfo**](KeyInfo.md)
### Authorization
[bearerAuth](../README.md#bearerAuth)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**500** | The server can not handle your request. Check your connectivity with the rest of the cluster. | - |
**400** | Invalid syntax or requested change | - |
**200** | Returns information about the key | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

View file

@ -4,169 +4,14 @@ All URIs are relative to *http://localhost:3903/v0*
Method | HTTP request | Description Method | HTTP request | Description
------------- | ------------- | ------------- ------------- | ------------- | -------------
[**layout_apply_post**](LayoutApi.md#layout_apply_post) | **POST** /layout/apply | Apply staged layout [**add_layout**](LayoutApi.md#add_layout) | **POST** /layout | Send modifications to the cluster layout
[**layout_get**](LayoutApi.md#layout_get) | **GET** /layout | Details on the current and staged layout [**apply_layout**](LayoutApi.md#apply_layout) | **POST** /layout/apply | Apply staged layout
[**layout_post**](LayoutApi.md#layout_post) | **POST** /layout | Send modifications to the cluster layout [**get_layout**](LayoutApi.md#get_layout) | **GET** /layout | Details on the current and staged layout
[**layout_revert_post**](LayoutApi.md#layout_revert_post) | **POST** /layout/revert | Clear staged layout [**revert_layout**](LayoutApi.md#revert_layout) | **POST** /layout/revert | Clear staged layout
# **layout_apply_post** # **add_layout**
> layout_apply_post() > add_layout()
Apply staged layout
Applies to the cluster the layout changes currently registered as staged layout changes.
### Example
* Bearer Authentication (bearerAuth):
```python
import time
import garage_admin_sdk
from garage_admin_sdk.api import layout_api
from garage_admin_sdk.model.layout_version import LayoutVersion
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:3903/v0
# See configuration.py for a list of all supported configuration parameters.
configuration = garage_admin_sdk.Configuration(
host = "http://localhost:3903/v0"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: bearerAuth
configuration = garage_admin_sdk.Configuration(
access_token = 'YOUR_BEARER_TOKEN'
)
# Enter a context with an instance of the API client
with garage_admin_sdk.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = layout_api.LayoutApi(api_client)
layout_version = LayoutVersion(
version=13,
) # LayoutVersion | Similarly to the CLI, the body must include the version of the new layout that will be created, which MUST be 1 + the value of the currently existing layout in the cluster. (optional)
# example passing only required values which don't have defaults set
# and optional values
try:
# Apply staged layout
api_instance.layout_apply_post(layout_version=layout_version)
except garage_admin_sdk.ApiException as e:
print("Exception when calling LayoutApi->layout_apply_post: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**layout_version** | [**LayoutVersion**](LayoutVersion.md)| Similarly to the CLI, the body must include the version of the new layout that will be created, which MUST be 1 + the value of the currently existing layout in the cluster. | [optional]
### Return type
void (empty response body)
### Authorization
[bearerAuth](../README.md#bearerAuth)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: Not defined
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**500** | The server can not handle your request. Check your connectivity with the rest of the cluster. | - |
**400** | Invalid syntax or requested change | - |
**200** | The staged layout has been applied as the new layout of the cluster, a rebalance has been triggered. | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **layout_get**
> ClusterLayout layout_get()
Details on the current and staged layout
Returns the cluster's current layout, including: - Currently configured cluster layout - Staged changes to the cluster layout *The info returned by this endpoint is a subset of the info returned by `GET /status`.*
### Example
* Bearer Authentication (bearerAuth):
```python
import time
import garage_admin_sdk
from garage_admin_sdk.api import layout_api
from garage_admin_sdk.model.cluster_layout import ClusterLayout
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:3903/v0
# See configuration.py for a list of all supported configuration parameters.
configuration = garage_admin_sdk.Configuration(
host = "http://localhost:3903/v0"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: bearerAuth
configuration = garage_admin_sdk.Configuration(
access_token = 'YOUR_BEARER_TOKEN'
)
# Enter a context with an instance of the API client
with garage_admin_sdk.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = layout_api.LayoutApi(api_client)
# example, this endpoint has no required or optional parameters
try:
# Details on the current and staged layout
api_response = api_instance.layout_get()
pprint(api_response)
except garage_admin_sdk.ApiException as e:
print("Exception when calling LayoutApi->layout_get: %s\n" % e)
```
### Parameters
This endpoint does not need any parameter.
### Return type
[**ClusterLayout**](ClusterLayout.md)
### Authorization
[bearerAuth](../README.md#bearerAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**500** | The server can not answer your request because it is in a bad state | - |
**200** | Returns the cluster's current cluster layout: - Currently configured cluster layout - Staged changes to the cluster layout | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **layout_post**
> layout_post()
Send modifications to the cluster layout Send modifications to the cluster layout
@ -210,9 +55,9 @@ with garage_admin_sdk.ApiClient(configuration) as api_client:
# and optional values # and optional values
try: try:
# Send modifications to the cluster layout # Send modifications to the cluster layout
api_instance.layout_post(request_body=request_body) api_instance.add_layout(request_body=request_body)
except garage_admin_sdk.ApiException as e: except garage_admin_sdk.ApiException as e:
print("Exception when calling LayoutApi->layout_post: %s\n" % e) print("Exception when calling LayoutApi->add_layout: %s\n" % e)
``` ```
@ -246,8 +91,163 @@ void (empty response body)
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **layout_revert_post** # **apply_layout**
> layout_revert_post() > apply_layout()
Apply staged layout
Applies to the cluster the layout changes currently registered as staged layout changes.
### Example
* Bearer Authentication (bearerAuth):
```python
import time
import garage_admin_sdk
from garage_admin_sdk.api import layout_api
from garage_admin_sdk.model.layout_version import LayoutVersion
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:3903/v0
# See configuration.py for a list of all supported configuration parameters.
configuration = garage_admin_sdk.Configuration(
host = "http://localhost:3903/v0"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: bearerAuth
configuration = garage_admin_sdk.Configuration(
access_token = 'YOUR_BEARER_TOKEN'
)
# Enter a context with an instance of the API client
with garage_admin_sdk.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = layout_api.LayoutApi(api_client)
layout_version = LayoutVersion(
version=13,
) # LayoutVersion | Similarly to the CLI, the body must include the version of the new layout that will be created, which MUST be 1 + the value of the currently existing layout in the cluster. (optional)
# example passing only required values which don't have defaults set
# and optional values
try:
# Apply staged layout
api_instance.apply_layout(layout_version=layout_version)
except garage_admin_sdk.ApiException as e:
print("Exception when calling LayoutApi->apply_layout: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**layout_version** | [**LayoutVersion**](LayoutVersion.md)| Similarly to the CLI, the body must include the version of the new layout that will be created, which MUST be 1 + the value of the currently existing layout in the cluster. | [optional]
### Return type
void (empty response body)
### Authorization
[bearerAuth](../README.md#bearerAuth)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: Not defined
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**500** | The server can not handle your request. Check your connectivity with the rest of the cluster. | - |
**400** | Invalid syntax or requested change | - |
**200** | The staged layout has been applied as the new layout of the cluster, a rebalance has been triggered. | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **get_layout**
> ClusterLayout get_layout()
Details on the current and staged layout
Returns the cluster's current layout, including: - Currently configured cluster layout - Staged changes to the cluster layout *The info returned by this endpoint is a subset of the info returned by `GET /status`.*
### Example
* Bearer Authentication (bearerAuth):
```python
import time
import garage_admin_sdk
from garage_admin_sdk.api import layout_api
from garage_admin_sdk.model.cluster_layout import ClusterLayout
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:3903/v0
# See configuration.py for a list of all supported configuration parameters.
configuration = garage_admin_sdk.Configuration(
host = "http://localhost:3903/v0"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: bearerAuth
configuration = garage_admin_sdk.Configuration(
access_token = 'YOUR_BEARER_TOKEN'
)
# Enter a context with an instance of the API client
with garage_admin_sdk.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = layout_api.LayoutApi(api_client)
# example, this endpoint has no required or optional parameters
try:
# Details on the current and staged layout
api_response = api_instance.get_layout()
pprint(api_response)
except garage_admin_sdk.ApiException as e:
print("Exception when calling LayoutApi->get_layout: %s\n" % e)
```
### Parameters
This endpoint does not need any parameter.
### Return type
[**ClusterLayout**](ClusterLayout.md)
### Authorization
[bearerAuth](../README.md#bearerAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**500** | The server can not answer your request because it is in a bad state | - |
**200** | Returns the cluster's current cluster layout: - Currently configured cluster layout - Staged changes to the cluster layout | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **revert_layout**
> revert_layout()
Clear staged layout Clear staged layout
@ -291,9 +291,9 @@ with garage_admin_sdk.ApiClient(configuration) as api_client:
# and optional values # and optional values
try: try:
# Clear staged layout # Clear staged layout
api_instance.layout_revert_post(layout_version=layout_version) api_instance.revert_layout(layout_version=layout_version)
except garage_admin_sdk.ApiException as e: except garage_admin_sdk.ApiException as e:
print("Exception when calling LayoutApi->layout_revert_post: %s\n" % e) print("Exception when calling LayoutApi->revert_layout: %s\n" % e)
``` ```

View file

@ -4,12 +4,11 @@ All URIs are relative to *http://localhost:3903/v0*
Method | HTTP request | Description Method | HTTP request | Description
------------- | ------------- | ------------- ------------- | ------------- | -------------
[**connect_post**](MembershipApi.md#connect_post) | **POST** /connect | Connect target node to other Garage nodes [**add_node**](MembershipApi.md#add_node) | **POST** /connect | Connect target node to other Garage nodes
[**status_get**](MembershipApi.md#status_get) | **GET** /status | Status of this node and other nodes in the cluster
# **connect_post** # **add_node**
> [ConnectPost200ResponseInner] connect_post() > [AddNode200ResponseInner] add_node()
Connect target node to other Garage nodes Connect target node to other Garage nodes
@ -23,7 +22,7 @@ Instructs this Garage node to connect to other Garage nodes at specified `<node_
import time import time
import garage_admin_sdk import garage_admin_sdk
from garage_admin_sdk.api import membership_api from garage_admin_sdk.api import membership_api
from garage_admin_sdk.model.connect_post200_response_inner import ConnectPost200ResponseInner from garage_admin_sdk.model.add_node200_response_inner import AddNode200ResponseInner
from pprint import pprint from pprint import pprint
# Defining the host is optional and defaults to http://localhost:3903/v0 # Defining the host is optional and defaults to http://localhost:3903/v0
# See configuration.py for a list of all supported configuration parameters. # See configuration.py for a list of all supported configuration parameters.
@ -51,10 +50,10 @@ with garage_admin_sdk.ApiClient(configuration) as api_client:
# and optional values # and optional values
try: try:
# Connect target node to other Garage nodes # Connect target node to other Garage nodes
api_response = api_instance.connect_post(request_body=request_body) api_response = api_instance.add_node(request_body=request_body)
pprint(api_response) pprint(api_response)
except garage_admin_sdk.ApiException as e: except garage_admin_sdk.ApiException as e:
print("Exception when calling MembershipApi->connect_post: %s\n" % e) print("Exception when calling MembershipApi->add_node: %s\n" % e)
``` ```
@ -66,7 +65,7 @@ Name | Type | Description | Notes
### Return type ### Return type
[**[ConnectPost200ResponseInner]**](ConnectPost200ResponseInner.md) [**[AddNode200ResponseInner]**](AddNode200ResponseInner.md)
### Authorization ### Authorization
@ -88,77 +87,3 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **status_get**
> StatusGet200Response status_get()
Status of this node and other nodes in the cluster
Returns the cluster's current status, including: - ID of the node being queried and its version of the Garage daemon - Live nodes - Currently configured cluster layout - Staged changes to the cluster layout
### Example
* Bearer Authentication (bearerAuth):
```python
import time
import garage_admin_sdk
from garage_admin_sdk.api import membership_api
from garage_admin_sdk.model.status_get200_response import StatusGet200Response
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:3903/v0
# See configuration.py for a list of all supported configuration parameters.
configuration = garage_admin_sdk.Configuration(
host = "http://localhost:3903/v0"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: bearerAuth
configuration = garage_admin_sdk.Configuration(
access_token = 'YOUR_BEARER_TOKEN'
)
# Enter a context with an instance of the API client
with garage_admin_sdk.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = membership_api.MembershipApi(api_client)
# example, this endpoint has no required or optional parameters
try:
# Status of this node and other nodes in the cluster
api_response = api_instance.status_get()
pprint(api_response)
except garage_admin_sdk.ApiException as e:
print("Exception when calling MembershipApi->status_get: %s\n" % e)
```
### Parameters
This endpoint does not need any parameter.
### Return type
[**StatusGet200Response**](StatusGet200Response.md)
### Authorization
[bearerAuth](../README.md#bearerAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**500** | The server can not answer your request because it is in a bad state | - |
**200** | Information about the queried node, its environment and the current layout | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

164
python/docs/NodesApi.md Normal file
View file

@ -0,0 +1,164 @@
# garage_admin_sdk.NodesApi
All URIs are relative to *http://localhost:3903/v0*
Method | HTTP request | Description
------------- | ------------- | -------------
[**add_node**](NodesApi.md#add_node) | **POST** /connect | Connect target node to other Garage nodes
[**get_nodes**](NodesApi.md#get_nodes) | **GET** /status | Status of this node and other nodes in the cluster
# **add_node**
> [AddNode200ResponseInner] add_node()
Connect target node to other Garage nodes
Instructs this Garage node to connect to other Garage nodes at specified `<node_id>@<net_address>`. `node_id` is generated automatically on node start.
### Example
* Bearer Authentication (bearerAuth):
```python
import time
import garage_admin_sdk
from garage_admin_sdk.api import nodes_api
from garage_admin_sdk.model.add_node200_response_inner import AddNode200ResponseInner
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:3903/v0
# See configuration.py for a list of all supported configuration parameters.
configuration = garage_admin_sdk.Configuration(
host = "http://localhost:3903/v0"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: bearerAuth
configuration = garage_admin_sdk.Configuration(
access_token = 'YOUR_BEARER_TOKEN'
)
# Enter a context with an instance of the API client
with garage_admin_sdk.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = nodes_api.NodesApi(api_client)
request_body = ["ec79480e0ce52ae26fd00c9da684e4fa56658d9c64cdcecb094e936de0bfe71f@10.0.0.11:3901","4a6ae5a1d0d33bf895f5bb4f0a418b7dc94c47c0dd2eb108d1158f3c8f60b0ff@10.0.0.12:3901"] # [str] | (optional)
# example passing only required values which don't have defaults set
# and optional values
try:
# Connect target node to other Garage nodes
api_response = api_instance.add_node(request_body=request_body)
pprint(api_response)
except garage_admin_sdk.ApiException as e:
print("Exception when calling NodesApi->add_node: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**request_body** | **[str]**| | [optional]
### Return type
[**[AddNode200ResponseInner]**](AddNode200ResponseInner.md)
### Authorization
[bearerAuth](../README.md#bearerAuth)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**500** | The server can not answer your request because it is in a bad state | - |
**400** | Your request is malformed, check your JSON | - |
**200** | The request has been handled correctly but it does not mean that all connection requests succeeded; some might have fail, you need to check the body! | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **get_nodes**
> GetNodes200Response get_nodes()
Status of this node and other nodes in the cluster
Returns the cluster's current status, including: - ID of the node being queried and its version of the Garage daemon - Live nodes - Currently configured cluster layout - Staged changes to the cluster layout
### Example
* Bearer Authentication (bearerAuth):
```python
import time
import garage_admin_sdk
from garage_admin_sdk.api import nodes_api
from garage_admin_sdk.model.get_nodes200_response import GetNodes200Response
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:3903/v0
# See configuration.py for a list of all supported configuration parameters.
configuration = garage_admin_sdk.Configuration(
host = "http://localhost:3903/v0"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: bearerAuth
configuration = garage_admin_sdk.Configuration(
access_token = 'YOUR_BEARER_TOKEN'
)
# Enter a context with an instance of the API client
with garage_admin_sdk.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = nodes_api.NodesApi(api_client)
# example, this endpoint has no required or optional parameters
try:
# Status of this node and other nodes in the cluster
api_response = api_instance.get_nodes()
pprint(api_response)
except garage_admin_sdk.ApiException as e:
print("Exception when calling NodesApi->get_nodes: %s\n" % e)
```
### Parameters
This endpoint does not need any parameter.
### Return type
[**GetNodes200Response**](GetNodes200Response.md)
### Authorization
[bearerAuth](../README.md#bearerAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**500** | The server can not answer your request because it is in a bad state | - |
**200** | Information about the queried node, its environment and the current layout | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

View file

@ -0,0 +1,14 @@
# UpdateKeyRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **str** | | [optional]
**allow** | [**UpdateKeyRequestAllow**](UpdateKeyRequestAllow.md) | | [optional]
**deny** | [**UpdateKeyRequestDeny**](UpdateKeyRequestDeny.md) | | [optional]
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View file

@ -0,0 +1,12 @@
# UpdateKeyRequestAllow
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**create_bucket** | **bool** | | [optional]
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View file

@ -0,0 +1,12 @@
# UpdateKeyRequestDeny
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**create_bucket** | **bool** | | [optional]
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View file

@ -21,11 +21,11 @@ from garage_admin_sdk.model_utils import ( # noqa: F401
none_type, none_type,
validate_and_convert_types validate_and_convert_types
) )
from garage_admin_sdk.model.key_get_request import KeyGetRequest from garage_admin_sdk.model.add_key_request import AddKeyRequest
from garage_admin_sdk.model.key_id_access_key_delete_request import KeyIdAccessKeyDeleteRequest from garage_admin_sdk.model.import_key_request import ImportKeyRequest
from garage_admin_sdk.model.key_import_post_request import KeyImportPostRequest
from garage_admin_sdk.model.key_info import KeyInfo from garage_admin_sdk.model.key_info import KeyInfo
from garage_admin_sdk.model.list_keys200_response_inner import ListKeys200ResponseInner from garage_admin_sdk.model.list_keys200_response_inner import ListKeys200ResponseInner
from garage_admin_sdk.model.update_key_request import UpdateKeyRequest
class KeyApi(object): class KeyApi(object):
@ -39,70 +39,20 @@ class KeyApi(object):
if api_client is None: if api_client is None:
api_client = ApiClient() api_client = ApiClient()
self.api_client = api_client self.api_client = api_client
self.key_import_post_endpoint = _Endpoint( self.add_key_endpoint = _Endpoint(
settings={
'response_type': (KeyInfo,),
'auth': [
'bearerAuth'
],
'endpoint_path': '/key/import',
'operation_id': 'key_import_post',
'http_method': 'POST',
'servers': None,
},
params_map={
'all': [
'key_import_post_request',
],
'required': [],
'nullable': [
],
'enum': [
],
'validation': [
]
},
root_map={
'validations': {
},
'allowed_values': {
},
'openapi_types': {
'key_import_post_request':
(KeyImportPostRequest,),
},
'attribute_map': {
},
'location_map': {
'key_import_post_request': 'body',
},
'collection_format_map': {
}
},
headers_map={
'accept': [
'application/json'
],
'content_type': [
'application/json'
]
},
api_client=api_client
)
self.key_post_endpoint = _Endpoint(
settings={ settings={
'response_type': (KeyInfo,), 'response_type': (KeyInfo,),
'auth': [ 'auth': [
'bearerAuth' 'bearerAuth'
], ],
'endpoint_path': '/key', 'endpoint_path': '/key',
'operation_id': 'key_post', 'operation_id': 'add_key',
'http_method': 'POST', 'http_method': 'POST',
'servers': None, 'servers': None,
}, },
params_map={ params_map={
'all': [ 'all': [
'key_get_request', 'add_key_request',
], ],
'required': [], 'required': [],
'nullable': [ 'nullable': [
@ -118,13 +68,13 @@ class KeyApi(object):
'allowed_values': { 'allowed_values': {
}, },
'openapi_types': { 'openapi_types': {
'key_get_request': 'add_key_request':
(KeyGetRequest,), (AddKeyRequest,),
}, },
'attribute_map': { 'attribute_map': {
}, },
'location_map': { 'location_map': {
'key_get_request': 'body', 'add_key_request': 'body',
}, },
'collection_format_map': { 'collection_format_map': {
} }
@ -139,14 +89,14 @@ class KeyApi(object):
}, },
api_client=api_client api_client=api_client
) )
self.keyidaccess_key_delete_endpoint = _Endpoint( self.delete_key_endpoint = _Endpoint(
settings={ settings={
'response_type': None, 'response_type': None,
'auth': [ 'auth': [
'bearerAuth' 'bearerAuth'
], ],
'endpoint_path': '/key?id={access_key}', 'endpoint_path': '/key?id={access_key}',
'operation_id': 'keyidaccess_key_delete', 'operation_id': 'delete_key',
'http_method': 'DELETE', 'http_method': 'DELETE',
'servers': None, 'servers': None,
}, },
@ -188,14 +138,14 @@ class KeyApi(object):
}, },
api_client=api_client api_client=api_client
) )
self.keyidaccess_key_get_endpoint = _Endpoint( self.get_key_endpoint = _Endpoint(
settings={ settings={
'response_type': (KeyInfo,), 'response_type': (KeyInfo,),
'auth': [ 'auth': [
'bearerAuth' 'bearerAuth'
], ],
'endpoint_path': '/key?id={access_key}', 'endpoint_path': '/key?id={access_key}',
'operation_id': 'keyidaccess_key_get', 'operation_id': 'get_key',
'http_method': 'GET', 'http_method': 'GET',
'servers': None, 'servers': None,
}, },
@ -239,25 +189,22 @@ class KeyApi(object):
}, },
api_client=api_client api_client=api_client
) )
self.keyidaccess_key_post_endpoint = _Endpoint( self.import_key_endpoint = _Endpoint(
settings={ settings={
'response_type': (KeyInfo,), 'response_type': (KeyInfo,),
'auth': [ 'auth': [
'bearerAuth' 'bearerAuth'
], ],
'endpoint_path': '/key?id={access_key}', 'endpoint_path': '/key/import',
'operation_id': 'keyidaccess_key_post', 'operation_id': 'import_key',
'http_method': 'POST', 'http_method': 'POST',
'servers': None, 'servers': None,
}, },
params_map={ params_map={
'all': [ 'all': [
'access_key', 'import_key_request',
'key_id_access_key_delete_request',
],
'required': [
'access_key',
], ],
'required': [],
'nullable': [ 'nullable': [
], ],
'enum': [ 'enum': [
@ -271,17 +218,13 @@ class KeyApi(object):
'allowed_values': { 'allowed_values': {
}, },
'openapi_types': { 'openapi_types': {
'access_key': 'import_key_request':
(str,), (ImportKeyRequest,),
'key_id_access_key_delete_request':
(KeyIdAccessKeyDeleteRequest,),
}, },
'attribute_map': { 'attribute_map': {
'access_key': 'access_key',
}, },
'location_map': { 'location_map': {
'access_key': 'path', 'import_key_request': 'body',
'key_id_access_key_delete_request': 'body',
}, },
'collection_format_map': { 'collection_format_map': {
} }
@ -296,57 +239,6 @@ class KeyApi(object):
}, },
api_client=api_client api_client=api_client
) )
self.keysearchpattern_get_endpoint = _Endpoint(
settings={
'response_type': (KeyInfo,),
'auth': [
'bearerAuth'
],
'endpoint_path': '/key?search={pattern}',
'operation_id': 'keysearchpattern_get',
'http_method': 'GET',
'servers': None,
},
params_map={
'all': [
'pattern',
],
'required': [
'pattern',
],
'nullable': [
],
'enum': [
],
'validation': [
]
},
root_map={
'validations': {
},
'allowed_values': {
},
'openapi_types': {
'pattern':
(str,),
},
'attribute_map': {
'pattern': 'pattern',
},
'location_map': {
'pattern': 'path',
},
'collection_format_map': {
}
},
headers_map={
'accept': [
'application/json'
],
'content_type': [],
},
api_client=api_client
)
self.list_keys_endpoint = _Endpoint( self.list_keys_endpoint = _Endpoint(
settings={ settings={
'response_type': ([ListKeys200ResponseInner],), 'response_type': ([ListKeys200ResponseInner],),
@ -391,87 +283,116 @@ class KeyApi(object):
}, },
api_client=api_client api_client=api_client
) )
self.search_key_endpoint = _Endpoint(
def key_import_post( settings={
self, 'response_type': (KeyInfo,),
**kwargs 'auth': [
): 'bearerAuth'
"""Import an existing key # noqa: E501 ],
'endpoint_path': '/key?search={pattern}',
Imports an existing API key. This feature must only be used for migrations and backup restore. **Do not use it to generate custom key identifiers or you will break your Garage cluster.** # noqa: E501 'operation_id': 'search_key',
This method makes a synchronous HTTP request by default. To make an 'http_method': 'GET',
asynchronous HTTP request, please pass async_req=True 'servers': None,
},
>>> thread = api.key_import_post(async_req=True) params_map={
>>> result = thread.get() 'all': [
'pattern',
],
Keyword Args: 'required': [
key_import_post_request (KeyImportPostRequest): Information on the key to import . [optional] 'pattern',
_return_http_data_only (bool): response data without head status ],
code and headers. Default is True. 'nullable': [
_preload_content (bool): if False, the urllib3.HTTPResponse object ],
will be returned without reading/decoding response data. 'enum': [
Default is True. ],
_request_timeout (int/float/tuple): timeout setting for this request. If 'validation': [
one number provided, it will be total request timeout. It can also ]
be a pair (tuple) of (connection, read) timeouts. },
Default is None. root_map={
_check_input_type (bool): specifies if type checking 'validations': {
should be done one the data sent to the server. },
Default is True. 'allowed_values': {
_check_return_type (bool): specifies if type checking },
should be done one the data received from the server. 'openapi_types': {
Default is True. 'pattern':
_spec_property_naming (bool): True if the variable names in the input data (str,),
are serialized names, as specified in the OpenAPI document. },
False if the variable names in the input data 'attribute_map': {
are pythonic names, e.g. snake case (default) 'pattern': 'pattern',
_content_type (str/None): force body content-type. },
Default is None and content-type will be predicted by allowed 'location_map': {
content-types and body. 'pattern': 'path',
_host_index (int/None): specifies the index of the server },
that we want to use. 'collection_format_map': {
Default is read from the configuration. }
_request_auths (list): set to override the auth_settings for an a single },
request; this effectively ignores the authentication headers_map={
in the spec for a single request. 'accept': [
Default is None 'application/json'
async_req (bool): execute request asynchronously ],
'content_type': [],
Returns: },
KeyInfo api_client=api_client
If the method is called asynchronously, returns the request
thread.
"""
kwargs['async_req'] = kwargs.get(
'async_req', False
) )
kwargs['_return_http_data_only'] = kwargs.get( self.update_key_endpoint = _Endpoint(
'_return_http_data_only', True settings={
'response_type': (KeyInfo,),
'auth': [
'bearerAuth'
],
'endpoint_path': '/key?id={access_key}',
'operation_id': 'update_key',
'http_method': 'POST',
'servers': None,
},
params_map={
'all': [
'access_key',
'update_key_request',
],
'required': [
'access_key',
],
'nullable': [
],
'enum': [
],
'validation': [
]
},
root_map={
'validations': {
},
'allowed_values': {
},
'openapi_types': {
'access_key':
(str,),
'update_key_request':
(UpdateKeyRequest,),
},
'attribute_map': {
'access_key': 'access_key',
},
'location_map': {
'access_key': 'path',
'update_key_request': 'body',
},
'collection_format_map': {
}
},
headers_map={
'accept': [
'application/json'
],
'content_type': [
'application/json'
]
},
api_client=api_client
) )
kwargs['_preload_content'] = kwargs.get(
'_preload_content', True
)
kwargs['_request_timeout'] = kwargs.get(
'_request_timeout', None
)
kwargs['_check_input_type'] = kwargs.get(
'_check_input_type', True
)
kwargs['_check_return_type'] = kwargs.get(
'_check_return_type', True
)
kwargs['_spec_property_naming'] = kwargs.get(
'_spec_property_naming', False
)
kwargs['_content_type'] = kwargs.get(
'_content_type')
kwargs['_host_index'] = kwargs.get('_host_index')
kwargs['_request_auths'] = kwargs.get('_request_auths', None)
return self.key_import_post_endpoint.call_with_http_info(**kwargs)
def key_post( def add_key(
self, self,
**kwargs **kwargs
): ):
@ -481,12 +402,12 @@ class KeyApi(object):
This method makes a synchronous HTTP request by default. To make an This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True asynchronous HTTP request, please pass async_req=True
>>> thread = api.key_post(async_req=True) >>> thread = api.add_key(async_req=True)
>>> result = thread.get() >>> result = thread.get()
Keyword Args: Keyword Args:
key_get_request (KeyGetRequest): \"You can optionnaly set a friendly name for this key\" . [optional] add_key_request (AddKeyRequest): \"You can optionnaly set a friendly name for this key\" . [optional]
_return_http_data_only (bool): response data without head status _return_http_data_only (bool): response data without head status
code and headers. Default is True. code and headers. Default is True.
_preload_content (bool): if False, the urllib3.HTTPResponse object _preload_content (bool): if False, the urllib3.HTTPResponse object
@ -548,19 +469,20 @@ class KeyApi(object):
'_content_type') '_content_type')
kwargs['_host_index'] = kwargs.get('_host_index') kwargs['_host_index'] = kwargs.get('_host_index')
kwargs['_request_auths'] = kwargs.get('_request_auths', None) kwargs['_request_auths'] = kwargs.get('_request_auths', None)
return self.key_post_endpoint.call_with_http_info(**kwargs) return self.add_key_endpoint.call_with_http_info(**kwargs)
def keyidaccess_key_delete( def delete_key(
self, self,
access_key, access_key,
**kwargs **kwargs
): ):
"""Delete a key # noqa: E501 """Delete a key # noqa: E501
Delete a key from the cluster. Its access will be removed from all the buckets. Buckets are not automatically deleted and can be dangling. You should manually delete them before. # noqa: E501
This method makes a synchronous HTTP request by default. To make an This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True asynchronous HTTP request, please pass async_req=True
>>> thread = api.keyidaccess_key_delete(access_key, async_req=True) >>> thread = api.delete_key(access_key, async_req=True)
>>> result = thread.get() >>> result = thread.get()
Args: Args:
@ -630,9 +552,9 @@ class KeyApi(object):
kwargs['_request_auths'] = kwargs.get('_request_auths', None) kwargs['_request_auths'] = kwargs.get('_request_auths', None)
kwargs['access_key'] = \ kwargs['access_key'] = \
access_key access_key
return self.keyidaccess_key_delete_endpoint.call_with_http_info(**kwargs) return self.delete_key_endpoint.call_with_http_info(**kwargs)
def keyidaccess_key_get( def get_key(
self, self,
access_key, access_key,
**kwargs **kwargs
@ -643,7 +565,7 @@ class KeyApi(object):
This method makes a synchronous HTTP request by default. To make an This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True asynchronous HTTP request, please pass async_req=True
>>> thread = api.keyidaccess_key_get(access_key, async_req=True) >>> thread = api.get_key(access_key, async_req=True)
>>> result = thread.get() >>> result = thread.get()
Args: Args:
@ -713,27 +635,24 @@ class KeyApi(object):
kwargs['_request_auths'] = kwargs.get('_request_auths', None) kwargs['_request_auths'] = kwargs.get('_request_auths', None)
kwargs['access_key'] = \ kwargs['access_key'] = \
access_key access_key
return self.keyidaccess_key_get_endpoint.call_with_http_info(**kwargs) return self.get_key_endpoint.call_with_http_info(**kwargs)
def keyidaccess_key_post( def import_key(
self, self,
access_key,
**kwargs **kwargs
): ):
"""Update a key # noqa: E501 """Import an existing key # noqa: E501
Updates information about the specified API access key. # noqa: E501 Imports an existing API key. This feature must only be used for migrations and backup restore. **Do not use it to generate custom key identifiers or you will break your Garage cluster.** # noqa: E501
This method makes a synchronous HTTP request by default. To make an This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True asynchronous HTTP request, please pass async_req=True
>>> thread = api.keyidaccess_key_post(access_key, async_req=True) >>> thread = api.import_key(async_req=True)
>>> result = thread.get() >>> result = thread.get()
Args:
access_key (str): The exact API access key generated by Garage
Keyword Args: Keyword Args:
key_id_access_key_delete_request (KeyIdAccessKeyDeleteRequest): For a given key, provide a first set with the permissions to grant, and a second set with the permissions to remove . [optional] import_key_request (ImportKeyRequest): Information on the key to import . [optional]
_return_http_data_only (bool): response data without head status _return_http_data_only (bool): response data without head status
code and headers. Default is True. code and headers. Default is True.
_preload_content (bool): if False, the urllib3.HTTPResponse object _preload_content (bool): if False, the urllib3.HTTPResponse object
@ -795,92 +714,7 @@ class KeyApi(object):
'_content_type') '_content_type')
kwargs['_host_index'] = kwargs.get('_host_index') kwargs['_host_index'] = kwargs.get('_host_index')
kwargs['_request_auths'] = kwargs.get('_request_auths', None) kwargs['_request_auths'] = kwargs.get('_request_auths', None)
kwargs['access_key'] = \ return self.import_key_endpoint.call_with_http_info(**kwargs)
access_key
return self.keyidaccess_key_post_endpoint.call_with_http_info(**kwargs)
def keysearchpattern_get(
self,
pattern,
**kwargs
):
"""Select key by pattern # noqa: E501
Find the first key matching the given pattern based on its identifier aor friendly name and return its information. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.keysearchpattern_get(pattern, async_req=True)
>>> result = thread.get()
Args:
pattern (str): A pattern (beginning or full string) corresponding to a key identifier or friendly name
Keyword Args:
_return_http_data_only (bool): response data without head status
code and headers. Default is True.
_preload_content (bool): if False, the urllib3.HTTPResponse object
will be returned without reading/decoding response data.
Default is True.
_request_timeout (int/float/tuple): timeout setting for this request. If
one number provided, it will be total request timeout. It can also
be a pair (tuple) of (connection, read) timeouts.
Default is None.
_check_input_type (bool): specifies if type checking
should be done one the data sent to the server.
Default is True.
_check_return_type (bool): specifies if type checking
should be done one the data received from the server.
Default is True.
_spec_property_naming (bool): True if the variable names in the input data
are serialized names, as specified in the OpenAPI document.
False if the variable names in the input data
are pythonic names, e.g. snake case (default)
_content_type (str/None): force body content-type.
Default is None and content-type will be predicted by allowed
content-types and body.
_host_index (int/None): specifies the index of the server
that we want to use.
Default is read from the configuration.
_request_auths (list): set to override the auth_settings for an a single
request; this effectively ignores the authentication
in the spec for a single request.
Default is None
async_req (bool): execute request asynchronously
Returns:
KeyInfo
If the method is called asynchronously, returns the request
thread.
"""
kwargs['async_req'] = kwargs.get(
'async_req', False
)
kwargs['_return_http_data_only'] = kwargs.get(
'_return_http_data_only', True
)
kwargs['_preload_content'] = kwargs.get(
'_preload_content', True
)
kwargs['_request_timeout'] = kwargs.get(
'_request_timeout', None
)
kwargs['_check_input_type'] = kwargs.get(
'_check_input_type', True
)
kwargs['_check_return_type'] = kwargs.get(
'_check_return_type', True
)
kwargs['_spec_property_naming'] = kwargs.get(
'_spec_property_naming', False
)
kwargs['_content_type'] = kwargs.get(
'_content_type')
kwargs['_host_index'] = kwargs.get('_host_index')
kwargs['_request_auths'] = kwargs.get('_request_auths', None)
kwargs['pattern'] = \
pattern
return self.keysearchpattern_get_endpoint.call_with_http_info(**kwargs)
def list_keys( def list_keys(
self, self,
@ -960,3 +794,170 @@ class KeyApi(object):
kwargs['_request_auths'] = kwargs.get('_request_auths', None) kwargs['_request_auths'] = kwargs.get('_request_auths', None)
return self.list_keys_endpoint.call_with_http_info(**kwargs) return self.list_keys_endpoint.call_with_http_info(**kwargs)
def search_key(
self,
pattern,
**kwargs
):
"""Select key by pattern # noqa: E501
Find the first key matching the given pattern based on its identifier aor friendly name and return its information. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.search_key(pattern, async_req=True)
>>> result = thread.get()
Args:
pattern (str): A pattern (beginning or full string) corresponding to a key identifier or friendly name
Keyword Args:
_return_http_data_only (bool): response data without head status
code and headers. Default is True.
_preload_content (bool): if False, the urllib3.HTTPResponse object
will be returned without reading/decoding response data.
Default is True.
_request_timeout (int/float/tuple): timeout setting for this request. If
one number provided, it will be total request timeout. It can also
be a pair (tuple) of (connection, read) timeouts.
Default is None.
_check_input_type (bool): specifies if type checking
should be done one the data sent to the server.
Default is True.
_check_return_type (bool): specifies if type checking
should be done one the data received from the server.
Default is True.
_spec_property_naming (bool): True if the variable names in the input data
are serialized names, as specified in the OpenAPI document.
False if the variable names in the input data
are pythonic names, e.g. snake case (default)
_content_type (str/None): force body content-type.
Default is None and content-type will be predicted by allowed
content-types and body.
_host_index (int/None): specifies the index of the server
that we want to use.
Default is read from the configuration.
_request_auths (list): set to override the auth_settings for an a single
request; this effectively ignores the authentication
in the spec for a single request.
Default is None
async_req (bool): execute request asynchronously
Returns:
KeyInfo
If the method is called asynchronously, returns the request
thread.
"""
kwargs['async_req'] = kwargs.get(
'async_req', False
)
kwargs['_return_http_data_only'] = kwargs.get(
'_return_http_data_only', True
)
kwargs['_preload_content'] = kwargs.get(
'_preload_content', True
)
kwargs['_request_timeout'] = kwargs.get(
'_request_timeout', None
)
kwargs['_check_input_type'] = kwargs.get(
'_check_input_type', True
)
kwargs['_check_return_type'] = kwargs.get(
'_check_return_type', True
)
kwargs['_spec_property_naming'] = kwargs.get(
'_spec_property_naming', False
)
kwargs['_content_type'] = kwargs.get(
'_content_type')
kwargs['_host_index'] = kwargs.get('_host_index')
kwargs['_request_auths'] = kwargs.get('_request_auths', None)
kwargs['pattern'] = \
pattern
return self.search_key_endpoint.call_with_http_info(**kwargs)
def update_key(
self,
access_key,
**kwargs
):
"""Update a key # noqa: E501
Updates information about the specified API access key. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.update_key(access_key, async_req=True)
>>> result = thread.get()
Args:
access_key (str): The exact API access key generated by Garage
Keyword Args:
update_key_request (UpdateKeyRequest): For a given key, provide a first set with the permissions to grant, and a second set with the permissions to remove . [optional]
_return_http_data_only (bool): response data without head status
code and headers. Default is True.
_preload_content (bool): if False, the urllib3.HTTPResponse object
will be returned without reading/decoding response data.
Default is True.
_request_timeout (int/float/tuple): timeout setting for this request. If
one number provided, it will be total request timeout. It can also
be a pair (tuple) of (connection, read) timeouts.
Default is None.
_check_input_type (bool): specifies if type checking
should be done one the data sent to the server.
Default is True.
_check_return_type (bool): specifies if type checking
should be done one the data received from the server.
Default is True.
_spec_property_naming (bool): True if the variable names in the input data
are serialized names, as specified in the OpenAPI document.
False if the variable names in the input data
are pythonic names, e.g. snake case (default)
_content_type (str/None): force body content-type.
Default is None and content-type will be predicted by allowed
content-types and body.
_host_index (int/None): specifies the index of the server
that we want to use.
Default is read from the configuration.
_request_auths (list): set to override the auth_settings for an a single
request; this effectively ignores the authentication
in the spec for a single request.
Default is None
async_req (bool): execute request asynchronously
Returns:
KeyInfo
If the method is called asynchronously, returns the request
thread.
"""
kwargs['async_req'] = kwargs.get(
'async_req', False
)
kwargs['_return_http_data_only'] = kwargs.get(
'_return_http_data_only', True
)
kwargs['_preload_content'] = kwargs.get(
'_preload_content', True
)
kwargs['_request_timeout'] = kwargs.get(
'_request_timeout', None
)
kwargs['_check_input_type'] = kwargs.get(
'_check_input_type', True
)
kwargs['_check_return_type'] = kwargs.get(
'_check_return_type', True
)
kwargs['_spec_property_naming'] = kwargs.get(
'_spec_property_naming', False
)
kwargs['_content_type'] = kwargs.get(
'_content_type')
kwargs['_host_index'] = kwargs.get('_host_index')
kwargs['_request_auths'] = kwargs.get('_request_auths', None)
kwargs['access_key'] = \
access_key
return self.update_key_endpoint.call_with_http_info(**kwargs)

View file

@ -37,106 +37,14 @@ class LayoutApi(object):
if api_client is None: if api_client is None:
api_client = ApiClient() api_client = ApiClient()
self.api_client = api_client self.api_client = api_client
self.layout_apply_post_endpoint = _Endpoint( self.add_layout_endpoint = _Endpoint(
settings={
'response_type': None,
'auth': [
'bearerAuth'
],
'endpoint_path': '/layout/apply',
'operation_id': 'layout_apply_post',
'http_method': 'POST',
'servers': None,
},
params_map={
'all': [
'layout_version',
],
'required': [],
'nullable': [
],
'enum': [
],
'validation': [
]
},
root_map={
'validations': {
},
'allowed_values': {
},
'openapi_types': {
'layout_version':
(LayoutVersion,),
},
'attribute_map': {
},
'location_map': {
'layout_version': 'body',
},
'collection_format_map': {
}
},
headers_map={
'accept': [],
'content_type': [
'application/json'
]
},
api_client=api_client
)
self.layout_get_endpoint = _Endpoint(
settings={
'response_type': (ClusterLayout,),
'auth': [
'bearerAuth'
],
'endpoint_path': '/layout',
'operation_id': 'layout_get',
'http_method': 'GET',
'servers': None,
},
params_map={
'all': [
],
'required': [],
'nullable': [
],
'enum': [
],
'validation': [
]
},
root_map={
'validations': {
},
'allowed_values': {
},
'openapi_types': {
},
'attribute_map': {
},
'location_map': {
},
'collection_format_map': {
}
},
headers_map={
'accept': [
'application/json'
],
'content_type': [],
},
api_client=api_client
)
self.layout_post_endpoint = _Endpoint(
settings={ settings={
'response_type': None, 'response_type': None,
'auth': [ 'auth': [
'bearerAuth' 'bearerAuth'
], ],
'endpoint_path': '/layout', 'endpoint_path': '/layout',
'operation_id': 'layout_post', 'operation_id': 'add_layout',
'http_method': 'POST', 'http_method': 'POST',
'servers': None, 'servers': None,
}, },
@ -177,14 +85,106 @@ class LayoutApi(object):
}, },
api_client=api_client api_client=api_client
) )
self.layout_revert_post_endpoint = _Endpoint( self.apply_layout_endpoint = _Endpoint(
settings={
'response_type': None,
'auth': [
'bearerAuth'
],
'endpoint_path': '/layout/apply',
'operation_id': 'apply_layout',
'http_method': 'POST',
'servers': None,
},
params_map={
'all': [
'layout_version',
],
'required': [],
'nullable': [
],
'enum': [
],
'validation': [
]
},
root_map={
'validations': {
},
'allowed_values': {
},
'openapi_types': {
'layout_version':
(LayoutVersion,),
},
'attribute_map': {
},
'location_map': {
'layout_version': 'body',
},
'collection_format_map': {
}
},
headers_map={
'accept': [],
'content_type': [
'application/json'
]
},
api_client=api_client
)
self.get_layout_endpoint = _Endpoint(
settings={
'response_type': (ClusterLayout,),
'auth': [
'bearerAuth'
],
'endpoint_path': '/layout',
'operation_id': 'get_layout',
'http_method': 'GET',
'servers': None,
},
params_map={
'all': [
],
'required': [],
'nullable': [
],
'enum': [
],
'validation': [
]
},
root_map={
'validations': {
},
'allowed_values': {
},
'openapi_types': {
},
'attribute_map': {
},
'location_map': {
},
'collection_format_map': {
}
},
headers_map={
'accept': [
'application/json'
],
'content_type': [],
},
api_client=api_client
)
self.revert_layout_endpoint = _Endpoint(
settings={ settings={
'response_type': None, 'response_type': None,
'auth': [ 'auth': [
'bearerAuth' 'bearerAuth'
], ],
'endpoint_path': '/layout/revert', 'endpoint_path': '/layout/revert',
'operation_id': 'layout_revert_post', 'operation_id': 'revert_layout',
'http_method': 'POST', 'http_method': 'POST',
'servers': None, 'servers': None,
}, },
@ -226,164 +226,7 @@ class LayoutApi(object):
api_client=api_client api_client=api_client
) )
def layout_apply_post( def add_layout(
self,
**kwargs
):
"""Apply staged layout # noqa: E501
Applies to the cluster the layout changes currently registered as staged layout changes. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.layout_apply_post(async_req=True)
>>> result = thread.get()
Keyword Args:
layout_version (LayoutVersion): Similarly to the CLI, the body must include the version of the new layout that will be created, which MUST be 1 + the value of the currently existing layout in the cluster. . [optional]
_return_http_data_only (bool): response data without head status
code and headers. Default is True.
_preload_content (bool): if False, the urllib3.HTTPResponse object
will be returned without reading/decoding response data.
Default is True.
_request_timeout (int/float/tuple): timeout setting for this request. If
one number provided, it will be total request timeout. It can also
be a pair (tuple) of (connection, read) timeouts.
Default is None.
_check_input_type (bool): specifies if type checking
should be done one the data sent to the server.
Default is True.
_check_return_type (bool): specifies if type checking
should be done one the data received from the server.
Default is True.
_spec_property_naming (bool): True if the variable names in the input data
are serialized names, as specified in the OpenAPI document.
False if the variable names in the input data
are pythonic names, e.g. snake case (default)
_content_type (str/None): force body content-type.
Default is None and content-type will be predicted by allowed
content-types and body.
_host_index (int/None): specifies the index of the server
that we want to use.
Default is read from the configuration.
_request_auths (list): set to override the auth_settings for an a single
request; this effectively ignores the authentication
in the spec for a single request.
Default is None
async_req (bool): execute request asynchronously
Returns:
None
If the method is called asynchronously, returns the request
thread.
"""
kwargs['async_req'] = kwargs.get(
'async_req', False
)
kwargs['_return_http_data_only'] = kwargs.get(
'_return_http_data_only', True
)
kwargs['_preload_content'] = kwargs.get(
'_preload_content', True
)
kwargs['_request_timeout'] = kwargs.get(
'_request_timeout', None
)
kwargs['_check_input_type'] = kwargs.get(
'_check_input_type', True
)
kwargs['_check_return_type'] = kwargs.get(
'_check_return_type', True
)
kwargs['_spec_property_naming'] = kwargs.get(
'_spec_property_naming', False
)
kwargs['_content_type'] = kwargs.get(
'_content_type')
kwargs['_host_index'] = kwargs.get('_host_index')
kwargs['_request_auths'] = kwargs.get('_request_auths', None)
return self.layout_apply_post_endpoint.call_with_http_info(**kwargs)
def layout_get(
self,
**kwargs
):
"""Details on the current and staged layout # noqa: E501
Returns the cluster's current layout, including: - Currently configured cluster layout - Staged changes to the cluster layout *The info returned by this endpoint is a subset of the info returned by `GET /status`.* # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.layout_get(async_req=True)
>>> result = thread.get()
Keyword Args:
_return_http_data_only (bool): response data without head status
code and headers. Default is True.
_preload_content (bool): if False, the urllib3.HTTPResponse object
will be returned without reading/decoding response data.
Default is True.
_request_timeout (int/float/tuple): timeout setting for this request. If
one number provided, it will be total request timeout. It can also
be a pair (tuple) of (connection, read) timeouts.
Default is None.
_check_input_type (bool): specifies if type checking
should be done one the data sent to the server.
Default is True.
_check_return_type (bool): specifies if type checking
should be done one the data received from the server.
Default is True.
_spec_property_naming (bool): True if the variable names in the input data
are serialized names, as specified in the OpenAPI document.
False if the variable names in the input data
are pythonic names, e.g. snake case (default)
_content_type (str/None): force body content-type.
Default is None and content-type will be predicted by allowed
content-types and body.
_host_index (int/None): specifies the index of the server
that we want to use.
Default is read from the configuration.
_request_auths (list): set to override the auth_settings for an a single
request; this effectively ignores the authentication
in the spec for a single request.
Default is None
async_req (bool): execute request asynchronously
Returns:
ClusterLayout
If the method is called asynchronously, returns the request
thread.
"""
kwargs['async_req'] = kwargs.get(
'async_req', False
)
kwargs['_return_http_data_only'] = kwargs.get(
'_return_http_data_only', True
)
kwargs['_preload_content'] = kwargs.get(
'_preload_content', True
)
kwargs['_request_timeout'] = kwargs.get(
'_request_timeout', None
)
kwargs['_check_input_type'] = kwargs.get(
'_check_input_type', True
)
kwargs['_check_return_type'] = kwargs.get(
'_check_return_type', True
)
kwargs['_spec_property_naming'] = kwargs.get(
'_spec_property_naming', False
)
kwargs['_content_type'] = kwargs.get(
'_content_type')
kwargs['_host_index'] = kwargs.get('_host_index')
kwargs['_request_auths'] = kwargs.get('_request_auths', None)
return self.layout_get_endpoint.call_with_http_info(**kwargs)
def layout_post(
self, self,
**kwargs **kwargs
): ):
@ -393,7 +236,7 @@ class LayoutApi(object):
This method makes a synchronous HTTP request by default. To make an This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True asynchronous HTTP request, please pass async_req=True
>>> thread = api.layout_post(async_req=True) >>> thread = api.add_layout(async_req=True)
>>> result = thread.get() >>> result = thread.get()
@ -460,9 +303,166 @@ class LayoutApi(object):
'_content_type') '_content_type')
kwargs['_host_index'] = kwargs.get('_host_index') kwargs['_host_index'] = kwargs.get('_host_index')
kwargs['_request_auths'] = kwargs.get('_request_auths', None) kwargs['_request_auths'] = kwargs.get('_request_auths', None)
return self.layout_post_endpoint.call_with_http_info(**kwargs) return self.add_layout_endpoint.call_with_http_info(**kwargs)
def layout_revert_post( def apply_layout(
self,
**kwargs
):
"""Apply staged layout # noqa: E501
Applies to the cluster the layout changes currently registered as staged layout changes. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.apply_layout(async_req=True)
>>> result = thread.get()
Keyword Args:
layout_version (LayoutVersion): Similarly to the CLI, the body must include the version of the new layout that will be created, which MUST be 1 + the value of the currently existing layout in the cluster. . [optional]
_return_http_data_only (bool): response data without head status
code and headers. Default is True.
_preload_content (bool): if False, the urllib3.HTTPResponse object
will be returned without reading/decoding response data.
Default is True.
_request_timeout (int/float/tuple): timeout setting for this request. If
one number provided, it will be total request timeout. It can also
be a pair (tuple) of (connection, read) timeouts.
Default is None.
_check_input_type (bool): specifies if type checking
should be done one the data sent to the server.
Default is True.
_check_return_type (bool): specifies if type checking
should be done one the data received from the server.
Default is True.
_spec_property_naming (bool): True if the variable names in the input data
are serialized names, as specified in the OpenAPI document.
False if the variable names in the input data
are pythonic names, e.g. snake case (default)
_content_type (str/None): force body content-type.
Default is None and content-type will be predicted by allowed
content-types and body.
_host_index (int/None): specifies the index of the server
that we want to use.
Default is read from the configuration.
_request_auths (list): set to override the auth_settings for an a single
request; this effectively ignores the authentication
in the spec for a single request.
Default is None
async_req (bool): execute request asynchronously
Returns:
None
If the method is called asynchronously, returns the request
thread.
"""
kwargs['async_req'] = kwargs.get(
'async_req', False
)
kwargs['_return_http_data_only'] = kwargs.get(
'_return_http_data_only', True
)
kwargs['_preload_content'] = kwargs.get(
'_preload_content', True
)
kwargs['_request_timeout'] = kwargs.get(
'_request_timeout', None
)
kwargs['_check_input_type'] = kwargs.get(
'_check_input_type', True
)
kwargs['_check_return_type'] = kwargs.get(
'_check_return_type', True
)
kwargs['_spec_property_naming'] = kwargs.get(
'_spec_property_naming', False
)
kwargs['_content_type'] = kwargs.get(
'_content_type')
kwargs['_host_index'] = kwargs.get('_host_index')
kwargs['_request_auths'] = kwargs.get('_request_auths', None)
return self.apply_layout_endpoint.call_with_http_info(**kwargs)
def get_layout(
self,
**kwargs
):
"""Details on the current and staged layout # noqa: E501
Returns the cluster's current layout, including: - Currently configured cluster layout - Staged changes to the cluster layout *The info returned by this endpoint is a subset of the info returned by `GET /status`.* # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_layout(async_req=True)
>>> result = thread.get()
Keyword Args:
_return_http_data_only (bool): response data without head status
code and headers. Default is True.
_preload_content (bool): if False, the urllib3.HTTPResponse object
will be returned without reading/decoding response data.
Default is True.
_request_timeout (int/float/tuple): timeout setting for this request. If
one number provided, it will be total request timeout. It can also
be a pair (tuple) of (connection, read) timeouts.
Default is None.
_check_input_type (bool): specifies if type checking
should be done one the data sent to the server.
Default is True.
_check_return_type (bool): specifies if type checking
should be done one the data received from the server.
Default is True.
_spec_property_naming (bool): True if the variable names in the input data
are serialized names, as specified in the OpenAPI document.
False if the variable names in the input data
are pythonic names, e.g. snake case (default)
_content_type (str/None): force body content-type.
Default is None and content-type will be predicted by allowed
content-types and body.
_host_index (int/None): specifies the index of the server
that we want to use.
Default is read from the configuration.
_request_auths (list): set to override the auth_settings for an a single
request; this effectively ignores the authentication
in the spec for a single request.
Default is None
async_req (bool): execute request asynchronously
Returns:
ClusterLayout
If the method is called asynchronously, returns the request
thread.
"""
kwargs['async_req'] = kwargs.get(
'async_req', False
)
kwargs['_return_http_data_only'] = kwargs.get(
'_return_http_data_only', True
)
kwargs['_preload_content'] = kwargs.get(
'_preload_content', True
)
kwargs['_request_timeout'] = kwargs.get(
'_request_timeout', None
)
kwargs['_check_input_type'] = kwargs.get(
'_check_input_type', True
)
kwargs['_check_return_type'] = kwargs.get(
'_check_return_type', True
)
kwargs['_spec_property_naming'] = kwargs.get(
'_spec_property_naming', False
)
kwargs['_content_type'] = kwargs.get(
'_content_type')
kwargs['_host_index'] = kwargs.get('_host_index')
kwargs['_request_auths'] = kwargs.get('_request_auths', None)
return self.get_layout_endpoint.call_with_http_info(**kwargs)
def revert_layout(
self, self,
**kwargs **kwargs
): ):
@ -472,7 +472,7 @@ class LayoutApi(object):
This method makes a synchronous HTTP request by default. To make an This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True asynchronous HTTP request, please pass async_req=True
>>> thread = api.layout_revert_post(async_req=True) >>> thread = api.revert_layout(async_req=True)
>>> result = thread.get() >>> result = thread.get()
@ -539,5 +539,5 @@ class LayoutApi(object):
'_content_type') '_content_type')
kwargs['_host_index'] = kwargs.get('_host_index') kwargs['_host_index'] = kwargs.get('_host_index')
kwargs['_request_auths'] = kwargs.get('_request_auths', None) kwargs['_request_auths'] = kwargs.get('_request_auths', None)
return self.layout_revert_post_endpoint.call_with_http_info(**kwargs) return self.revert_layout_endpoint.call_with_http_info(**kwargs)

View file

@ -21,8 +21,7 @@ from garage_admin_sdk.model_utils import ( # noqa: F401
none_type, none_type,
validate_and_convert_types validate_and_convert_types
) )
from garage_admin_sdk.model.connect_post200_response_inner import ConnectPost200ResponseInner from garage_admin_sdk.model.add_node200_response_inner import AddNode200ResponseInner
from garage_admin_sdk.model.status_get200_response import StatusGet200Response
class MembershipApi(object): class MembershipApi(object):
@ -36,14 +35,14 @@ class MembershipApi(object):
if api_client is None: if api_client is None:
api_client = ApiClient() api_client = ApiClient()
self.api_client = api_client self.api_client = api_client
self.connect_post_endpoint = _Endpoint( self.add_node_endpoint = _Endpoint(
settings={ settings={
'response_type': ([ConnectPost200ResponseInner],), 'response_type': ([AddNode200ResponseInner],),
'auth': [ 'auth': [
'bearerAuth' 'bearerAuth'
], ],
'endpoint_path': '/connect', 'endpoint_path': '/connect',
'operation_id': 'connect_post', 'operation_id': 'add_node',
'http_method': 'POST', 'http_method': 'POST',
'servers': None, 'servers': None,
}, },
@ -86,52 +85,8 @@ class MembershipApi(object):
}, },
api_client=api_client api_client=api_client
) )
self.status_get_endpoint = _Endpoint(
settings={
'response_type': (StatusGet200Response,),
'auth': [
'bearerAuth'
],
'endpoint_path': '/status',
'operation_id': 'status_get',
'http_method': 'GET',
'servers': None,
},
params_map={
'all': [
],
'required': [],
'nullable': [
],
'enum': [
],
'validation': [
]
},
root_map={
'validations': {
},
'allowed_values': {
},
'openapi_types': {
},
'attribute_map': {
},
'location_map': {
},
'collection_format_map': {
}
},
headers_map={
'accept': [
'application/json'
],
'content_type': [],
},
api_client=api_client
)
def connect_post( def add_node(
self, self,
**kwargs **kwargs
): ):
@ -141,7 +96,7 @@ class MembershipApi(object):
This method makes a synchronous HTTP request by default. To make an This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True asynchronous HTTP request, please pass async_req=True
>>> thread = api.connect_post(async_req=True) >>> thread = api.add_node(async_req=True)
>>> result = thread.get() >>> result = thread.get()
@ -179,7 +134,7 @@ class MembershipApi(object):
async_req (bool): execute request asynchronously async_req (bool): execute request asynchronously
Returns: Returns:
[ConnectPost200ResponseInner] [AddNode200ResponseInner]
If the method is called asynchronously, returns the request If the method is called asynchronously, returns the request
thread. thread.
""" """
@ -208,83 +163,5 @@ class MembershipApi(object):
'_content_type') '_content_type')
kwargs['_host_index'] = kwargs.get('_host_index') kwargs['_host_index'] = kwargs.get('_host_index')
kwargs['_request_auths'] = kwargs.get('_request_auths', None) kwargs['_request_auths'] = kwargs.get('_request_auths', None)
return self.connect_post_endpoint.call_with_http_info(**kwargs) return self.add_node_endpoint.call_with_http_info(**kwargs)
def status_get(
self,
**kwargs
):
"""Status of this node and other nodes in the cluster # noqa: E501
Returns the cluster's current status, including: - ID of the node being queried and its version of the Garage daemon - Live nodes - Currently configured cluster layout - Staged changes to the cluster layout # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.status_get(async_req=True)
>>> result = thread.get()
Keyword Args:
_return_http_data_only (bool): response data without head status
code and headers. Default is True.
_preload_content (bool): if False, the urllib3.HTTPResponse object
will be returned without reading/decoding response data.
Default is True.
_request_timeout (int/float/tuple): timeout setting for this request. If
one number provided, it will be total request timeout. It can also
be a pair (tuple) of (connection, read) timeouts.
Default is None.
_check_input_type (bool): specifies if type checking
should be done one the data sent to the server.
Default is True.
_check_return_type (bool): specifies if type checking
should be done one the data received from the server.
Default is True.
_spec_property_naming (bool): True if the variable names in the input data
are serialized names, as specified in the OpenAPI document.
False if the variable names in the input data
are pythonic names, e.g. snake case (default)
_content_type (str/None): force body content-type.
Default is None and content-type will be predicted by allowed
content-types and body.
_host_index (int/None): specifies the index of the server
that we want to use.
Default is read from the configuration.
_request_auths (list): set to override the auth_settings for an a single
request; this effectively ignores the authentication
in the spec for a single request.
Default is None
async_req (bool): execute request asynchronously
Returns:
StatusGet200Response
If the method is called asynchronously, returns the request
thread.
"""
kwargs['async_req'] = kwargs.get(
'async_req', False
)
kwargs['_return_http_data_only'] = kwargs.get(
'_return_http_data_only', True
)
kwargs['_preload_content'] = kwargs.get(
'_preload_content', True
)
kwargs['_request_timeout'] = kwargs.get(
'_request_timeout', None
)
kwargs['_check_input_type'] = kwargs.get(
'_check_input_type', True
)
kwargs['_check_return_type'] = kwargs.get(
'_check_return_type', True
)
kwargs['_spec_property_naming'] = kwargs.get(
'_spec_property_naming', False
)
kwargs['_content_type'] = kwargs.get(
'_content_type')
kwargs['_host_index'] = kwargs.get('_host_index')
kwargs['_request_auths'] = kwargs.get('_request_auths', None)
return self.status_get_endpoint.call_with_http_info(**kwargs)

View file

@ -0,0 +1,290 @@
"""
Garage Administration API v0+garage-v0.7.3
Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501
The version of the OpenAPI document: v0.7.3
Generated by: https://openapi-generator.tech
"""
import re # noqa: F401
import sys # noqa: F401
from garage_admin_sdk.api_client import ApiClient, Endpoint as _Endpoint
from garage_admin_sdk.model_utils import ( # noqa: F401
check_allowed_values,
check_validations,
date,
datetime,
file_type,
none_type,
validate_and_convert_types
)
from garage_admin_sdk.model.add_node200_response_inner import AddNode200ResponseInner
from garage_admin_sdk.model.get_nodes200_response import GetNodes200Response
class NodesApi(object):
"""NOTE: This class is auto generated by OpenAPI Generator
Ref: https://openapi-generator.tech
Do not edit the class manually.
"""
def __init__(self, api_client=None):
if api_client is None:
api_client = ApiClient()
self.api_client = api_client
self.add_node_endpoint = _Endpoint(
settings={
'response_type': ([AddNode200ResponseInner],),
'auth': [
'bearerAuth'
],
'endpoint_path': '/connect',
'operation_id': 'add_node',
'http_method': 'POST',
'servers': None,
},
params_map={
'all': [
'request_body',
],
'required': [],
'nullable': [
],
'enum': [
],
'validation': [
]
},
root_map={
'validations': {
},
'allowed_values': {
},
'openapi_types': {
'request_body':
([str],),
},
'attribute_map': {
},
'location_map': {
'request_body': 'body',
},
'collection_format_map': {
}
},
headers_map={
'accept': [
'application/json'
],
'content_type': [
'application/json'
]
},
api_client=api_client
)
self.get_nodes_endpoint = _Endpoint(
settings={
'response_type': (GetNodes200Response,),
'auth': [
'bearerAuth'
],
'endpoint_path': '/status',
'operation_id': 'get_nodes',
'http_method': 'GET',
'servers': None,
},
params_map={
'all': [
],
'required': [],
'nullable': [
],
'enum': [
],
'validation': [
]
},
root_map={
'validations': {
},
'allowed_values': {
},
'openapi_types': {
},
'attribute_map': {
},
'location_map': {
},
'collection_format_map': {
}
},
headers_map={
'accept': [
'application/json'
],
'content_type': [],
},
api_client=api_client
)
def add_node(
self,
**kwargs
):
"""Connect target node to other Garage nodes # noqa: E501
Instructs this Garage node to connect to other Garage nodes at specified `<node_id>@<net_address>`. `node_id` is generated automatically on node start. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.add_node(async_req=True)
>>> result = thread.get()
Keyword Args:
request_body ([str]): [optional]
_return_http_data_only (bool): response data without head status
code and headers. Default is True.
_preload_content (bool): if False, the urllib3.HTTPResponse object
will be returned without reading/decoding response data.
Default is True.
_request_timeout (int/float/tuple): timeout setting for this request. If
one number provided, it will be total request timeout. It can also
be a pair (tuple) of (connection, read) timeouts.
Default is None.
_check_input_type (bool): specifies if type checking
should be done one the data sent to the server.
Default is True.
_check_return_type (bool): specifies if type checking
should be done one the data received from the server.
Default is True.
_spec_property_naming (bool): True if the variable names in the input data
are serialized names, as specified in the OpenAPI document.
False if the variable names in the input data
are pythonic names, e.g. snake case (default)
_content_type (str/None): force body content-type.
Default is None and content-type will be predicted by allowed
content-types and body.
_host_index (int/None): specifies the index of the server
that we want to use.
Default is read from the configuration.
_request_auths (list): set to override the auth_settings for an a single
request; this effectively ignores the authentication
in the spec for a single request.
Default is None
async_req (bool): execute request asynchronously
Returns:
[AddNode200ResponseInner]
If the method is called asynchronously, returns the request
thread.
"""
kwargs['async_req'] = kwargs.get(
'async_req', False
)
kwargs['_return_http_data_only'] = kwargs.get(
'_return_http_data_only', True
)
kwargs['_preload_content'] = kwargs.get(
'_preload_content', True
)
kwargs['_request_timeout'] = kwargs.get(
'_request_timeout', None
)
kwargs['_check_input_type'] = kwargs.get(
'_check_input_type', True
)
kwargs['_check_return_type'] = kwargs.get(
'_check_return_type', True
)
kwargs['_spec_property_naming'] = kwargs.get(
'_spec_property_naming', False
)
kwargs['_content_type'] = kwargs.get(
'_content_type')
kwargs['_host_index'] = kwargs.get('_host_index')
kwargs['_request_auths'] = kwargs.get('_request_auths', None)
return self.add_node_endpoint.call_with_http_info(**kwargs)
def get_nodes(
self,
**kwargs
):
"""Status of this node and other nodes in the cluster # noqa: E501
Returns the cluster's current status, including: - ID of the node being queried and its version of the Garage daemon - Live nodes - Currently configured cluster layout - Staged changes to the cluster layout # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_nodes(async_req=True)
>>> result = thread.get()
Keyword Args:
_return_http_data_only (bool): response data without head status
code and headers. Default is True.
_preload_content (bool): if False, the urllib3.HTTPResponse object
will be returned without reading/decoding response data.
Default is True.
_request_timeout (int/float/tuple): timeout setting for this request. If
one number provided, it will be total request timeout. It can also
be a pair (tuple) of (connection, read) timeouts.
Default is None.
_check_input_type (bool): specifies if type checking
should be done one the data sent to the server.
Default is True.
_check_return_type (bool): specifies if type checking
should be done one the data received from the server.
Default is True.
_spec_property_naming (bool): True if the variable names in the input data
are serialized names, as specified in the OpenAPI document.
False if the variable names in the input data
are pythonic names, e.g. snake case (default)
_content_type (str/None): force body content-type.
Default is None and content-type will be predicted by allowed
content-types and body.
_host_index (int/None): specifies the index of the server
that we want to use.
Default is read from the configuration.
_request_auths (list): set to override the auth_settings for an a single
request; this effectively ignores the authentication
in the spec for a single request.
Default is None
async_req (bool): execute request asynchronously
Returns:
GetNodes200Response
If the method is called asynchronously, returns the request
thread.
"""
kwargs['async_req'] = kwargs.get(
'async_req', False
)
kwargs['_return_http_data_only'] = kwargs.get(
'_return_http_data_only', True
)
kwargs['_preload_content'] = kwargs.get(
'_preload_content', True
)
kwargs['_request_timeout'] = kwargs.get(
'_request_timeout', None
)
kwargs['_check_input_type'] = kwargs.get(
'_check_input_type', True
)
kwargs['_check_return_type'] = kwargs.get(
'_check_return_type', True
)
kwargs['_spec_property_naming'] = kwargs.get(
'_spec_property_naming', False
)
kwargs['_content_type'] = kwargs.get(
'_content_type')
kwargs['_host_index'] = kwargs.get('_host_index')
kwargs['_request_auths'] = kwargs.get('_request_auths', None)
return self.get_nodes_endpoint.call_with_http_info(**kwargs)

View file

@ -802,10 +802,10 @@ class Endpoint(object):
Example: Example:
api_instance = KeyApi() api_instance = KeyApi()
api_instance.key_import_post # this is an instance of the class Endpoint api_instance.add_key # this is an instance of the class Endpoint
api_instance.key_import_post() # this invokes api_instance.key_import_post.__call__() api_instance.add_key() # this invokes api_instance.add_key.__call__()
which then invokes the callable functions stored in that endpoint at which then invokes the callable functions stored in that endpoint at
api_instance.key_import_post.callable or self.callable in this class api_instance.add_key.callable or self.callable in this class
""" """
return self.callable(self, *args, **kwargs) return self.callable(self, *args, **kwargs)

View file

@ -16,4 +16,4 @@
# Import APIs into API package: # Import APIs into API package:
from garage_admin_sdk.api.key_api import KeyApi from garage_admin_sdk.api.key_api import KeyApi
from garage_admin_sdk.api.layout_api import LayoutApi from garage_admin_sdk.api.layout_api import LayoutApi
from garage_admin_sdk.api.membership_api import MembershipApi from garage_admin_sdk.api.nodes_api import NodesApi

View file

@ -0,0 +1,263 @@
"""
Garage Administration API v0+garage-v0.7.3
Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501
The version of the OpenAPI document: v0.7.3
Generated by: https://openapi-generator.tech
"""
import re # noqa: F401
import sys # noqa: F401
from garage_admin_sdk.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,
ModelNormal,
ModelSimple,
cached_property,
change_keys_js_to_python,
convert_js_args_to_python_args,
date,
datetime,
file_type,
none_type,
validate_get_composed_info,
OpenApiModel
)
from garage_admin_sdk.exceptions import ApiAttributeError
class AddKeyRequest(ModelNormal):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
Do not edit the class manually.
Attributes:
allowed_values (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
with a capitalized key describing the allowed value and an allowed
value. These dicts store the allowed enum values.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
discriminator_value_class_map (dict): A dict to go from the discriminator
variable value to the discriminator class name.
validations (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
that stores validations for max_length, min_length, max_items,
min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
inclusive_minimum, and regex.
additional_properties_type (tuple): A tuple of classes accepted
as additional properties values.
"""
allowed_values = {
}
validations = {
}
@cached_property
def additional_properties_type():
"""
This must be a method because a model may have properties that are
of type self, this must run after the class is loaded
"""
return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
@cached_property
def openapi_types():
"""
This must be a method because a model may have properties that are
of type self, this must run after the class is loaded
Returns
openapi_types (dict): The key is attribute name
and the value is attribute type.
"""
return {
'name': (str,), # noqa: E501
}
@cached_property
def discriminator():
return None
attribute_map = {
'name': 'name', # noqa: E501
}
read_only_vars = {
}
_composed_schemas = {}
@classmethod
@convert_js_args_to_python_args
def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
"""AddKeyRequest - a model defined in OpenAPI
Keyword Args:
_check_type (bool): if True, values for parameters in openapi_types
will be type checked and a TypeError will be
raised if the wrong type is input.
Defaults to True
_path_to_item (tuple/list): This is a list of keys or values to
drill down to the model in received_data
when deserializing a response
_spec_property_naming (bool): True if the variable names in the input data
are serialized names, as specified in the OpenAPI document.
False if the variable names in the input data
are pythonic names, e.g. snake case (default)
_configuration (Configuration): the instance to use when
deserializing a file_type parameter.
If passed, type conversion is attempted
If omitted no type conversion is done.
_visited_composed_classes (tuple): This stores a tuple of
classes that we have traveled through so that
if we see that class again we will not use its
discriminator again.
When traveling through a discriminator, the
composed schema that is
is traveled through is added to this set.
For example if Animal has a discriminator
petType and we pass in "Dog", and the class Dog
allOf includes Animal, we move through Animal
once using the discriminator, and pick Dog.
Then in Dog, we will make an instance of the
Animal class but this time we won't travel
through its discriminator because we passed in
_visited_composed_classes = (Animal,)
name (str): [optional] # noqa: E501
"""
_check_type = kwargs.pop('_check_type', True)
_spec_property_naming = kwargs.pop('_spec_property_naming', True)
_path_to_item = kwargs.pop('_path_to_item', ())
_configuration = kwargs.pop('_configuration', None)
_visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
self = super(OpenApiModel, cls).__new__(cls)
if args:
for arg in args:
if isinstance(arg, dict):
kwargs.update(arg)
else:
raise ApiTypeError(
"Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
args,
self.__class__.__name__,
),
path_to_item=_path_to_item,
valid_classes=(self.__class__,),
)
self._data_store = {}
self._check_type = _check_type
self._spec_property_naming = _spec_property_naming
self._path_to_item = _path_to_item
self._configuration = _configuration
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
for var_name, var_value in kwargs.items():
if var_name not in self.attribute_map and \
self._configuration is not None and \
self._configuration.discard_unknown_keys and \
self.additional_properties_type is None:
# discard variable.
continue
setattr(self, var_name, var_value)
return self
required_properties = set([
'_data_store',
'_check_type',
'_spec_property_naming',
'_path_to_item',
'_configuration',
'_visited_composed_classes',
])
@convert_js_args_to_python_args
def __init__(self, *args, **kwargs): # noqa: E501
"""AddKeyRequest - a model defined in OpenAPI
Keyword Args:
_check_type (bool): if True, values for parameters in openapi_types
will be type checked and a TypeError will be
raised if the wrong type is input.
Defaults to True
_path_to_item (tuple/list): This is a list of keys or values to
drill down to the model in received_data
when deserializing a response
_spec_property_naming (bool): True if the variable names in the input data
are serialized names, as specified in the OpenAPI document.
False if the variable names in the input data
are pythonic names, e.g. snake case (default)
_configuration (Configuration): the instance to use when
deserializing a file_type parameter.
If passed, type conversion is attempted
If omitted no type conversion is done.
_visited_composed_classes (tuple): This stores a tuple of
classes that we have traveled through so that
if we see that class again we will not use its
discriminator again.
When traveling through a discriminator, the
composed schema that is
is traveled through is added to this set.
For example if Animal has a discriminator
petType and we pass in "Dog", and the class Dog
allOf includes Animal, we move through Animal
once using the discriminator, and pick Dog.
Then in Dog, we will make an instance of the
Animal class but this time we won't travel
through its discriminator because we passed in
_visited_composed_classes = (Animal,)
name (str): [optional] # noqa: E501
"""
_check_type = kwargs.pop('_check_type', True)
_spec_property_naming = kwargs.pop('_spec_property_naming', False)
_path_to_item = kwargs.pop('_path_to_item', ())
_configuration = kwargs.pop('_configuration', None)
_visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
if args:
for arg in args:
if isinstance(arg, dict):
kwargs.update(arg)
else:
raise ApiTypeError(
"Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
args,
self.__class__.__name__,
),
path_to_item=_path_to_item,
valid_classes=(self.__class__,),
)
self._data_store = {}
self._check_type = _check_type
self._spec_property_naming = _spec_property_naming
self._path_to_item = _path_to_item
self._configuration = _configuration
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
for var_name, var_value in kwargs.items():
if var_name not in self.attribute_map and \
self._configuration is not None and \
self._configuration.discard_unknown_keys and \
self.additional_properties_type is None:
# discard variable.
continue
setattr(self, var_name, var_value)
if var_name in self.read_only_vars:
raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
f"class with read only attributes.")

View file

@ -0,0 +1,267 @@
"""
Garage Administration API v0+garage-v0.7.3
Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501
The version of the OpenAPI document: v0.7.3
Generated by: https://openapi-generator.tech
"""
import re # noqa: F401
import sys # noqa: F401
from garage_admin_sdk.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,
ModelNormal,
ModelSimple,
cached_property,
change_keys_js_to_python,
convert_js_args_to_python_args,
date,
datetime,
file_type,
none_type,
validate_get_composed_info,
OpenApiModel
)
from garage_admin_sdk.exceptions import ApiAttributeError
class AddNode200ResponseInner(ModelNormal):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
Do not edit the class manually.
Attributes:
allowed_values (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
with a capitalized key describing the allowed value and an allowed
value. These dicts store the allowed enum values.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
discriminator_value_class_map (dict): A dict to go from the discriminator
variable value to the discriminator class name.
validations (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
that stores validations for max_length, min_length, max_items,
min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
inclusive_minimum, and regex.
additional_properties_type (tuple): A tuple of classes accepted
as additional properties values.
"""
allowed_values = {
}
validations = {
}
@cached_property
def additional_properties_type():
"""
This must be a method because a model may have properties that are
of type self, this must run after the class is loaded
"""
return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
@cached_property
def openapi_types():
"""
This must be a method because a model may have properties that are
of type self, this must run after the class is loaded
Returns
openapi_types (dict): The key is attribute name
and the value is attribute type.
"""
return {
'success': (bool,), # noqa: E501
'error': (str,), # noqa: E501
}
@cached_property
def discriminator():
return None
attribute_map = {
'success': 'success', # noqa: E501
'error': 'error', # noqa: E501
}
read_only_vars = {
}
_composed_schemas = {}
@classmethod
@convert_js_args_to_python_args
def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
"""AddNode200ResponseInner - a model defined in OpenAPI
Keyword Args:
_check_type (bool): if True, values for parameters in openapi_types
will be type checked and a TypeError will be
raised if the wrong type is input.
Defaults to True
_path_to_item (tuple/list): This is a list of keys or values to
drill down to the model in received_data
when deserializing a response
_spec_property_naming (bool): True if the variable names in the input data
are serialized names, as specified in the OpenAPI document.
False if the variable names in the input data
are pythonic names, e.g. snake case (default)
_configuration (Configuration): the instance to use when
deserializing a file_type parameter.
If passed, type conversion is attempted
If omitted no type conversion is done.
_visited_composed_classes (tuple): This stores a tuple of
classes that we have traveled through so that
if we see that class again we will not use its
discriminator again.
When traveling through a discriminator, the
composed schema that is
is traveled through is added to this set.
For example if Animal has a discriminator
petType and we pass in "Dog", and the class Dog
allOf includes Animal, we move through Animal
once using the discriminator, and pick Dog.
Then in Dog, we will make an instance of the
Animal class but this time we won't travel
through its discriminator because we passed in
_visited_composed_classes = (Animal,)
success (bool): [optional] # noqa: E501
error (str): [optional] # noqa: E501
"""
_check_type = kwargs.pop('_check_type', True)
_spec_property_naming = kwargs.pop('_spec_property_naming', True)
_path_to_item = kwargs.pop('_path_to_item', ())
_configuration = kwargs.pop('_configuration', None)
_visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
self = super(OpenApiModel, cls).__new__(cls)
if args:
for arg in args:
if isinstance(arg, dict):
kwargs.update(arg)
else:
raise ApiTypeError(
"Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
args,
self.__class__.__name__,
),
path_to_item=_path_to_item,
valid_classes=(self.__class__,),
)
self._data_store = {}
self._check_type = _check_type
self._spec_property_naming = _spec_property_naming
self._path_to_item = _path_to_item
self._configuration = _configuration
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
for var_name, var_value in kwargs.items():
if var_name not in self.attribute_map and \
self._configuration is not None and \
self._configuration.discard_unknown_keys and \
self.additional_properties_type is None:
# discard variable.
continue
setattr(self, var_name, var_value)
return self
required_properties = set([
'_data_store',
'_check_type',
'_spec_property_naming',
'_path_to_item',
'_configuration',
'_visited_composed_classes',
])
@convert_js_args_to_python_args
def __init__(self, *args, **kwargs): # noqa: E501
"""AddNode200ResponseInner - a model defined in OpenAPI
Keyword Args:
_check_type (bool): if True, values for parameters in openapi_types
will be type checked and a TypeError will be
raised if the wrong type is input.
Defaults to True
_path_to_item (tuple/list): This is a list of keys or values to
drill down to the model in received_data
when deserializing a response
_spec_property_naming (bool): True if the variable names in the input data
are serialized names, as specified in the OpenAPI document.
False if the variable names in the input data
are pythonic names, e.g. snake case (default)
_configuration (Configuration): the instance to use when
deserializing a file_type parameter.
If passed, type conversion is attempted
If omitted no type conversion is done.
_visited_composed_classes (tuple): This stores a tuple of
classes that we have traveled through so that
if we see that class again we will not use its
discriminator again.
When traveling through a discriminator, the
composed schema that is
is traveled through is added to this set.
For example if Animal has a discriminator
petType and we pass in "Dog", and the class Dog
allOf includes Animal, we move through Animal
once using the discriminator, and pick Dog.
Then in Dog, we will make an instance of the
Animal class but this time we won't travel
through its discriminator because we passed in
_visited_composed_classes = (Animal,)
success (bool): [optional] # noqa: E501
error (str): [optional] # noqa: E501
"""
_check_type = kwargs.pop('_check_type', True)
_spec_property_naming = kwargs.pop('_spec_property_naming', False)
_path_to_item = kwargs.pop('_path_to_item', ())
_configuration = kwargs.pop('_configuration', None)
_visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
if args:
for arg in args:
if isinstance(arg, dict):
kwargs.update(arg)
else:
raise ApiTypeError(
"Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
args,
self.__class__.__name__,
),
path_to_item=_path_to_item,
valid_classes=(self.__class__,),
)
self._data_store = {}
self._check_type = _check_type
self._spec_property_naming = _spec_property_naming
self._path_to_item = _path_to_item
self._configuration = _configuration
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
for var_name, var_value in kwargs.items():
if var_name not in self.attribute_map and \
self._configuration is not None and \
self._configuration.discard_unknown_keys and \
self.additional_properties_type is None:
# discard variable.
continue
setattr(self, var_name, var_value)
if var_name in self.read_only_vars:
raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
f"class with read only attributes.")

View file

@ -0,0 +1,283 @@
"""
Garage Administration API v0+garage-v0.7.3
Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501
The version of the OpenAPI document: v0.7.3
Generated by: https://openapi-generator.tech
"""
import re # noqa: F401
import sys # noqa: F401
from garage_admin_sdk.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,
ModelNormal,
ModelSimple,
cached_property,
change_keys_js_to_python,
convert_js_args_to_python_args,
date,
datetime,
file_type,
none_type,
validate_get_composed_info,
OpenApiModel
)
from garage_admin_sdk.exceptions import ApiAttributeError
def lazy_import():
from garage_admin_sdk.model.cluster_layout import ClusterLayout
from garage_admin_sdk.model.node_network_info import NodeNetworkInfo
globals()['ClusterLayout'] = ClusterLayout
globals()['NodeNetworkInfo'] = NodeNetworkInfo
class GetNodes200Response(ModelNormal):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
Do not edit the class manually.
Attributes:
allowed_values (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
with a capitalized key describing the allowed value and an allowed
value. These dicts store the allowed enum values.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
discriminator_value_class_map (dict): A dict to go from the discriminator
variable value to the discriminator class name.
validations (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
that stores validations for max_length, min_length, max_items,
min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
inclusive_minimum, and regex.
additional_properties_type (tuple): A tuple of classes accepted
as additional properties values.
"""
allowed_values = {
}
validations = {
}
@cached_property
def additional_properties_type():
"""
This must be a method because a model may have properties that are
of type self, this must run after the class is loaded
"""
lazy_import()
return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
@cached_property
def openapi_types():
"""
This must be a method because a model may have properties that are
of type self, this must run after the class is loaded
Returns
openapi_types (dict): The key is attribute name
and the value is attribute type.
"""
lazy_import()
return {
'node': (str,), # noqa: E501
'garage_version': (str,), # noqa: E501
'known_nodes': ({str: (NodeNetworkInfo,)},), # noqa: E501
'layout': (ClusterLayout,), # noqa: E501
}
@cached_property
def discriminator():
return None
attribute_map = {
'node': 'node', # noqa: E501
'garage_version': 'garage_version', # noqa: E501
'known_nodes': 'knownNodes', # noqa: E501
'layout': 'layout', # noqa: E501
}
read_only_vars = {
}
_composed_schemas = {}
@classmethod
@convert_js_args_to_python_args
def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
"""GetNodes200Response - a model defined in OpenAPI
Keyword Args:
_check_type (bool): if True, values for parameters in openapi_types
will be type checked and a TypeError will be
raised if the wrong type is input.
Defaults to True
_path_to_item (tuple/list): This is a list of keys or values to
drill down to the model in received_data
when deserializing a response
_spec_property_naming (bool): True if the variable names in the input data
are serialized names, as specified in the OpenAPI document.
False if the variable names in the input data
are pythonic names, e.g. snake case (default)
_configuration (Configuration): the instance to use when
deserializing a file_type parameter.
If passed, type conversion is attempted
If omitted no type conversion is done.
_visited_composed_classes (tuple): This stores a tuple of
classes that we have traveled through so that
if we see that class again we will not use its
discriminator again.
When traveling through a discriminator, the
composed schema that is
is traveled through is added to this set.
For example if Animal has a discriminator
petType and we pass in "Dog", and the class Dog
allOf includes Animal, we move through Animal
once using the discriminator, and pick Dog.
Then in Dog, we will make an instance of the
Animal class but this time we won't travel
through its discriminator because we passed in
_visited_composed_classes = (Animal,)
node (str): [optional] # noqa: E501
garage_version (str): [optional] # noqa: E501
known_nodes ({str: (NodeNetworkInfo,)}): [optional] # noqa: E501
layout (ClusterLayout): [optional] # noqa: E501
"""
_check_type = kwargs.pop('_check_type', True)
_spec_property_naming = kwargs.pop('_spec_property_naming', True)
_path_to_item = kwargs.pop('_path_to_item', ())
_configuration = kwargs.pop('_configuration', None)
_visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
self = super(OpenApiModel, cls).__new__(cls)
if args:
for arg in args:
if isinstance(arg, dict):
kwargs.update(arg)
else:
raise ApiTypeError(
"Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
args,
self.__class__.__name__,
),
path_to_item=_path_to_item,
valid_classes=(self.__class__,),
)
self._data_store = {}
self._check_type = _check_type
self._spec_property_naming = _spec_property_naming
self._path_to_item = _path_to_item
self._configuration = _configuration
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
for var_name, var_value in kwargs.items():
if var_name not in self.attribute_map and \
self._configuration is not None and \
self._configuration.discard_unknown_keys and \
self.additional_properties_type is None:
# discard variable.
continue
setattr(self, var_name, var_value)
return self
required_properties = set([
'_data_store',
'_check_type',
'_spec_property_naming',
'_path_to_item',
'_configuration',
'_visited_composed_classes',
])
@convert_js_args_to_python_args
def __init__(self, *args, **kwargs): # noqa: E501
"""GetNodes200Response - a model defined in OpenAPI
Keyword Args:
_check_type (bool): if True, values for parameters in openapi_types
will be type checked and a TypeError will be
raised if the wrong type is input.
Defaults to True
_path_to_item (tuple/list): This is a list of keys or values to
drill down to the model in received_data
when deserializing a response
_spec_property_naming (bool): True if the variable names in the input data
are serialized names, as specified in the OpenAPI document.
False if the variable names in the input data
are pythonic names, e.g. snake case (default)
_configuration (Configuration): the instance to use when
deserializing a file_type parameter.
If passed, type conversion is attempted
If omitted no type conversion is done.
_visited_composed_classes (tuple): This stores a tuple of
classes that we have traveled through so that
if we see that class again we will not use its
discriminator again.
When traveling through a discriminator, the
composed schema that is
is traveled through is added to this set.
For example if Animal has a discriminator
petType and we pass in "Dog", and the class Dog
allOf includes Animal, we move through Animal
once using the discriminator, and pick Dog.
Then in Dog, we will make an instance of the
Animal class but this time we won't travel
through its discriminator because we passed in
_visited_composed_classes = (Animal,)
node (str): [optional] # noqa: E501
garage_version (str): [optional] # noqa: E501
known_nodes ({str: (NodeNetworkInfo,)}): [optional] # noqa: E501
layout (ClusterLayout): [optional] # noqa: E501
"""
_check_type = kwargs.pop('_check_type', True)
_spec_property_naming = kwargs.pop('_spec_property_naming', False)
_path_to_item = kwargs.pop('_path_to_item', ())
_configuration = kwargs.pop('_configuration', None)
_visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
if args:
for arg in args:
if isinstance(arg, dict):
kwargs.update(arg)
else:
raise ApiTypeError(
"Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
args,
self.__class__.__name__,
),
path_to_item=_path_to_item,
valid_classes=(self.__class__,),
)
self._data_store = {}
self._check_type = _check_type
self._spec_property_naming = _spec_property_naming
self._path_to_item = _path_to_item
self._configuration = _configuration
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
for var_name, var_value in kwargs.items():
if var_name not in self.attribute_map and \
self._configuration is not None and \
self._configuration.discard_unknown_keys and \
self.additional_properties_type is None:
# discard variable.
continue
setattr(self, var_name, var_value)
if var_name in self.read_only_vars:
raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
f"class with read only attributes.")

View file

@ -0,0 +1,271 @@
"""
Garage Administration API v0+garage-v0.7.3
Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501
The version of the OpenAPI document: v0.7.3
Generated by: https://openapi-generator.tech
"""
import re # noqa: F401
import sys # noqa: F401
from garage_admin_sdk.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,
ModelNormal,
ModelSimple,
cached_property,
change_keys_js_to_python,
convert_js_args_to_python_args,
date,
datetime,
file_type,
none_type,
validate_get_composed_info,
OpenApiModel
)
from garage_admin_sdk.exceptions import ApiAttributeError
class ImportKeyRequest(ModelNormal):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
Do not edit the class manually.
Attributes:
allowed_values (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
with a capitalized key describing the allowed value and an allowed
value. These dicts store the allowed enum values.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
discriminator_value_class_map (dict): A dict to go from the discriminator
variable value to the discriminator class name.
validations (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
that stores validations for max_length, min_length, max_items,
min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
inclusive_minimum, and regex.
additional_properties_type (tuple): A tuple of classes accepted
as additional properties values.
"""
allowed_values = {
}
validations = {
}
@cached_property
def additional_properties_type():
"""
This must be a method because a model may have properties that are
of type self, this must run after the class is loaded
"""
return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
@cached_property
def openapi_types():
"""
This must be a method because a model may have properties that are
of type self, this must run after the class is loaded
Returns
openapi_types (dict): The key is attribute name
and the value is attribute type.
"""
return {
'name': (str,), # noqa: E501
'access_key_id': (str,), # noqa: E501
'secret_access_key': (str,), # noqa: E501
}
@cached_property
def discriminator():
return None
attribute_map = {
'name': 'name', # noqa: E501
'access_key_id': 'accessKeyId', # noqa: E501
'secret_access_key': 'secretAccessKey', # noqa: E501
}
read_only_vars = {
}
_composed_schemas = {}
@classmethod
@convert_js_args_to_python_args
def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
"""ImportKeyRequest - a model defined in OpenAPI
Keyword Args:
_check_type (bool): if True, values for parameters in openapi_types
will be type checked and a TypeError will be
raised if the wrong type is input.
Defaults to True
_path_to_item (tuple/list): This is a list of keys or values to
drill down to the model in received_data
when deserializing a response
_spec_property_naming (bool): True if the variable names in the input data
are serialized names, as specified in the OpenAPI document.
False if the variable names in the input data
are pythonic names, e.g. snake case (default)
_configuration (Configuration): the instance to use when
deserializing a file_type parameter.
If passed, type conversion is attempted
If omitted no type conversion is done.
_visited_composed_classes (tuple): This stores a tuple of
classes that we have traveled through so that
if we see that class again we will not use its
discriminator again.
When traveling through a discriminator, the
composed schema that is
is traveled through is added to this set.
For example if Animal has a discriminator
petType and we pass in "Dog", and the class Dog
allOf includes Animal, we move through Animal
once using the discriminator, and pick Dog.
Then in Dog, we will make an instance of the
Animal class but this time we won't travel
through its discriminator because we passed in
_visited_composed_classes = (Animal,)
name (str): [optional] # noqa: E501
access_key_id (str): [optional] # noqa: E501
secret_access_key (str): [optional] # noqa: E501
"""
_check_type = kwargs.pop('_check_type', True)
_spec_property_naming = kwargs.pop('_spec_property_naming', True)
_path_to_item = kwargs.pop('_path_to_item', ())
_configuration = kwargs.pop('_configuration', None)
_visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
self = super(OpenApiModel, cls).__new__(cls)
if args:
for arg in args:
if isinstance(arg, dict):
kwargs.update(arg)
else:
raise ApiTypeError(
"Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
args,
self.__class__.__name__,
),
path_to_item=_path_to_item,
valid_classes=(self.__class__,),
)
self._data_store = {}
self._check_type = _check_type
self._spec_property_naming = _spec_property_naming
self._path_to_item = _path_to_item
self._configuration = _configuration
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
for var_name, var_value in kwargs.items():
if var_name not in self.attribute_map and \
self._configuration is not None and \
self._configuration.discard_unknown_keys and \
self.additional_properties_type is None:
# discard variable.
continue
setattr(self, var_name, var_value)
return self
required_properties = set([
'_data_store',
'_check_type',
'_spec_property_naming',
'_path_to_item',
'_configuration',
'_visited_composed_classes',
])
@convert_js_args_to_python_args
def __init__(self, *args, **kwargs): # noqa: E501
"""ImportKeyRequest - a model defined in OpenAPI
Keyword Args:
_check_type (bool): if True, values for parameters in openapi_types
will be type checked and a TypeError will be
raised if the wrong type is input.
Defaults to True
_path_to_item (tuple/list): This is a list of keys or values to
drill down to the model in received_data
when deserializing a response
_spec_property_naming (bool): True if the variable names in the input data
are serialized names, as specified in the OpenAPI document.
False if the variable names in the input data
are pythonic names, e.g. snake case (default)
_configuration (Configuration): the instance to use when
deserializing a file_type parameter.
If passed, type conversion is attempted
If omitted no type conversion is done.
_visited_composed_classes (tuple): This stores a tuple of
classes that we have traveled through so that
if we see that class again we will not use its
discriminator again.
When traveling through a discriminator, the
composed schema that is
is traveled through is added to this set.
For example if Animal has a discriminator
petType and we pass in "Dog", and the class Dog
allOf includes Animal, we move through Animal
once using the discriminator, and pick Dog.
Then in Dog, we will make an instance of the
Animal class but this time we won't travel
through its discriminator because we passed in
_visited_composed_classes = (Animal,)
name (str): [optional] # noqa: E501
access_key_id (str): [optional] # noqa: E501
secret_access_key (str): [optional] # noqa: E501
"""
_check_type = kwargs.pop('_check_type', True)
_spec_property_naming = kwargs.pop('_spec_property_naming', False)
_path_to_item = kwargs.pop('_path_to_item', ())
_configuration = kwargs.pop('_configuration', None)
_visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
if args:
for arg in args:
if isinstance(arg, dict):
kwargs.update(arg)
else:
raise ApiTypeError(
"Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
args,
self.__class__.__name__,
),
path_to_item=_path_to_item,
valid_classes=(self.__class__,),
)
self._data_store = {}
self._check_type = _check_type
self._spec_property_naming = _spec_property_naming
self._path_to_item = _path_to_item
self._configuration = _configuration
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
for var_name, var_value in kwargs.items():
if var_name not in self.attribute_map and \
self._configuration is not None and \
self._configuration.discard_unknown_keys and \
self.additional_properties_type is None:
# discard variable.
continue
setattr(self, var_name, var_value)
if var_name in self.read_only_vars:
raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
f"class with read only attributes.")

View file

@ -0,0 +1,279 @@
"""
Garage Administration API v0+garage-v0.7.3
Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501
The version of the OpenAPI document: v0.7.3
Generated by: https://openapi-generator.tech
"""
import re # noqa: F401
import sys # noqa: F401
from garage_admin_sdk.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,
ModelNormal,
ModelSimple,
cached_property,
change_keys_js_to_python,
convert_js_args_to_python_args,
date,
datetime,
file_type,
none_type,
validate_get_composed_info,
OpenApiModel
)
from garage_admin_sdk.exceptions import ApiAttributeError
def lazy_import():
from garage_admin_sdk.model.update_key_request_allow import UpdateKeyRequestAllow
from garage_admin_sdk.model.update_key_request_deny import UpdateKeyRequestDeny
globals()['UpdateKeyRequestAllow'] = UpdateKeyRequestAllow
globals()['UpdateKeyRequestDeny'] = UpdateKeyRequestDeny
class UpdateKeyRequest(ModelNormal):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
Do not edit the class manually.
Attributes:
allowed_values (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
with a capitalized key describing the allowed value and an allowed
value. These dicts store the allowed enum values.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
discriminator_value_class_map (dict): A dict to go from the discriminator
variable value to the discriminator class name.
validations (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
that stores validations for max_length, min_length, max_items,
min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
inclusive_minimum, and regex.
additional_properties_type (tuple): A tuple of classes accepted
as additional properties values.
"""
allowed_values = {
}
validations = {
}
@cached_property
def additional_properties_type():
"""
This must be a method because a model may have properties that are
of type self, this must run after the class is loaded
"""
lazy_import()
return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
@cached_property
def openapi_types():
"""
This must be a method because a model may have properties that are
of type self, this must run after the class is loaded
Returns
openapi_types (dict): The key is attribute name
and the value is attribute type.
"""
lazy_import()
return {
'name': (str,), # noqa: E501
'allow': (UpdateKeyRequestAllow,), # noqa: E501
'deny': (UpdateKeyRequestDeny,), # noqa: E501
}
@cached_property
def discriminator():
return None
attribute_map = {
'name': 'name', # noqa: E501
'allow': 'allow', # noqa: E501
'deny': 'deny', # noqa: E501
}
read_only_vars = {
}
_composed_schemas = {}
@classmethod
@convert_js_args_to_python_args
def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
"""UpdateKeyRequest - a model defined in OpenAPI
Keyword Args:
_check_type (bool): if True, values for parameters in openapi_types
will be type checked and a TypeError will be
raised if the wrong type is input.
Defaults to True
_path_to_item (tuple/list): This is a list of keys or values to
drill down to the model in received_data
when deserializing a response
_spec_property_naming (bool): True if the variable names in the input data
are serialized names, as specified in the OpenAPI document.
False if the variable names in the input data
are pythonic names, e.g. snake case (default)
_configuration (Configuration): the instance to use when
deserializing a file_type parameter.
If passed, type conversion is attempted
If omitted no type conversion is done.
_visited_composed_classes (tuple): This stores a tuple of
classes that we have traveled through so that
if we see that class again we will not use its
discriminator again.
When traveling through a discriminator, the
composed schema that is
is traveled through is added to this set.
For example if Animal has a discriminator
petType and we pass in "Dog", and the class Dog
allOf includes Animal, we move through Animal
once using the discriminator, and pick Dog.
Then in Dog, we will make an instance of the
Animal class but this time we won't travel
through its discriminator because we passed in
_visited_composed_classes = (Animal,)
name (str): [optional] # noqa: E501
allow (UpdateKeyRequestAllow): [optional] # noqa: E501
deny (UpdateKeyRequestDeny): [optional] # noqa: E501
"""
_check_type = kwargs.pop('_check_type', True)
_spec_property_naming = kwargs.pop('_spec_property_naming', True)
_path_to_item = kwargs.pop('_path_to_item', ())
_configuration = kwargs.pop('_configuration', None)
_visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
self = super(OpenApiModel, cls).__new__(cls)
if args:
for arg in args:
if isinstance(arg, dict):
kwargs.update(arg)
else:
raise ApiTypeError(
"Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
args,
self.__class__.__name__,
),
path_to_item=_path_to_item,
valid_classes=(self.__class__,),
)
self._data_store = {}
self._check_type = _check_type
self._spec_property_naming = _spec_property_naming
self._path_to_item = _path_to_item
self._configuration = _configuration
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
for var_name, var_value in kwargs.items():
if var_name not in self.attribute_map and \
self._configuration is not None and \
self._configuration.discard_unknown_keys and \
self.additional_properties_type is None:
# discard variable.
continue
setattr(self, var_name, var_value)
return self
required_properties = set([
'_data_store',
'_check_type',
'_spec_property_naming',
'_path_to_item',
'_configuration',
'_visited_composed_classes',
])
@convert_js_args_to_python_args
def __init__(self, *args, **kwargs): # noqa: E501
"""UpdateKeyRequest - a model defined in OpenAPI
Keyword Args:
_check_type (bool): if True, values for parameters in openapi_types
will be type checked and a TypeError will be
raised if the wrong type is input.
Defaults to True
_path_to_item (tuple/list): This is a list of keys or values to
drill down to the model in received_data
when deserializing a response
_spec_property_naming (bool): True if the variable names in the input data
are serialized names, as specified in the OpenAPI document.
False if the variable names in the input data
are pythonic names, e.g. snake case (default)
_configuration (Configuration): the instance to use when
deserializing a file_type parameter.
If passed, type conversion is attempted
If omitted no type conversion is done.
_visited_composed_classes (tuple): This stores a tuple of
classes that we have traveled through so that
if we see that class again we will not use its
discriminator again.
When traveling through a discriminator, the
composed schema that is
is traveled through is added to this set.
For example if Animal has a discriminator
petType and we pass in "Dog", and the class Dog
allOf includes Animal, we move through Animal
once using the discriminator, and pick Dog.
Then in Dog, we will make an instance of the
Animal class but this time we won't travel
through its discriminator because we passed in
_visited_composed_classes = (Animal,)
name (str): [optional] # noqa: E501
allow (UpdateKeyRequestAllow): [optional] # noqa: E501
deny (UpdateKeyRequestDeny): [optional] # noqa: E501
"""
_check_type = kwargs.pop('_check_type', True)
_spec_property_naming = kwargs.pop('_spec_property_naming', False)
_path_to_item = kwargs.pop('_path_to_item', ())
_configuration = kwargs.pop('_configuration', None)
_visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
if args:
for arg in args:
if isinstance(arg, dict):
kwargs.update(arg)
else:
raise ApiTypeError(
"Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
args,
self.__class__.__name__,
),
path_to_item=_path_to_item,
valid_classes=(self.__class__,),
)
self._data_store = {}
self._check_type = _check_type
self._spec_property_naming = _spec_property_naming
self._path_to_item = _path_to_item
self._configuration = _configuration
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
for var_name, var_value in kwargs.items():
if var_name not in self.attribute_map and \
self._configuration is not None and \
self._configuration.discard_unknown_keys and \
self.additional_properties_type is None:
# discard variable.
continue
setattr(self, var_name, var_value)
if var_name in self.read_only_vars:
raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
f"class with read only attributes.")

View file

@ -0,0 +1,263 @@
"""
Garage Administration API v0+garage-v0.7.3
Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501
The version of the OpenAPI document: v0.7.3
Generated by: https://openapi-generator.tech
"""
import re # noqa: F401
import sys # noqa: F401
from garage_admin_sdk.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,
ModelNormal,
ModelSimple,
cached_property,
change_keys_js_to_python,
convert_js_args_to_python_args,
date,
datetime,
file_type,
none_type,
validate_get_composed_info,
OpenApiModel
)
from garage_admin_sdk.exceptions import ApiAttributeError
class UpdateKeyRequestAllow(ModelNormal):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
Do not edit the class manually.
Attributes:
allowed_values (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
with a capitalized key describing the allowed value and an allowed
value. These dicts store the allowed enum values.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
discriminator_value_class_map (dict): A dict to go from the discriminator
variable value to the discriminator class name.
validations (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
that stores validations for max_length, min_length, max_items,
min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
inclusive_minimum, and regex.
additional_properties_type (tuple): A tuple of classes accepted
as additional properties values.
"""
allowed_values = {
}
validations = {
}
@cached_property
def additional_properties_type():
"""
This must be a method because a model may have properties that are
of type self, this must run after the class is loaded
"""
return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
@cached_property
def openapi_types():
"""
This must be a method because a model may have properties that are
of type self, this must run after the class is loaded
Returns
openapi_types (dict): The key is attribute name
and the value is attribute type.
"""
return {
'create_bucket': (bool,), # noqa: E501
}
@cached_property
def discriminator():
return None
attribute_map = {
'create_bucket': 'createBucket', # noqa: E501
}
read_only_vars = {
}
_composed_schemas = {}
@classmethod
@convert_js_args_to_python_args
def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
"""UpdateKeyRequestAllow - a model defined in OpenAPI
Keyword Args:
_check_type (bool): if True, values for parameters in openapi_types
will be type checked and a TypeError will be
raised if the wrong type is input.
Defaults to True
_path_to_item (tuple/list): This is a list of keys or values to
drill down to the model in received_data
when deserializing a response
_spec_property_naming (bool): True if the variable names in the input data
are serialized names, as specified in the OpenAPI document.
False if the variable names in the input data
are pythonic names, e.g. snake case (default)
_configuration (Configuration): the instance to use when
deserializing a file_type parameter.
If passed, type conversion is attempted
If omitted no type conversion is done.
_visited_composed_classes (tuple): This stores a tuple of
classes that we have traveled through so that
if we see that class again we will not use its
discriminator again.
When traveling through a discriminator, the
composed schema that is
is traveled through is added to this set.
For example if Animal has a discriminator
petType and we pass in "Dog", and the class Dog
allOf includes Animal, we move through Animal
once using the discriminator, and pick Dog.
Then in Dog, we will make an instance of the
Animal class but this time we won't travel
through its discriminator because we passed in
_visited_composed_classes = (Animal,)
create_bucket (bool): [optional] # noqa: E501
"""
_check_type = kwargs.pop('_check_type', True)
_spec_property_naming = kwargs.pop('_spec_property_naming', True)
_path_to_item = kwargs.pop('_path_to_item', ())
_configuration = kwargs.pop('_configuration', None)
_visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
self = super(OpenApiModel, cls).__new__(cls)
if args:
for arg in args:
if isinstance(arg, dict):
kwargs.update(arg)
else:
raise ApiTypeError(
"Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
args,
self.__class__.__name__,
),
path_to_item=_path_to_item,
valid_classes=(self.__class__,),
)
self._data_store = {}
self._check_type = _check_type
self._spec_property_naming = _spec_property_naming
self._path_to_item = _path_to_item
self._configuration = _configuration
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
for var_name, var_value in kwargs.items():
if var_name not in self.attribute_map and \
self._configuration is not None and \
self._configuration.discard_unknown_keys and \
self.additional_properties_type is None:
# discard variable.
continue
setattr(self, var_name, var_value)
return self
required_properties = set([
'_data_store',
'_check_type',
'_spec_property_naming',
'_path_to_item',
'_configuration',
'_visited_composed_classes',
])
@convert_js_args_to_python_args
def __init__(self, *args, **kwargs): # noqa: E501
"""UpdateKeyRequestAllow - a model defined in OpenAPI
Keyword Args:
_check_type (bool): if True, values for parameters in openapi_types
will be type checked and a TypeError will be
raised if the wrong type is input.
Defaults to True
_path_to_item (tuple/list): This is a list of keys or values to
drill down to the model in received_data
when deserializing a response
_spec_property_naming (bool): True if the variable names in the input data
are serialized names, as specified in the OpenAPI document.
False if the variable names in the input data
are pythonic names, e.g. snake case (default)
_configuration (Configuration): the instance to use when
deserializing a file_type parameter.
If passed, type conversion is attempted
If omitted no type conversion is done.
_visited_composed_classes (tuple): This stores a tuple of
classes that we have traveled through so that
if we see that class again we will not use its
discriminator again.
When traveling through a discriminator, the
composed schema that is
is traveled through is added to this set.
For example if Animal has a discriminator
petType and we pass in "Dog", and the class Dog
allOf includes Animal, we move through Animal
once using the discriminator, and pick Dog.
Then in Dog, we will make an instance of the
Animal class but this time we won't travel
through its discriminator because we passed in
_visited_composed_classes = (Animal,)
create_bucket (bool): [optional] # noqa: E501
"""
_check_type = kwargs.pop('_check_type', True)
_spec_property_naming = kwargs.pop('_spec_property_naming', False)
_path_to_item = kwargs.pop('_path_to_item', ())
_configuration = kwargs.pop('_configuration', None)
_visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
if args:
for arg in args:
if isinstance(arg, dict):
kwargs.update(arg)
else:
raise ApiTypeError(
"Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
args,
self.__class__.__name__,
),
path_to_item=_path_to_item,
valid_classes=(self.__class__,),
)
self._data_store = {}
self._check_type = _check_type
self._spec_property_naming = _spec_property_naming
self._path_to_item = _path_to_item
self._configuration = _configuration
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
for var_name, var_value in kwargs.items():
if var_name not in self.attribute_map and \
self._configuration is not None and \
self._configuration.discard_unknown_keys and \
self.additional_properties_type is None:
# discard variable.
continue
setattr(self, var_name, var_value)
if var_name in self.read_only_vars:
raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
f"class with read only attributes.")

View file

@ -0,0 +1,263 @@
"""
Garage Administration API v0+garage-v0.7.3
Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501
The version of the OpenAPI document: v0.7.3
Generated by: https://openapi-generator.tech
"""
import re # noqa: F401
import sys # noqa: F401
from garage_admin_sdk.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,
ModelNormal,
ModelSimple,
cached_property,
change_keys_js_to_python,
convert_js_args_to_python_args,
date,
datetime,
file_type,
none_type,
validate_get_composed_info,
OpenApiModel
)
from garage_admin_sdk.exceptions import ApiAttributeError
class UpdateKeyRequestDeny(ModelNormal):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
Do not edit the class manually.
Attributes:
allowed_values (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
with a capitalized key describing the allowed value and an allowed
value. These dicts store the allowed enum values.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
discriminator_value_class_map (dict): A dict to go from the discriminator
variable value to the discriminator class name.
validations (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
that stores validations for max_length, min_length, max_items,
min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
inclusive_minimum, and regex.
additional_properties_type (tuple): A tuple of classes accepted
as additional properties values.
"""
allowed_values = {
}
validations = {
}
@cached_property
def additional_properties_type():
"""
This must be a method because a model may have properties that are
of type self, this must run after the class is loaded
"""
return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
@cached_property
def openapi_types():
"""
This must be a method because a model may have properties that are
of type self, this must run after the class is loaded
Returns
openapi_types (dict): The key is attribute name
and the value is attribute type.
"""
return {
'create_bucket': (bool,), # noqa: E501
}
@cached_property
def discriminator():
return None
attribute_map = {
'create_bucket': 'createBucket', # noqa: E501
}
read_only_vars = {
}
_composed_schemas = {}
@classmethod
@convert_js_args_to_python_args
def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
"""UpdateKeyRequestDeny - a model defined in OpenAPI
Keyword Args:
_check_type (bool): if True, values for parameters in openapi_types
will be type checked and a TypeError will be
raised if the wrong type is input.
Defaults to True
_path_to_item (tuple/list): This is a list of keys or values to
drill down to the model in received_data
when deserializing a response
_spec_property_naming (bool): True if the variable names in the input data
are serialized names, as specified in the OpenAPI document.
False if the variable names in the input data
are pythonic names, e.g. snake case (default)
_configuration (Configuration): the instance to use when
deserializing a file_type parameter.
If passed, type conversion is attempted
If omitted no type conversion is done.
_visited_composed_classes (tuple): This stores a tuple of
classes that we have traveled through so that
if we see that class again we will not use its
discriminator again.
When traveling through a discriminator, the
composed schema that is
is traveled through is added to this set.
For example if Animal has a discriminator
petType and we pass in "Dog", and the class Dog
allOf includes Animal, we move through Animal
once using the discriminator, and pick Dog.
Then in Dog, we will make an instance of the
Animal class but this time we won't travel
through its discriminator because we passed in
_visited_composed_classes = (Animal,)
create_bucket (bool): [optional] # noqa: E501
"""
_check_type = kwargs.pop('_check_type', True)
_spec_property_naming = kwargs.pop('_spec_property_naming', True)
_path_to_item = kwargs.pop('_path_to_item', ())
_configuration = kwargs.pop('_configuration', None)
_visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
self = super(OpenApiModel, cls).__new__(cls)
if args:
for arg in args:
if isinstance(arg, dict):
kwargs.update(arg)
else:
raise ApiTypeError(
"Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
args,
self.__class__.__name__,
),
path_to_item=_path_to_item,
valid_classes=(self.__class__,),
)
self._data_store = {}
self._check_type = _check_type
self._spec_property_naming = _spec_property_naming
self._path_to_item = _path_to_item
self._configuration = _configuration
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
for var_name, var_value in kwargs.items():
if var_name not in self.attribute_map and \
self._configuration is not None and \
self._configuration.discard_unknown_keys and \
self.additional_properties_type is None:
# discard variable.
continue
setattr(self, var_name, var_value)
return self
required_properties = set([
'_data_store',
'_check_type',
'_spec_property_naming',
'_path_to_item',
'_configuration',
'_visited_composed_classes',
])
@convert_js_args_to_python_args
def __init__(self, *args, **kwargs): # noqa: E501
"""UpdateKeyRequestDeny - a model defined in OpenAPI
Keyword Args:
_check_type (bool): if True, values for parameters in openapi_types
will be type checked and a TypeError will be
raised if the wrong type is input.
Defaults to True
_path_to_item (tuple/list): This is a list of keys or values to
drill down to the model in received_data
when deserializing a response
_spec_property_naming (bool): True if the variable names in the input data
are serialized names, as specified in the OpenAPI document.
False if the variable names in the input data
are pythonic names, e.g. snake case (default)
_configuration (Configuration): the instance to use when
deserializing a file_type parameter.
If passed, type conversion is attempted
If omitted no type conversion is done.
_visited_composed_classes (tuple): This stores a tuple of
classes that we have traveled through so that
if we see that class again we will not use its
discriminator again.
When traveling through a discriminator, the
composed schema that is
is traveled through is added to this set.
For example if Animal has a discriminator
petType and we pass in "Dog", and the class Dog
allOf includes Animal, we move through Animal
once using the discriminator, and pick Dog.
Then in Dog, we will make an instance of the
Animal class but this time we won't travel
through its discriminator because we passed in
_visited_composed_classes = (Animal,)
create_bucket (bool): [optional] # noqa: E501
"""
_check_type = kwargs.pop('_check_type', True)
_spec_property_naming = kwargs.pop('_spec_property_naming', False)
_path_to_item = kwargs.pop('_path_to_item', ())
_configuration = kwargs.pop('_configuration', None)
_visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
if args:
for arg in args:
if isinstance(arg, dict):
kwargs.update(arg)
else:
raise ApiTypeError(
"Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
args,
self.__class__.__name__,
),
path_to_item=_path_to_item,
valid_classes=(self.__class__,),
)
self._data_store = {}
self._check_type = _check_type
self._spec_property_naming = _spec_property_naming
self._path_to_item = _path_to_item
self._configuration = _configuration
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
for var_name, var_value in kwargs.items():
if var_name not in self.attribute_map and \
self._configuration is not None and \
self._configuration.discard_unknown_keys and \
self.additional_properties_type is None:
# discard variable.
continue
setattr(self, var_name, var_value)
if var_name in self.read_only_vars:
raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
f"class with read only attributes.")

View file

@ -9,13 +9,11 @@
# import sys # import sys
# sys.setrecursionlimit(n) # sys.setrecursionlimit(n)
from garage_admin_sdk.model.add_key_request import AddKeyRequest
from garage_admin_sdk.model.add_node200_response_inner import AddNode200ResponseInner
from garage_admin_sdk.model.cluster_layout import ClusterLayout from garage_admin_sdk.model.cluster_layout import ClusterLayout
from garage_admin_sdk.model.connect_post200_response_inner import ConnectPost200ResponseInner from garage_admin_sdk.model.get_nodes200_response import GetNodes200Response
from garage_admin_sdk.model.key_get_request import KeyGetRequest from garage_admin_sdk.model.import_key_request import ImportKeyRequest
from garage_admin_sdk.model.key_id_access_key_delete_request import KeyIdAccessKeyDeleteRequest
from garage_admin_sdk.model.key_id_access_key_delete_request_allow import KeyIdAccessKeyDeleteRequestAllow
from garage_admin_sdk.model.key_id_access_key_delete_request_deny import KeyIdAccessKeyDeleteRequestDeny
from garage_admin_sdk.model.key_import_post_request import KeyImportPostRequest
from garage_admin_sdk.model.key_info import KeyInfo from garage_admin_sdk.model.key_info import KeyInfo
from garage_admin_sdk.model.key_info_buckets_inner import KeyInfoBucketsInner from garage_admin_sdk.model.key_info_buckets_inner import KeyInfoBucketsInner
from garage_admin_sdk.model.key_info_buckets_inner_permissions import KeyInfoBucketsInnerPermissions from garage_admin_sdk.model.key_info_buckets_inner_permissions import KeyInfoBucketsInnerPermissions
@ -24,4 +22,6 @@ from garage_admin_sdk.model.layout_version import LayoutVersion
from garage_admin_sdk.model.list_keys200_response_inner import ListKeys200ResponseInner from garage_admin_sdk.model.list_keys200_response_inner import ListKeys200ResponseInner
from garage_admin_sdk.model.node_cluster_info import NodeClusterInfo from garage_admin_sdk.model.node_cluster_info import NodeClusterInfo
from garage_admin_sdk.model.node_network_info import NodeNetworkInfo from garage_admin_sdk.model.node_network_info import NodeNetworkInfo
from garage_admin_sdk.model.status_get200_response import StatusGet200Response from garage_admin_sdk.model.update_key_request import UpdateKeyRequest
from garage_admin_sdk.model.update_key_request_allow import UpdateKeyRequestAllow
from garage_admin_sdk.model.update_key_request_deny import UpdateKeyRequestDeny

View file

@ -0,0 +1,35 @@
"""
Garage Administration API v0+garage-v0.7.3
Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501
The version of the OpenAPI document: v0.7.3
Generated by: https://openapi-generator.tech
"""
import sys
import unittest
import garage_admin_sdk
from garage_admin_sdk.model.add_key_request import AddKeyRequest
class TestAddKeyRequest(unittest.TestCase):
"""AddKeyRequest unit test stubs"""
def setUp(self):
pass
def tearDown(self):
pass
def testAddKeyRequest(self):
"""Test AddKeyRequest"""
# FIXME: construct object with mandatory attributes with example values
# model = AddKeyRequest() # noqa: E501
pass
if __name__ == '__main__':
unittest.main()

View file

@ -0,0 +1,35 @@
"""
Garage Administration API v0+garage-v0.7.3
Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501
The version of the OpenAPI document: v0.7.3
Generated by: https://openapi-generator.tech
"""
import sys
import unittest
import garage_admin_sdk
from garage_admin_sdk.model.add_node200_response_inner import AddNode200ResponseInner
class TestAddNode200ResponseInner(unittest.TestCase):
"""AddNode200ResponseInner unit test stubs"""
def setUp(self):
pass
def tearDown(self):
pass
def testAddNode200ResponseInner(self):
"""Test AddNode200ResponseInner"""
# FIXME: construct object with mandatory attributes with example values
# model = AddNode200ResponseInner() # noqa: E501
pass
if __name__ == '__main__':
unittest.main()

View file

@ -0,0 +1,39 @@
"""
Garage Administration API v0+garage-v0.7.3
Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501
The version of the OpenAPI document: v0.7.3
Generated by: https://openapi-generator.tech
"""
import sys
import unittest
import garage_admin_sdk
from garage_admin_sdk.model.cluster_layout import ClusterLayout
from garage_admin_sdk.model.node_network_info import NodeNetworkInfo
globals()['ClusterLayout'] = ClusterLayout
globals()['NodeNetworkInfo'] = NodeNetworkInfo
from garage_admin_sdk.model.get_nodes200_response import GetNodes200Response
class TestGetNodes200Response(unittest.TestCase):
"""GetNodes200Response unit test stubs"""
def setUp(self):
pass
def tearDown(self):
pass
def testGetNodes200Response(self):
"""Test GetNodes200Response"""
# FIXME: construct object with mandatory attributes with example values
# model = GetNodes200Response() # noqa: E501
pass
if __name__ == '__main__':
unittest.main()

View file

@ -0,0 +1,35 @@
"""
Garage Administration API v0+garage-v0.7.3
Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501
The version of the OpenAPI document: v0.7.3
Generated by: https://openapi-generator.tech
"""
import sys
import unittest
import garage_admin_sdk
from garage_admin_sdk.model.import_key_request import ImportKeyRequest
class TestImportKeyRequest(unittest.TestCase):
"""ImportKeyRequest unit test stubs"""
def setUp(self):
pass
def tearDown(self):
pass
def testImportKeyRequest(self):
"""Test ImportKeyRequest"""
# FIXME: construct object with mandatory attributes with example values
# model = ImportKeyRequest() # noqa: E501
pass
if __name__ == '__main__':
unittest.main()

View file

@ -0,0 +1,35 @@
"""
Garage Administration API v0+garage-v0.7.3
Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501
The version of the OpenAPI document: v0.7.3
Generated by: https://openapi-generator.tech
"""
import unittest
import garage_admin_sdk
from garage_admin_sdk.api.nodes_api import NodesApi # noqa: E501
class TestNodesApi(unittest.TestCase):
"""NodesApi unit test stubs"""
def setUp(self):
self.api = NodesApi() # noqa: E501
def tearDown(self):
pass
def test_get_nodes(self):
"""Test case for get_nodes
Status of this node and other nodes in the cluster # noqa: E501
"""
pass
if __name__ == '__main__':
unittest.main()

View file

@ -0,0 +1,39 @@
"""
Garage Administration API v0+garage-v0.7.3
Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501
The version of the OpenAPI document: v0.7.3
Generated by: https://openapi-generator.tech
"""
import sys
import unittest
import garage_admin_sdk
from garage_admin_sdk.model.update_key_request_allow import UpdateKeyRequestAllow
from garage_admin_sdk.model.update_key_request_deny import UpdateKeyRequestDeny
globals()['UpdateKeyRequestAllow'] = UpdateKeyRequestAllow
globals()['UpdateKeyRequestDeny'] = UpdateKeyRequestDeny
from garage_admin_sdk.model.update_key_request import UpdateKeyRequest
class TestUpdateKeyRequest(unittest.TestCase):
"""UpdateKeyRequest unit test stubs"""
def setUp(self):
pass
def tearDown(self):
pass
def testUpdateKeyRequest(self):
"""Test UpdateKeyRequest"""
# FIXME: construct object with mandatory attributes with example values
# model = UpdateKeyRequest() # noqa: E501
pass
if __name__ == '__main__':
unittest.main()

View file

@ -0,0 +1,35 @@
"""
Garage Administration API v0+garage-v0.7.3
Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501
The version of the OpenAPI document: v0.7.3
Generated by: https://openapi-generator.tech
"""
import sys
import unittest
import garage_admin_sdk
from garage_admin_sdk.model.update_key_request_allow import UpdateKeyRequestAllow
class TestUpdateKeyRequestAllow(unittest.TestCase):
"""UpdateKeyRequestAllow unit test stubs"""
def setUp(self):
pass
def tearDown(self):
pass
def testUpdateKeyRequestAllow(self):
"""Test UpdateKeyRequestAllow"""
# FIXME: construct object with mandatory attributes with example values
# model = UpdateKeyRequestAllow() # noqa: E501
pass
if __name__ == '__main__':
unittest.main()

View file

@ -0,0 +1,35 @@
"""
Garage Administration API v0+garage-v0.7.3
Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* # noqa: E501
The version of the OpenAPI document: v0.7.3
Generated by: https://openapi-generator.tech
"""
import sys
import unittest
import garage_admin_sdk
from garage_admin_sdk.model.update_key_request_deny import UpdateKeyRequestDeny
class TestUpdateKeyRequestDeny(unittest.TestCase):
"""UpdateKeyRequestDeny unit test stubs"""
def setUp(self):
pass
def tearDown(self):
pass
def testUpdateKeyRequestDeny(self):
"""Test UpdateKeyRequestDeny"""
# FIXME: construct object with mandatory attributes with example values
# model = UpdateKeyRequestDeny() # noqa: E501
pass
if __name__ == '__main__':
unittest.main()