diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 9e3aee7..b5145ef 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -6,6 +6,7 @@ docs/AddKeyRequest.md docs/AddNode200ResponseInner.md docs/AllowBucketKeyRequest.md docs/AllowBucketKeyRequestPermissions.md +docs/ApplyLayout200Response.md docs/BucketApi.md docs/BucketInfo.md docs/BucketInfoQuotas.md @@ -15,6 +16,7 @@ docs/ClusterLayout.md docs/CreateBucketRequest.md docs/CreateBucketRequestLocalAlias.md docs/CreateBucketRequestLocalAliasAllow.md +docs/GetHealth200Response.md docs/GetNodes200Response.md docs/ImportKeyRequest.md docs/KeyApi.md @@ -29,6 +31,9 @@ docs/ListBuckets200ResponseInnerLocalAliasesInner.md docs/ListKeys200ResponseInner.md docs/NodeClusterInfo.md docs/NodeNetworkInfo.md +docs/NodeRoleChange.md +docs/NodeRoleRemove.md +docs/NodeRoleUpdate.md docs/NodesApi.md docs/UpdateBucketRequest.md docs/UpdateBucketRequestQuotas.md @@ -51,6 +56,7 @@ garage_admin_sdk/model/add_key_request.py garage_admin_sdk/model/add_node200_response_inner.py garage_admin_sdk/model/allow_bucket_key_request.py garage_admin_sdk/model/allow_bucket_key_request_permissions.py +garage_admin_sdk/model/apply_layout200_response.py garage_admin_sdk/model/bucket_info.py garage_admin_sdk/model/bucket_info_quotas.py garage_admin_sdk/model/bucket_info_website_config.py @@ -59,6 +65,7 @@ garage_admin_sdk/model/cluster_layout.py garage_admin_sdk/model/create_bucket_request.py garage_admin_sdk/model/create_bucket_request_local_alias.py garage_admin_sdk/model/create_bucket_request_local_alias_allow.py +garage_admin_sdk/model/get_health200_response.py garage_admin_sdk/model/get_nodes200_response.py garage_admin_sdk/model/import_key_request.py garage_admin_sdk/model/key_info.py @@ -71,6 +78,9 @@ garage_admin_sdk/model/list_buckets200_response_inner_local_aliases_inner.py garage_admin_sdk/model/list_keys200_response_inner.py garage_admin_sdk/model/node_cluster_info.py garage_admin_sdk/model/node_network_info.py +garage_admin_sdk/model/node_role_change.py +garage_admin_sdk/model/node_role_remove.py +garage_admin_sdk/model/node_role_update.py garage_admin_sdk/model/update_bucket_request.py garage_admin_sdk/model/update_bucket_request_quotas.py garage_admin_sdk/model/update_bucket_request_website_access.py @@ -86,4 +96,5 @@ setup.cfg setup.py test-requirements.txt test/__init__.py +test/test_get_health200_response.py tox.ini diff --git a/README.md b/README.md index 27a39ff..3e46be3 100644 --- a/README.md +++ b/README.md @@ -6,8 +6,8 @@ Administrate your Garage cluster programatically, including status, layout, keys This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: v0.8.0 -- Package version: 0.8.0 +- API version: v0.9.0 +- Package version: 0.9.0 - Build package: org.openapitools.codegen.languages.PythonClientCodegen ## Requirements. @@ -58,10 +58,10 @@ from garage_admin_sdk.model.bucket_info import BucketInfo from garage_admin_sdk.model.create_bucket_request import CreateBucketRequest from garage_admin_sdk.model.list_buckets200_response_inner import ListBuckets200ResponseInner from garage_admin_sdk.model.update_bucket_request import UpdateBucketRequest -# Defining the host is optional and defaults to http://localhost:3903/v0 +# Defining the host is optional and defaults to http://localhost:3903/v1 # See configuration.py for a list of all supported configuration parameters. configuration = garage_admin_sdk.Configuration( - host = "http://localhost:3903/v0" + host = "http://localhost:3903/v1" ) # The client must configure the authentication and authorization parameters @@ -99,35 +99,34 @@ with garage_admin_sdk.ApiClient(configuration) as api_client: ## Documentation for API Endpoints -All URIs are relative to *http://localhost:3903/v0* +All URIs are relative to *http://localhost:3903/v1* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- *BucketApi* | [**allow_bucket_key**](docs/BucketApi.md#allow_bucket_key) | **POST** /bucket/allow | Allow key *BucketApi* | [**create_bucket**](docs/BucketApi.md#create_bucket) | **POST** /bucket | Create a bucket -*BucketApi* | [**delete_bucket**](docs/BucketApi.md#delete_bucket) | **DELETE** /bucket?id={bucket_id} | Delete a bucket +*BucketApi* | [**delete_bucket**](docs/BucketApi.md#delete_bucket) | **DELETE** /bucket | Delete a bucket *BucketApi* | [**delete_bucket_global_alias**](docs/BucketApi.md#delete_bucket_global_alias) | **DELETE** /bucket/alias/global | Delete a global alias *BucketApi* | [**delete_bucket_local_alias**](docs/BucketApi.md#delete_bucket_local_alias) | **DELETE** /bucket/alias/local | Delete a local alias *BucketApi* | [**deny_bucket_key**](docs/BucketApi.md#deny_bucket_key) | **POST** /bucket/deny | Deny key -*BucketApi* | [**find_bucket_info**](docs/BucketApi.md#find_bucket_info) | **GET** /bucket?globalAlias={alias} | Find a bucket -*BucketApi* | [**get_bucket_info**](docs/BucketApi.md#get_bucket_info) | **GET** /bucket?id={bucket_id} | Get a bucket -*BucketApi* | [**list_buckets**](docs/BucketApi.md#list_buckets) | **GET** /bucket | List all buckets +*BucketApi* | [**get_bucket_info**](docs/BucketApi.md#get_bucket_info) | **GET** /bucket | Get a bucket +*BucketApi* | [**list_buckets**](docs/BucketApi.md#list_buckets) | **GET** /bucket?list | List all buckets *BucketApi* | [**put_bucket_global_alias**](docs/BucketApi.md#put_bucket_global_alias) | **PUT** /bucket/alias/global | Add a global alias *BucketApi* | [**put_bucket_local_alias**](docs/BucketApi.md#put_bucket_local_alias) | **PUT** /bucket/alias/local | Add a local alias -*BucketApi* | [**update_bucket**](docs/BucketApi.md#update_bucket) | **PUT** /bucket?id={bucket_id} | Update a bucket -*KeyApi* | [**add_key**](docs/KeyApi.md#add_key) | **POST** /key | Create a new API key -*KeyApi* | [**delete_key**](docs/KeyApi.md#delete_key) | **DELETE** /key?id={access_key} | Delete a key -*KeyApi* | [**get_key**](docs/KeyApi.md#get_key) | **GET** /key?id={access_key} | Get key information +*BucketApi* | [**update_bucket**](docs/BucketApi.md#update_bucket) | **PUT** /bucket | Update a bucket +*KeyApi* | [**add_key**](docs/KeyApi.md#add_key) | **POST** /key?list | Create a new API key +*KeyApi* | [**delete_key**](docs/KeyApi.md#delete_key) | **DELETE** /key | Delete a key +*KeyApi* | [**get_key**](docs/KeyApi.md#get_key) | **GET** /key | Get key information *KeyApi* | [**import_key**](docs/KeyApi.md#import_key) | **POST** /key/import | Import an existing key -*KeyApi* | [**list_keys**](docs/KeyApi.md#list_keys) | **GET** /key | List all keys -*KeyApi* | [**search_key**](docs/KeyApi.md#search_key) | **GET** /key?search={pattern} | Select key by pattern -*KeyApi* | [**update_key**](docs/KeyApi.md#update_key) | **POST** /key?id={access_key} | Update a key +*KeyApi* | [**list_keys**](docs/KeyApi.md#list_keys) | **GET** /key?list | List all keys +*KeyApi* | [**update_key**](docs/KeyApi.md#update_key) | **POST** /key | Update a key *LayoutApi* | [**add_layout**](docs/LayoutApi.md#add_layout) | **POST** /layout | Send modifications to the cluster layout *LayoutApi* | [**apply_layout**](docs/LayoutApi.md#apply_layout) | **POST** /layout/apply | Apply staged layout *LayoutApi* | [**get_layout**](docs/LayoutApi.md#get_layout) | **GET** /layout | Details on the current and staged layout *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 +*NodesApi* | [**add_node**](docs/NodesApi.md#add_node) | **POST** /connect | Connect a new node +*NodesApi* | [**get_health**](docs/NodesApi.md#get_health) | **GET** /health | Cluster health report +*NodesApi* | [**get_nodes**](docs/NodesApi.md#get_nodes) | **GET** /status | Describe cluster ## Documentation For Models @@ -136,6 +135,7 @@ Class | Method | HTTP request | Description - [AddNode200ResponseInner](docs/AddNode200ResponseInner.md) - [AllowBucketKeyRequest](docs/AllowBucketKeyRequest.md) - [AllowBucketKeyRequestPermissions](docs/AllowBucketKeyRequestPermissions.md) + - [ApplyLayout200Response](docs/ApplyLayout200Response.md) - [BucketInfo](docs/BucketInfo.md) - [BucketInfoQuotas](docs/BucketInfoQuotas.md) - [BucketInfoWebsiteConfig](docs/BucketInfoWebsiteConfig.md) @@ -144,6 +144,7 @@ Class | Method | HTTP request | Description - [CreateBucketRequest](docs/CreateBucketRequest.md) - [CreateBucketRequestLocalAlias](docs/CreateBucketRequestLocalAlias.md) - [CreateBucketRequestLocalAliasAllow](docs/CreateBucketRequestLocalAliasAllow.md) + - [GetHealth200Response](docs/GetHealth200Response.md) - [GetNodes200Response](docs/GetNodes200Response.md) - [ImportKeyRequest](docs/ImportKeyRequest.md) - [KeyInfo](docs/KeyInfo.md) @@ -156,6 +157,9 @@ Class | Method | HTTP request | Description - [ListKeys200ResponseInner](docs/ListKeys200ResponseInner.md) - [NodeClusterInfo](docs/NodeClusterInfo.md) - [NodeNetworkInfo](docs/NodeNetworkInfo.md) + - [NodeRoleChange](docs/NodeRoleChange.md) + - [NodeRoleRemove](docs/NodeRoleRemove.md) + - [NodeRoleUpdate](docs/NodeRoleUpdate.md) - [UpdateBucketRequest](docs/UpdateBucketRequest.md) - [UpdateBucketRequestQuotas](docs/UpdateBucketRequestQuotas.md) - [UpdateBucketRequestWebsiteAccess](docs/UpdateBucketRequestWebsiteAccess.md) diff --git a/docs/AddKeyRequest.md b/docs/AddKeyRequest.md index b69f01e..9bc4275 100644 --- a/docs/AddKeyRequest.md +++ b/docs/AddKeyRequest.md @@ -4,7 +4,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **str** | | [optional] +**name** | **str, none_type** | | [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) diff --git a/docs/ApplyLayout200Response.md b/docs/ApplyLayout200Response.md new file mode 100644 index 0000000..6d11fb8 --- /dev/null +++ b/docs/ApplyLayout200Response.md @@ -0,0 +1,13 @@ +# ApplyLayout200Response + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**message** | **[str]** | | +**layout** | [**ClusterLayout**](ClusterLayout.md) | | +**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) + + diff --git a/docs/BucketApi.md b/docs/BucketApi.md index 11203aa..492bfad 100644 --- a/docs/BucketApi.md +++ b/docs/BucketApi.md @@ -1,21 +1,20 @@ # garage_admin_sdk.BucketApi -All URIs are relative to *http://localhost:3903/v0* +All URIs are relative to *http://localhost:3903/v1* Method | HTTP request | Description ------------- | ------------- | ------------- [**allow_bucket_key**](BucketApi.md#allow_bucket_key) | **POST** /bucket/allow | Allow key [**create_bucket**](BucketApi.md#create_bucket) | **POST** /bucket | Create a bucket -[**delete_bucket**](BucketApi.md#delete_bucket) | **DELETE** /bucket?id={bucket_id} | Delete a bucket +[**delete_bucket**](BucketApi.md#delete_bucket) | **DELETE** /bucket | Delete a bucket [**delete_bucket_global_alias**](BucketApi.md#delete_bucket_global_alias) | **DELETE** /bucket/alias/global | Delete a global alias [**delete_bucket_local_alias**](BucketApi.md#delete_bucket_local_alias) | **DELETE** /bucket/alias/local | Delete a local alias [**deny_bucket_key**](BucketApi.md#deny_bucket_key) | **POST** /bucket/deny | Deny key -[**find_bucket_info**](BucketApi.md#find_bucket_info) | **GET** /bucket?globalAlias={alias} | Find a bucket -[**get_bucket_info**](BucketApi.md#get_bucket_info) | **GET** /bucket?id={bucket_id} | Get a bucket -[**list_buckets**](BucketApi.md#list_buckets) | **GET** /bucket | List all buckets +[**get_bucket_info**](BucketApi.md#get_bucket_info) | **GET** /bucket | Get a bucket +[**list_buckets**](BucketApi.md#list_buckets) | **GET** /bucket?list | List all buckets [**put_bucket_global_alias**](BucketApi.md#put_bucket_global_alias) | **PUT** /bucket/alias/global | Add a global alias [**put_bucket_local_alias**](BucketApi.md#put_bucket_local_alias) | **PUT** /bucket/alias/local | Add a local alias -[**update_bucket**](BucketApi.md#update_bucket) | **PUT** /bucket?id={bucket_id} | Update a bucket +[**update_bucket**](BucketApi.md#update_bucket) | **PUT** /bucket | Update a bucket # **allow_bucket_key** @@ -36,10 +35,10 @@ from garage_admin_sdk.api import bucket_api from garage_admin_sdk.model.bucket_info import BucketInfo from garage_admin_sdk.model.allow_bucket_key_request import AllowBucketKeyRequest 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/v1 # See configuration.py for a list of all supported configuration parameters. configuration = garage_admin_sdk.Configuration( - host = "http://localhost:3903/v0" + host = "http://localhost:3903/v1" ) # The client must configure the authentication and authorization parameters @@ -125,10 +124,10 @@ from garage_admin_sdk.api import bucket_api from garage_admin_sdk.model.bucket_info import BucketInfo from garage_admin_sdk.model.create_bucket_request import CreateBucketRequest 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/v1 # See configuration.py for a list of all supported configuration parameters. configuration = garage_admin_sdk.Configuration( - host = "http://localhost:3903/v0" + host = "http://localhost:3903/v1" ) # The client must configure the authentication and authorization parameters @@ -199,7 +198,7 @@ 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) # **delete_bucket** -> delete_bucket(bucket_id) +> delete_bucket(id) Delete a bucket @@ -214,10 +213,10 @@ import time import garage_admin_sdk from garage_admin_sdk.api import bucket_api 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/v1 # See configuration.py for a list of all supported configuration parameters. configuration = garage_admin_sdk.Configuration( - host = "http://localhost:3903/v0" + host = "http://localhost:3903/v1" ) # The client must configure the authentication and authorization parameters @@ -234,12 +233,12 @@ configuration = garage_admin_sdk.Configuration( with garage_admin_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = bucket_api.BucketApi(api_client) - bucket_id = "b4018dc61b27ccb5c64ec1b24f53454bbbd180697c758c4d47a22a8921864a87" # str | The exact bucket identifier, a 32 bytes hexadecimal string + id = "b4018dc61b27ccb5c64ec1b24f53454bbbd180697c758c4d47a22a8921864a87" # str | The exact bucket identifier, a 32 bytes hexadecimal string # example passing only required values which don't have defaults set try: # Delete a bucket - api_instance.delete_bucket(bucket_id) + api_instance.delete_bucket(id) except garage_admin_sdk.ApiException as e: print("Exception when calling BucketApi->delete_bucket: %s\n" % e) ``` @@ -249,7 +248,7 @@ with garage_admin_sdk.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **bucket_id** | **str**| The exact bucket identifier, a 32 bytes hexadecimal string | + **id** | **str**| The exact bucket identifier, a 32 bytes hexadecimal string | ### Return type @@ -293,10 +292,10 @@ import garage_admin_sdk from garage_admin_sdk.api import bucket_api from garage_admin_sdk.model.bucket_info import BucketInfo 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/v1 # See configuration.py for a list of all supported configuration parameters. configuration = garage_admin_sdk.Configuration( - host = "http://localhost:3903/v0" + host = "http://localhost:3903/v1" ) # The client must configure the authentication and authorization parameters @@ -375,10 +374,10 @@ import garage_admin_sdk from garage_admin_sdk.api import bucket_api from garage_admin_sdk.model.bucket_info import BucketInfo 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/v1 # See configuration.py for a list of all supported configuration parameters. configuration = garage_admin_sdk.Configuration( - host = "http://localhost:3903/v0" + host = "http://localhost:3903/v1" ) # The client must configure the authentication and authorization parameters @@ -460,10 +459,10 @@ from garage_admin_sdk.api import bucket_api from garage_admin_sdk.model.bucket_info import BucketInfo from garage_admin_sdk.model.allow_bucket_key_request import AllowBucketKeyRequest 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/v1 # See configuration.py for a list of all supported configuration parameters. configuration = garage_admin_sdk.Configuration( - host = "http://localhost:3903/v0" + host = "http://localhost:3903/v1" ) # The client must configure the authentication and authorization parameters @@ -531,91 +530,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) -# **find_bucket_info** -> BucketInfo find_bucket_info(alias) - -Find a bucket - -Find a bucket by its global alias - -### Example - -* Bearer Authentication (bearerAuth): - -```python -import time -import garage_admin_sdk -from garage_admin_sdk.api import bucket_api -from garage_admin_sdk.model.bucket_info import BucketInfo -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 = bucket_api.BucketApi(api_client) - alias = "my_documents" # str | The exact global alias of one of the existing buckets - - # example passing only required values which don't have defaults set - try: - # Find a bucket - api_response = api_instance.find_bucket_info(alias) - pprint(api_response) - except garage_admin_sdk.ApiException as e: - print("Exception when calling BucketApi->find_bucket_info: %s\n" % e) -``` - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **alias** | **str**| The exact global alias of one of the existing buckets | - -### Return type - -[**BucketInfo**](BucketInfo.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. | - | -**404** | Bucket not found | - | -**200** | Returns exhaustive information about the bucket | - | - -[[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_bucket_info** -> BucketInfo get_bucket_info(bucket_id) +> BucketInfo get_bucket_info() Get a bucket -Given a bucket identifier, get its information. It includes its aliases, its web configuration, keys that have some permissions on it, some statistics (number of objects, size), number of dangling multipart uploads, and its quotas (if any). +Given a bucket identifier (`id`) or a global alias (`alias`), get its information. It includes its aliases, its web configuration, keys that have some permissions on it, some statistics (number of objects, size), number of dangling multipart uploads, and its quotas (if any). ### Example @@ -627,10 +547,10 @@ import garage_admin_sdk from garage_admin_sdk.api import bucket_api from garage_admin_sdk.model.bucket_info import BucketInfo 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/v1 # See configuration.py for a list of all supported configuration parameters. configuration = garage_admin_sdk.Configuration( - host = "http://localhost:3903/v0" + host = "http://localhost:3903/v1" ) # The client must configure the authentication and authorization parameters @@ -647,12 +567,14 @@ configuration = garage_admin_sdk.Configuration( with garage_admin_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = bucket_api.BucketApi(api_client) - bucket_id = "b4018dc61b27ccb5c64ec1b24f53454bbbd180697c758c4d47a22a8921864a87" # str | The exact bucket identifier, a 32 bytes hexadecimal string + id = "b4018dc61b27ccb5c64ec1b24f53454bbbd180697c758c4d47a22a8921864a87" # str | The exact bucket identifier, a 32 bytes hexadecimal string. Incompatible with `alias`. (optional) + alias = "my_documents" # str | The exact global alias of one of the existing buckets. Incompatible with `id`. (optional) # example passing only required values which don't have defaults set + # and optional values try: # Get a bucket - api_response = api_instance.get_bucket_info(bucket_id) + api_response = api_instance.get_bucket_info(id=id, alias=alias) pprint(api_response) except garage_admin_sdk.ApiException as e: print("Exception when calling BucketApi->get_bucket_info: %s\n" % e) @@ -663,7 +585,8 @@ with garage_admin_sdk.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **bucket_id** | **str**| The exact bucket identifier, a 32 bytes hexadecimal string | + **id** | **str**| The exact bucket identifier, a 32 bytes hexadecimal string. Incompatible with `alias`. | [optional] + **alias** | **str**| The exact global alias of one of the existing buckets. Incompatible with `id`. | [optional] ### Return type @@ -706,10 +629,10 @@ import garage_admin_sdk from garage_admin_sdk.api import bucket_api from garage_admin_sdk.model.list_buckets200_response_inner import ListBuckets200ResponseInner 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/v1 # See configuration.py for a list of all supported configuration parameters. configuration = garage_admin_sdk.Configuration( - host = "http://localhost:3903/v0" + host = "http://localhost:3903/v1" ) # The client must configure the authentication and authorization parameters @@ -780,10 +703,10 @@ import garage_admin_sdk from garage_admin_sdk.api import bucket_api from garage_admin_sdk.model.bucket_info import BucketInfo 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/v1 # See configuration.py for a list of all supported configuration parameters. configuration = garage_admin_sdk.Configuration( - host = "http://localhost:3903/v0" + host = "http://localhost:3903/v1" ) # The client must configure the authentication and authorization parameters @@ -862,10 +785,10 @@ import garage_admin_sdk from garage_admin_sdk.api import bucket_api from garage_admin_sdk.model.bucket_info import BucketInfo 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/v1 # See configuration.py for a list of all supported configuration parameters. configuration = garage_admin_sdk.Configuration( - host = "http://localhost:3903/v0" + host = "http://localhost:3903/v1" ) # The client must configure the authentication and authorization parameters @@ -930,11 +853,11 @@ 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) # **update_bucket** -> BucketInfo update_bucket(bucket_id, update_bucket_request) +> BucketInfo update_bucket(id, update_bucket_request) Update a bucket -All fields (`websiteAccess` and `quotas`) are optionnal. If they are present, the corresponding modifications are applied to the bucket, otherwise nothing is changed. In `websiteAccess`: if `enabled` is `true`, `indexDocument` must be specified. The field `errorDocument` is optional, if no error document is set a generic error message is displayed when errors happen. Conversely, if `enabled` is `false`, neither `indexDocument` nor `errorDocument` must be specified. In `quotas`: new values of `maxSize` and `maxObjects` must both be specified, or set to `null` to remove the quotas. An absent value will be considered the same as a `null`. It is not possible to change only one of the two quotas. +All fields (`websiteAccess` and `quotas`) are optional. If they are present, the corresponding modifications are applied to the bucket, otherwise nothing is changed. In `websiteAccess`: if `enabled` is `true`, `indexDocument` must be specified. The field `errorDocument` is optional, if no error document is set a generic error message is displayed when errors happen. Conversely, if `enabled` is `false`, neither `indexDocument` nor `errorDocument` must be specified. In `quotas`: new values of `maxSize` and `maxObjects` must both be specified, or set to `null` to remove the quotas. An absent value will be considered the same as a `null`. It is not possible to change only one of the two quotas. ### Example @@ -947,10 +870,10 @@ from garage_admin_sdk.api import bucket_api from garage_admin_sdk.model.bucket_info import BucketInfo from garage_admin_sdk.model.update_bucket_request import UpdateBucketRequest 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/v1 # See configuration.py for a list of all supported configuration parameters. configuration = garage_admin_sdk.Configuration( - host = "http://localhost:3903/v0" + host = "http://localhost:3903/v1" ) # The client must configure the authentication and authorization parameters @@ -967,7 +890,7 @@ configuration = garage_admin_sdk.Configuration( with garage_admin_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = bucket_api.BucketApi(api_client) - bucket_id = "b4018dc61b27ccb5c64ec1b24f53454bbbd180697c758c4d47a22a8921864a87" # str | The exact bucket identifier, a 32 bytes hexadecimal string + id = "b4018dc61b27ccb5c64ec1b24f53454bbbd180697c758c4d47a22a8921864a87" # str | The exact bucket identifier, a 32 bytes hexadecimal string update_bucket_request = UpdateBucketRequest( website_access=UpdateBucketRequestWebsiteAccess( enabled=True, @@ -983,7 +906,7 @@ with garage_admin_sdk.ApiClient(configuration) as api_client: # example passing only required values which don't have defaults set try: # Update a bucket - api_response = api_instance.update_bucket(bucket_id, update_bucket_request) + api_response = api_instance.update_bucket(id, update_bucket_request) pprint(api_response) except garage_admin_sdk.ApiException as e: print("Exception when calling BucketApi->update_bucket: %s\n" % e) @@ -994,7 +917,7 @@ with garage_admin_sdk.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **bucket_id** | **str**| The exact bucket identifier, a 32 bytes hexadecimal string | + **id** | **str**| The exact bucket identifier, a 32 bytes hexadecimal string | **update_bucket_request** | [**UpdateBucketRequest**](UpdateBucketRequest.md)| Requested changes on the bucket. Both root fields are optionals. | ### Return type diff --git a/docs/ClusterLayout.md b/docs/ClusterLayout.md index b8491d2..80aa3b2 100644 --- a/docs/ClusterLayout.md +++ b/docs/ClusterLayout.md @@ -5,8 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **version** | **int** | | -**roles** | [**{str: (NodeClusterInfo,)}**](NodeClusterInfo.md) | | -**staged_role_changes** | [**{str: (NodeClusterInfo,)}**](NodeClusterInfo.md) | | +**roles** | [**[NodeClusterInfo]**](NodeClusterInfo.md) | | +**staged_role_changes** | [**[NodeRoleChange]**](NodeRoleChange.md) | | **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) diff --git a/docs/GetHealth200Response.md b/docs/GetHealth200Response.md new file mode 100644 index 0000000..f93f6da --- /dev/null +++ b/docs/GetHealth200Response.md @@ -0,0 +1,19 @@ +# GetHealth200Response + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **str** | | +**known_nodes** | **int** | | +**connected_nodes** | **int** | | +**storage_nodes** | **int** | | +**storage_nodes_ok** | **int** | | +**partitions** | **int** | | +**partitions_quorum** | **int** | | +**partitions_all_ok** | **int** | | +**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) + + diff --git a/docs/GetNodes200Response.md b/docs/GetNodes200Response.md index 85586f5..c2ba65d 100644 --- a/docs/GetNodes200Response.md +++ b/docs/GetNodes200Response.md @@ -6,7 +6,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **node** | **str** | | **garage_version** | **str** | | -**known_nodes** | [**{str: (NodeNetworkInfo,)}**](NodeNetworkInfo.md) | | +**garage_features** | **[str]** | | +**rust_version** | **str** | | +**db_engine** | **str** | | +**known_nodes** | [**[NodeNetworkInfo]**](NodeNetworkInfo.md) | | **layout** | [**ClusterLayout**](ClusterLayout.md) | | **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] diff --git a/docs/ImportKeyRequest.md b/docs/ImportKeyRequest.md index 9e1035a..246fb16 100644 --- a/docs/ImportKeyRequest.md +++ b/docs/ImportKeyRequest.md @@ -4,7 +4,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **str** | | +**name** | **str, none_type** | | **access_key_id** | **str** | | **secret_access_key** | **str** | | **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] diff --git a/docs/KeyApi.md b/docs/KeyApi.md index 91893a7..200d337 100644 --- a/docs/KeyApi.md +++ b/docs/KeyApi.md @@ -1,16 +1,15 @@ # garage_admin_sdk.KeyApi -All URIs are relative to *http://localhost:3903/v0* +All URIs are relative to *http://localhost:3903/v1* Method | HTTP request | Description ------------- | ------------- | ------------- -[**add_key**](KeyApi.md#add_key) | **POST** /key | Create a new API key -[**delete_key**](KeyApi.md#delete_key) | **DELETE** /key?id={access_key} | Delete a key -[**get_key**](KeyApi.md#get_key) | **GET** /key?id={access_key} | Get key information +[**add_key**](KeyApi.md#add_key) | **POST** /key?list | Create a new API key +[**delete_key**](KeyApi.md#delete_key) | **DELETE** /key | Delete a key +[**get_key**](KeyApi.md#get_key) | **GET** /key | Get key information [**import_key**](KeyApi.md#import_key) | **POST** /key/import | Import an existing key -[**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 +[**list_keys**](KeyApi.md#list_keys) | **GET** /key?list | List all keys +[**update_key**](KeyApi.md#update_key) | **POST** /key | Update a key # **add_key** @@ -31,10 +30,10 @@ from garage_admin_sdk.api import key_api from garage_admin_sdk.model.key_info import KeyInfo from garage_admin_sdk.model.add_key_request import AddKeyRequest 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/v1 # See configuration.py for a list of all supported configuration parameters. configuration = garage_admin_sdk.Configuration( - host = "http://localhost:3903/v0" + host = "http://localhost:3903/v1" ) # The client must configure the authentication and authorization parameters @@ -53,7 +52,7 @@ with garage_admin_sdk.ApiClient(configuration) as api_client: api_instance = key_api.KeyApi(api_client) add_key_request = AddKeyRequest( name="test-key", - ) # AddKeyRequest | \"You can set a friendly name for this key, send an empty string instead\" + ) # AddKeyRequest | You can set a friendly name for this key. If you don't want to, you can set the name to `null`. *Note: the secret key is returned in the response.* # example passing only required values which don't have defaults set try: @@ -69,7 +68,7 @@ with garage_admin_sdk.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **add_key_request** | [**AddKeyRequest**](AddKeyRequest.md)| \"You can set a friendly name for this key, send an empty string instead\" | + **add_key_request** | [**AddKeyRequest**](AddKeyRequest.md)| You can set a friendly name for this key. If you don't want to, you can set the name to `null`. *Note: the secret key is returned in the response.* | ### Return type @@ -96,7 +95,7 @@ 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) # **delete_key** -> delete_key(access_key) +> delete_key(id) Delete a key @@ -111,10 +110,10 @@ import time import garage_admin_sdk from garage_admin_sdk.api import key_api 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/v1 # See configuration.py for a list of all supported configuration parameters. configuration = garage_admin_sdk.Configuration( - host = "http://localhost:3903/v0" + host = "http://localhost:3903/v1" ) # The client must configure the authentication and authorization parameters @@ -131,12 +130,12 @@ configuration = garage_admin_sdk.Configuration( 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 + id = "GK31c2f218a2e44f485b94239e" # str | The exact API access key generated by Garage # example passing only required values which don't have defaults set try: # Delete a key - api_instance.delete_key(access_key) + api_instance.delete_key(id) except garage_admin_sdk.ApiException as e: print("Exception when calling KeyApi->delete_key: %s\n" % e) ``` @@ -146,7 +145,7 @@ with garage_admin_sdk.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **access_key** | **str**| The exact API access key generated by Garage | + **id** | **str**| The exact API access key generated by Garage | ### Return type @@ -172,11 +171,11 @@ 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) # **get_key** -> KeyInfo get_key(access_key) +> KeyInfo get_key() Get key information -Return information about a specific key and return its information +Return information about a specific key like its identifiers, its permissions and buckets on which it has permissions. You can search by specifying the exact key identifier (`id`) or by specifying a pattern (`search`). For confidentiality reasons, the secret key is not returned by default: you must pass the `showSecretKey` query parameter to get it. ### Example @@ -188,10 +187,10 @@ 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 +# Defining the host is optional and defaults to http://localhost:3903/v1 # See configuration.py for a list of all supported configuration parameters. configuration = garage_admin_sdk.Configuration( - host = "http://localhost:3903/v0" + host = "http://localhost:3903/v1" ) # The client must configure the authentication and authorization parameters @@ -208,12 +207,15 @@ configuration = garage_admin_sdk.Configuration( 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 + id = "GK31c2f218a2e44f485b94239e" # str | The exact API access key generated by Garage. Incompatible with `search`. (optional) + search = "test-k" # str | A pattern (beginning or full string) corresponding to a key identifier or friendly name. Incompatible with `id`. (optional) + show_secret_key = "true" # str | Wether or not the secret key should be returned in the response (optional) if omitted the server will use the default value of "false" # example passing only required values which don't have defaults set + # and optional values try: # Get key information - api_response = api_instance.get_key(access_key) + api_response = api_instance.get_key(id=id, search=search, show_secret_key=show_secret_key) pprint(api_response) except garage_admin_sdk.ApiException as e: print("Exception when calling KeyApi->get_key: %s\n" % e) @@ -224,7 +226,9 @@ with garage_admin_sdk.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **access_key** | **str**| The exact API access key generated by Garage | + **id** | **str**| The exact API access key generated by Garage. Incompatible with `search`. | [optional] + **search** | **str**| A pattern (beginning or full string) corresponding to a key identifier or friendly name. Incompatible with `id`. | [optional] + **show_secret_key** | **str**| Wether or not the secret key should be returned in the response | [optional] if omitted the server will use the default value of "false" ### Return type @@ -267,10 +271,10 @@ from garage_admin_sdk.api import key_api from garage_admin_sdk.model.import_key_request import ImportKeyRequest 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 +# Defining the host is optional and defaults to http://localhost:3903/v1 # See configuration.py for a list of all supported configuration parameters. configuration = garage_admin_sdk.Configuration( - host = "http://localhost:3903/v0" + host = "http://localhost:3903/v1" ) # The client must configure the authentication and authorization parameters @@ -350,10 +354,10 @@ import garage_admin_sdk from garage_admin_sdk.api import key_api from garage_admin_sdk.model.list_keys200_response_inner import ListKeys200ResponseInner 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/v1 # See configuration.py for a list of all supported configuration parameters. configuration = garage_admin_sdk.Configuration( - host = "http://localhost:3903/v0" + host = "http://localhost:3903/v1" ) # The client must configure the authentication and authorization parameters @@ -407,90 +411,12 @@ 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) -# **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_key_request) +> KeyInfo update_key(id, update_key_request) Update a key -Updates information about the specified API access key. +Updates information about the specified API access key. *Note: the secret key is not returned in the response, `null` is sent instead.* ### Example @@ -503,10 +429,10 @@ 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 +# Defining the host is optional and defaults to http://localhost:3903/v1 # See configuration.py for a list of all supported configuration parameters. configuration = garage_admin_sdk.Configuration( - host = "http://localhost:3903/v0" + host = "http://localhost:3903/v1" ) # The client must configure the authentication and authorization parameters @@ -523,7 +449,7 @@ configuration = garage_admin_sdk.Configuration( 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 + id = "GK31c2f218a2e44f485b94239e" # str | The exact API access key generated by Garage update_key_request = UpdateKeyRequest( name="test-key", allow=UpdateKeyRequestAllow( @@ -537,7 +463,7 @@ with garage_admin_sdk.ApiClient(configuration) as api_client: # example passing only required values which don't have defaults set try: # Update a key - api_response = api_instance.update_key(access_key, update_key_request) + api_response = api_instance.update_key(id, update_key_request) pprint(api_response) except garage_admin_sdk.ApiException as e: print("Exception when calling KeyApi->update_key: %s\n" % e) @@ -548,7 +474,7 @@ with garage_admin_sdk.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **access_key** | **str**| The exact API access key generated by Garage | + **id** | **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 | ### Return type diff --git a/docs/KeyInfo.md b/docs/KeyInfo.md index e9abd50..e904d24 100644 --- a/docs/KeyInfo.md +++ b/docs/KeyInfo.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **str** | | [optional] **access_key_id** | **str** | | [optional] -**secret_access_key** | **str** | | [optional] +**secret_access_key** | **str, none_type** | | [optional] **permissions** | [**KeyInfoPermissions**](KeyInfoPermissions.md) | | [optional] **buckets** | [**[KeyInfoBucketsInner]**](KeyInfoBucketsInner.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] diff --git a/docs/LayoutApi.md b/docs/LayoutApi.md index d26a333..ba66d8c 100644 --- a/docs/LayoutApi.md +++ b/docs/LayoutApi.md @@ -1,6 +1,6 @@ # garage_admin_sdk.LayoutApi -All URIs are relative to *http://localhost:3903/v0* +All URIs are relative to *http://localhost:3903/v1* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -11,11 +11,11 @@ Method | HTTP request | Description # **add_layout** -> add_layout(request_body) +> ClusterLayout add_layout(node_role_change) Send modifications to the cluster layout -Send modifications to the cluster layout. These modifications will be included in the staged role changes, visible in subsequent calls of `GET /layout`. Once the set of staged changes is satisfactory, the user may call `POST /layout/apply` to apply the changed changes, or `POST /layout/revert` to clear all of the staged changes in the layout. Note that setting the capacity to `null` will configure the node as a gateway. +Send modifications to the cluster layout. These modifications will be included in the staged role changes, visible in subsequent calls of `GET /layout`. Once the set of staged changes is satisfactory, the user may call `POST /layout/apply` to apply the changed changes, or `POST /layout/revert` to clear all of the staged changes in the layout. Setting the capacity to `null` will configure the node as a gateway. Otherwise, capacity must be now set in bytes (before Garage 0.9 it was arbitrary weights). For example to declare 100GB, you must set `capacity: 100000000000`. Garage uses internally the International System of Units (SI), it assumes that 1kB = 1000 bytes, and displays storage as kB, MB, GB (and not KiB, MiB, GiB that assume 1KiB = 1024 bytes). ### Example @@ -25,12 +25,13 @@ Send modifications to the cluster layout. These modifications will be included i import time import garage_admin_sdk from garage_admin_sdk.api import layout_api -from garage_admin_sdk.model.node_cluster_info import NodeClusterInfo +from garage_admin_sdk.model.cluster_layout import ClusterLayout +from garage_admin_sdk.model.node_role_change import NodeRoleChange 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/v1 # See configuration.py for a list of all supported configuration parameters. configuration = garage_admin_sdk.Configuration( - host = "http://localhost:3903/v0" + host = "http://localhost:3903/v1" ) # The client must configure the authentication and authorization parameters @@ -47,18 +48,15 @@ configuration = garage_admin_sdk.Configuration( with garage_admin_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = layout_api.LayoutApi(api_client) - request_body = { - "key": NodeClusterInfo( - zone="dc1", - capacity=4, - tags=["gateway","fast"], - ), - } # {str: (NodeClusterInfo,)} | To add a new node to the layout or to change the configuration of an existing node, simply set the values you want. To remove a node, set it to `null` instead of passing a configuration object. Contrary to the CLI that may update only a subset of the fields capacity, zone and tags, when calling this API all of these values must be specified. + node_role_change = [ + NodeRoleChange(None), + ] # [NodeRoleChange] | To add a new node to the layout or to change the configuration of an existing node, simply set the values you want (`zone`, `capacity`, and `tags`). To remove a node, simply pass the `remove: true` field. This logic is represented in OpenAPI with a \"One Of\" object. Contrary to the CLI that may update only a subset of the fields capacity, zone and tags, when calling this API all of these values must be specified. # example passing only required values which don't have defaults set try: # Send modifications to the cluster layout - api_instance.add_layout(request_body) + api_response = api_instance.add_layout(node_role_change) + pprint(api_response) except garage_admin_sdk.ApiException as e: print("Exception when calling LayoutApi->add_layout: %s\n" % e) ``` @@ -68,11 +66,11 @@ with garage_admin_sdk.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **request_body** | [**{str: (NodeClusterInfo,)}**](NodeClusterInfo.md)| To add a new node to the layout or to change the configuration of an existing node, simply set the values you want. To remove a node, set it to `null` instead of passing a configuration object. Contrary to the CLI that may update only a subset of the fields capacity, zone and tags, when calling this API all of these values must be specified. | + **node_role_change** | [**[NodeRoleChange]**](NodeRoleChange.md)| To add a new node to the layout or to change the configuration of an existing node, simply set the values you want (`zone`, `capacity`, and `tags`). To remove a node, simply pass the `remove: true` field. This logic is represented in OpenAPI with a \"One Of\" object. Contrary to the CLI that may update only a subset of the fields capacity, zone and tags, when calling this API all of these values must be specified. | ### Return type -void (empty response body) +[**ClusterLayout**](ClusterLayout.md) ### Authorization @@ -81,7 +79,7 @@ void (empty response body) ### HTTP request headers - **Content-Type**: application/json - - **Accept**: Not defined + - **Accept**: application/json ### HTTP response details @@ -95,11 +93,11 @@ 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) # **apply_layout** -> apply_layout(layout_version) +> ApplyLayout200Response apply_layout(layout_version) Apply staged layout -Applies to the cluster the layout changes currently registered as staged layout changes. +Applies to the cluster the layout changes currently registered as staged layout changes. *Note: do not try to parse the `message` field of the response, it is given as an array of string specifically because its format is not stable.* ### Example @@ -110,11 +108,12 @@ import time import garage_admin_sdk from garage_admin_sdk.api import layout_api from garage_admin_sdk.model.layout_version import LayoutVersion +from garage_admin_sdk.model.apply_layout200_response import ApplyLayout200Response 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/v1 # See configuration.py for a list of all supported configuration parameters. configuration = garage_admin_sdk.Configuration( - host = "http://localhost:3903/v0" + host = "http://localhost:3903/v1" ) # The client must configure the authentication and authorization parameters @@ -138,7 +137,8 @@ with garage_admin_sdk.ApiClient(configuration) as api_client: # example passing only required values which don't have defaults set try: # Apply staged layout - api_instance.apply_layout(layout_version) + api_response = api_instance.apply_layout(layout_version) + pprint(api_response) except garage_admin_sdk.ApiException as e: print("Exception when calling LayoutApi->apply_layout: %s\n" % e) ``` @@ -152,7 +152,7 @@ Name | Type | Description | Notes ### Return type -void (empty response body) +[**ApplyLayout200Response**](ApplyLayout200Response.md) ### Authorization @@ -161,7 +161,7 @@ void (empty response body) ### HTTP request headers - **Content-Type**: application/json - - **Accept**: Not defined + - **Accept**: application/json ### HTTP response details @@ -179,7 +179,7 @@ void (empty response body) 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`.* +Returns the cluster's current layout, including: - Currently configured cluster layout - Staged changes to the cluster layout *Capacity is given in bytes* *The info returned by this endpoint is a subset of the info returned by `GET /status`.* ### Example @@ -191,10 +191,10 @@ 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 +# Defining the host is optional and defaults to http://localhost:3903/v1 # See configuration.py for a list of all supported configuration parameters. configuration = garage_admin_sdk.Configuration( - host = "http://localhost:3903/v0" + host = "http://localhost:3903/v1" ) # The client must configure the authentication and authorization parameters @@ -265,10 +265,10 @@ 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 +# Defining the host is optional and defaults to http://localhost:3903/v1 # See configuration.py for a list of all supported configuration parameters. configuration = garage_admin_sdk.Configuration( - host = "http://localhost:3903/v0" + host = "http://localhost:3903/v1" ) # The client must configure the authentication and authorization parameters diff --git a/docs/LayoutVersion.md b/docs/LayoutVersion.md index 4a89df6..c772ba5 100644 --- a/docs/LayoutVersion.md +++ b/docs/LayoutVersion.md @@ -4,7 +4,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**version** | **int** | | [optional] +**version** | **int** | | **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) diff --git a/docs/NodeClusterInfo.md b/docs/NodeClusterInfo.md index fc19417..2f7b03e 100644 --- a/docs/NodeClusterInfo.md +++ b/docs/NodeClusterInfo.md @@ -5,8 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **zone** | **str** | | -**capacity** | **int, none_type** | | **tags** | **[str]** | User defined tags, put whatever makes sense for you, these tags are not interpreted by Garage | +**capacity** | **int, none_type** | | [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) diff --git a/docs/NodeNetworkInfo.md b/docs/NodeNetworkInfo.md index 8f03e93..c39555c 100644 --- a/docs/NodeNetworkInfo.md +++ b/docs/NodeNetworkInfo.md @@ -8,6 +8,7 @@ Name | Type | Description | Notes **is_up** | **bool** | | **last_seen_secs_ago** | **int, none_type** | | **hostname** | **str** | | +**id** | **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) diff --git a/docs/NodeRoleChange.md b/docs/NodeRoleChange.md new file mode 100644 index 0000000..888e2a6 --- /dev/null +++ b/docs/NodeRoleChange.md @@ -0,0 +1,16 @@ +# NodeRoleChange + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | [optional] +**remove** | **bool** | | [optional] +**zone** | **str** | | [optional] +**capacity** | **int, none_type** | | [optional] +**tags** | **[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) + + diff --git a/docs/NodeRoleRemove.md b/docs/NodeRoleRemove.md new file mode 100644 index 0000000..9d7501e --- /dev/null +++ b/docs/NodeRoleRemove.md @@ -0,0 +1,13 @@ +# NodeRoleRemove + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**remove** | **bool** | | +**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) + + diff --git a/docs/NodeRoleUpdate.md b/docs/NodeRoleUpdate.md new file mode 100644 index 0000000..8417793 --- /dev/null +++ b/docs/NodeRoleUpdate.md @@ -0,0 +1,15 @@ +# NodeRoleUpdate + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**zone** | **str** | | +**capacity** | **int, none_type** | | +**tags** | **[str]** | | +**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) + + diff --git a/docs/NodesApi.md b/docs/NodesApi.md index d1103d6..d1e4884 100644 --- a/docs/NodesApi.md +++ b/docs/NodesApi.md @@ -1,17 +1,18 @@ # garage_admin_sdk.NodesApi -All URIs are relative to *http://localhost:3903/v0* +All URIs are relative to *http://localhost:3903/v1* 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**](NodesApi.md#add_node) | **POST** /connect | Connect a new node +[**get_health**](NodesApi.md#get_health) | **GET** /health | Cluster health report +[**get_nodes**](NodesApi.md#get_nodes) | **GET** /status | Describe cluster # **add_node** > [AddNode200ResponseInner] add_node(request_body) -Connect target node to other Garage nodes +Connect a new node Instructs this Garage node to connect to other Garage nodes at specified `@`. `node_id` is generated automatically on node start. @@ -25,10 +26,10 @@ 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 +# Defining the host is optional and defaults to http://localhost:3903/v1 # See configuration.py for a list of all supported configuration parameters. configuration = garage_admin_sdk.Configuration( - host = "http://localhost:3903/v0" + host = "http://localhost:3903/v1" ) # The client must configure the authentication and authorization parameters @@ -49,7 +50,7 @@ with garage_admin_sdk.ApiClient(configuration) as api_client: # example passing only required values which don't have defaults set try: - # Connect target node to other Garage nodes + # Connect a new node api_response = api_instance.add_node(request_body) pprint(api_response) except garage_admin_sdk.ApiException as e: @@ -87,12 +88,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) -# **get_nodes** -> GetNodes200Response get_nodes() +# **get_health** +> GetHealth200Response get_health() -Status of this node and other nodes in the cluster +Cluster health report -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 +Returns the global status of the cluster, the number of connected nodes (over the number of known ones), the number of healthy storage nodes (over the declared ones), and the number of healthy partitions (over the total). ### Example @@ -102,12 +103,12 @@ Returns the cluster's current status, including: - ID of the node being queried 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 garage_admin_sdk.model.get_health200_response import GetHealth200Response 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/v1 # See configuration.py for a list of all supported configuration parameters. configuration = garage_admin_sdk.Configuration( - host = "http://localhost:3903/v0" + host = "http://localhost:3903/v1" ) # The client must configure the authentication and authorization parameters @@ -127,7 +128,81 @@ with garage_admin_sdk.ApiClient(configuration) as api_client: # example, this endpoint has no required or optional parameters try: - # Status of this node and other nodes in the cluster + # Cluster health report + api_response = api_instance.get_health() + pprint(api_response) + except garage_admin_sdk.ApiException as e: + print("Exception when calling NodesApi->get_health: %s\n" % e) +``` + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**GetHealth200Response**](GetHealth200Response.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) + +# **get_nodes** +> GetNodes200Response get_nodes() + +Describe 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 *Capacity is given in bytes* + +### 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/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = garage_admin_sdk.Configuration( + host = "http://localhost:3903/v1" +) + +# 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: + # Describe cluster api_response = api_instance.get_nodes() pprint(api_response) except garage_admin_sdk.ApiException as e: diff --git a/garage_admin_sdk/__init__.py b/garage_admin_sdk/__init__.py index a9bcda1..0ed8949 100644 --- a/garage_admin_sdk/__init__.py +++ b/garage_admin_sdk/__init__.py @@ -1,16 +1,16 @@ # flake8: noqa """ - Garage Administration API v0+garage-v0.8.0 + Garage Administration API v0+garage-v0.9.0 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.8.0 + The version of the OpenAPI document: v0.9.0 Generated by: https://openapi-generator.tech """ -__version__ = "0.8.0" +__version__ = "0.9.0" # import ApiClient from garage_admin_sdk.api_client import ApiClient diff --git a/garage_admin_sdk/api/bucket_api.py b/garage_admin_sdk/api/bucket_api.py index d26030f..240084a 100644 --- a/garage_admin_sdk/api/bucket_api.py +++ b/garage_admin_sdk/api/bucket_api.py @@ -1,9 +1,9 @@ """ - Garage Administration API v0+garage-v0.8.0 + Garage Administration API v0+garage-v0.9.0 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.8.0 + The version of the OpenAPI document: v0.9.0 Generated by: https://openapi-generator.tech """ @@ -149,17 +149,17 @@ class BucketApi(object): 'auth': [ 'bearerAuth' ], - 'endpoint_path': '/bucket?id={bucket_id}', + 'endpoint_path': '/bucket', 'operation_id': 'delete_bucket', 'http_method': 'DELETE', 'servers': None, }, params_map={ 'all': [ - 'bucket_id', + 'id', ], 'required': [ - 'bucket_id', + 'id', ], 'nullable': [ ], @@ -174,14 +174,14 @@ class BucketApi(object): 'allowed_values': { }, 'openapi_types': { - 'bucket_id': + 'id': (str,), }, 'attribute_map': { - 'bucket_id': 'bucket_id', + 'id': 'id', }, 'location_map': { - 'bucket_id': 'path', + 'id': 'query', }, 'collection_format_map': { } @@ -364,75 +364,23 @@ class BucketApi(object): }, api_client=api_client ) - self.find_bucket_info_endpoint = _Endpoint( - settings={ - 'response_type': (BucketInfo,), - 'auth': [ - 'bearerAuth' - ], - 'endpoint_path': '/bucket?globalAlias={alias}', - 'operation_id': 'find_bucket_info', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'alias', - ], - 'required': [ - 'alias', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'alias': - (str,), - }, - 'attribute_map': { - 'alias': 'alias', - }, - 'location_map': { - 'alias': 'path', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) self.get_bucket_info_endpoint = _Endpoint( settings={ 'response_type': (BucketInfo,), 'auth': [ 'bearerAuth' ], - 'endpoint_path': '/bucket?id={bucket_id}', + 'endpoint_path': '/bucket', 'operation_id': 'get_bucket_info', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ - 'bucket_id', - ], - 'required': [ - 'bucket_id', + 'id', + 'alias', ], + 'required': [], 'nullable': [ ], 'enum': [ @@ -446,14 +394,18 @@ class BucketApi(object): 'allowed_values': { }, 'openapi_types': { - 'bucket_id': + 'id': + (str,), + 'alias': (str,), }, 'attribute_map': { - 'bucket_id': 'bucket_id', + 'id': 'id', + 'alias': 'alias', }, 'location_map': { - 'bucket_id': 'path', + 'id': 'query', + 'alias': 'query', }, 'collection_format_map': { } @@ -472,7 +424,7 @@ class BucketApi(object): 'auth': [ 'bearerAuth' ], - 'endpoint_path': '/bucket', + 'endpoint_path': '/bucket?list', 'operation_id': 'list_buckets', 'http_method': 'GET', 'servers': None, @@ -636,18 +588,18 @@ class BucketApi(object): 'auth': [ 'bearerAuth' ], - 'endpoint_path': '/bucket?id={bucket_id}', + 'endpoint_path': '/bucket', 'operation_id': 'update_bucket', 'http_method': 'PUT', 'servers': None, }, params_map={ 'all': [ - 'bucket_id', + 'id', 'update_bucket_request', ], 'required': [ - 'bucket_id', + 'id', 'update_bucket_request', ], 'nullable': [ @@ -663,16 +615,16 @@ class BucketApi(object): 'allowed_values': { }, 'openapi_types': { - 'bucket_id': + 'id': (str,), 'update_bucket_request': (UpdateBucketRequest,), }, 'attribute_map': { - 'bucket_id': 'bucket_id', + 'id': 'id', }, 'location_map': { - 'bucket_id': 'path', + 'id': 'query', 'update_bucket_request': 'body', }, 'collection_format_map': { @@ -857,7 +809,7 @@ class BucketApi(object): def delete_bucket( self, - bucket_id, + id, **kwargs ): """Delete a bucket # noqa: E501 @@ -866,11 +818,11 @@ class BucketApi(object): This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_bucket(bucket_id, async_req=True) + >>> thread = api.delete_bucket(id, async_req=True) >>> result = thread.get() Args: - bucket_id (str): The exact bucket identifier, a 32 bytes hexadecimal string + id (str): The exact bucket identifier, a 32 bytes hexadecimal string Keyword Args: _return_http_data_only (bool): response data without head status @@ -934,8 +886,8 @@ class BucketApi(object): '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['bucket_id'] = \ - bucket_id + kwargs['id'] = \ + id return self.delete_bucket_endpoint.call_with_http_info(**kwargs) def delete_bucket_global_alias( @@ -1199,107 +1151,23 @@ class BucketApi(object): allow_bucket_key_request return self.deny_bucket_key_endpoint.call_with_http_info(**kwargs) - def find_bucket_info( - self, - alias, - **kwargs - ): - """Find a bucket # noqa: E501 - - Find a bucket by its global alias # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.find_bucket_info(alias, async_req=True) - >>> result = thread.get() - - Args: - alias (str): The exact global alias of one of the existing buckets - - 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: - BucketInfo - 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['alias'] = \ - alias - return self.find_bucket_info_endpoint.call_with_http_info(**kwargs) - def get_bucket_info( self, - bucket_id, **kwargs ): """Get a bucket # noqa: E501 - Given a bucket identifier, get its information. It includes its aliases, its web configuration, keys that have some permissions on it, some statistics (number of objects, size), number of dangling multipart uploads, and its quotas (if any). # noqa: E501 + Given a bucket identifier (`id`) or a global alias (`alias`), get its information. It includes its aliases, its web configuration, keys that have some permissions on it, some statistics (number of objects, size), number of dangling multipart uploads, and its quotas (if any). # 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_bucket_info(bucket_id, async_req=True) + >>> thread = api.get_bucket_info(async_req=True) >>> result = thread.get() - Args: - bucket_id (str): The exact bucket identifier, a 32 bytes hexadecimal string Keyword Args: + id (str): The exact bucket identifier, a 32 bytes hexadecimal string. Incompatible with `alias`. . [optional] + alias (str): The exact global alias of one of the existing buckets. Incompatible with `id`. . [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 @@ -1361,8 +1229,6 @@ class BucketApi(object): '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['bucket_id'] = \ - bucket_id return self.get_bucket_info_endpoint.call_with_http_info(**kwargs) def list_buckets( @@ -1623,21 +1489,21 @@ class BucketApi(object): def update_bucket( self, - bucket_id, + id, update_bucket_request, **kwargs ): """Update a bucket # noqa: E501 - All fields (`websiteAccess` and `quotas`) are optionnal. If they are present, the corresponding modifications are applied to the bucket, otherwise nothing is changed. In `websiteAccess`: if `enabled` is `true`, `indexDocument` must be specified. The field `errorDocument` is optional, if no error document is set a generic error message is displayed when errors happen. Conversely, if `enabled` is `false`, neither `indexDocument` nor `errorDocument` must be specified. In `quotas`: new values of `maxSize` and `maxObjects` must both be specified, or set to `null` to remove the quotas. An absent value will be considered the same as a `null`. It is not possible to change only one of the two quotas. # noqa: E501 + All fields (`websiteAccess` and `quotas`) are optional. If they are present, the corresponding modifications are applied to the bucket, otherwise nothing is changed. In `websiteAccess`: if `enabled` is `true`, `indexDocument` must be specified. The field `errorDocument` is optional, if no error document is set a generic error message is displayed when errors happen. Conversely, if `enabled` is `false`, neither `indexDocument` nor `errorDocument` must be specified. In `quotas`: new values of `maxSize` and `maxObjects` must both be specified, or set to `null` to remove the quotas. An absent value will be considered the same as a `null`. It is not possible to change only one of the two quotas. # 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_bucket(bucket_id, update_bucket_request, async_req=True) + >>> thread = api.update_bucket(id, update_bucket_request, async_req=True) >>> result = thread.get() Args: - bucket_id (str): The exact bucket identifier, a 32 bytes hexadecimal string + id (str): The exact bucket identifier, a 32 bytes hexadecimal string update_bucket_request (UpdateBucketRequest): Requested changes on the bucket. Both root fields are optionals. Keyword Args: @@ -1702,8 +1568,8 @@ class BucketApi(object): '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['bucket_id'] = \ - bucket_id + kwargs['id'] = \ + id kwargs['update_bucket_request'] = \ update_bucket_request return self.update_bucket_endpoint.call_with_http_info(**kwargs) diff --git a/garage_admin_sdk/api/key_api.py b/garage_admin_sdk/api/key_api.py index 3a651bb..f6b3548 100644 --- a/garage_admin_sdk/api/key_api.py +++ b/garage_admin_sdk/api/key_api.py @@ -1,9 +1,9 @@ """ - Garage Administration API v0+garage-v0.8.0 + Garage Administration API v0+garage-v0.9.0 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.8.0 + The version of the OpenAPI document: v0.9.0 Generated by: https://openapi-generator.tech """ @@ -45,7 +45,7 @@ class KeyApi(object): 'auth': [ 'bearerAuth' ], - 'endpoint_path': '/key', + 'endpoint_path': '/key?list', 'operation_id': 'add_key', 'http_method': 'POST', 'servers': None, @@ -97,17 +97,17 @@ class KeyApi(object): 'auth': [ 'bearerAuth' ], - 'endpoint_path': '/key?id={access_key}', + 'endpoint_path': '/key', 'operation_id': 'delete_key', 'http_method': 'DELETE', 'servers': None, }, params_map={ 'all': [ - 'access_key', + 'id', ], 'required': [ - 'access_key', + 'id', ], 'nullable': [ ], @@ -122,14 +122,14 @@ class KeyApi(object): 'allowed_values': { }, 'openapi_types': { - 'access_key': + 'id': (str,), }, 'attribute_map': { - 'access_key': 'access_key', + 'id': 'id', }, 'location_map': { - 'access_key': 'path', + 'id': 'query', }, 'collection_format_map': { } @@ -146,21 +146,22 @@ class KeyApi(object): 'auth': [ 'bearerAuth' ], - 'endpoint_path': '/key?id={access_key}', + 'endpoint_path': '/key', 'operation_id': 'get_key', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ - 'access_key', - ], - 'required': [ - 'access_key', + 'id', + 'search', + 'show_secret_key', ], + 'required': [], 'nullable': [ ], 'enum': [ + 'show_secret_key', ], 'validation': [ ] @@ -169,16 +170,29 @@ class KeyApi(object): 'validations': { }, 'allowed_values': { + ('show_secret_key',): { + + "TRUE": "true", + "FALSE": "false" + }, }, 'openapi_types': { - 'access_key': + 'id': + (str,), + 'search': + (str,), + 'show_secret_key': (str,), }, 'attribute_map': { - 'access_key': 'access_key', + 'id': 'id', + 'search': 'search', + 'show_secret_key': 'showSecretKey', }, 'location_map': { - 'access_key': 'path', + 'id': 'query', + 'search': 'query', + 'show_secret_key': 'query', }, 'collection_format_map': { } @@ -249,7 +263,7 @@ class KeyApi(object): 'auth': [ 'bearerAuth' ], - 'endpoint_path': '/key', + 'endpoint_path': '/key?list', 'operation_id': 'list_keys', 'http_method': 'GET', 'servers': None, @@ -287,75 +301,24 @@ class KeyApi(object): }, api_client=api_client ) - self.search_key_endpoint = _Endpoint( - settings={ - 'response_type': (KeyInfo,), - 'auth': [ - 'bearerAuth' - ], - 'endpoint_path': '/key?search={pattern}', - 'operation_id': 'search_key', - '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.update_key_endpoint = _Endpoint( settings={ 'response_type': (KeyInfo,), 'auth': [ 'bearerAuth' ], - 'endpoint_path': '/key?id={access_key}', + 'endpoint_path': '/key', 'operation_id': 'update_key', 'http_method': 'POST', 'servers': None, }, params_map={ 'all': [ - 'access_key', + 'id', 'update_key_request', ], 'required': [ - 'access_key', + 'id', 'update_key_request', ], 'nullable': [ @@ -371,16 +334,16 @@ class KeyApi(object): 'allowed_values': { }, 'openapi_types': { - 'access_key': + 'id': (str,), 'update_key_request': (UpdateKeyRequest,), }, 'attribute_map': { - 'access_key': 'access_key', + 'id': 'id', }, 'location_map': { - 'access_key': 'path', + 'id': 'query', 'update_key_request': 'body', }, 'collection_format_map': { @@ -412,7 +375,7 @@ class KeyApi(object): >>> result = thread.get() Args: - add_key_request (AddKeyRequest): \"You can set a friendly name for this key, send an empty string instead\" + add_key_request (AddKeyRequest): You can set a friendly name for this key. If you don't want to, you can set the name to `null`. *Note: the secret key is returned in the response.* Keyword Args: _return_http_data_only (bool): response data without head status @@ -482,7 +445,7 @@ class KeyApi(object): def delete_key( self, - access_key, + id, **kwargs ): """Delete a key # noqa: E501 @@ -491,11 +454,11 @@ class KeyApi(object): This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_key(access_key, async_req=True) + >>> thread = api.delete_key(id, async_req=True) >>> result = thread.get() Args: - access_key (str): The exact API access key generated by Garage + id (str): The exact API access key generated by Garage Keyword Args: _return_http_data_only (bool): response data without head status @@ -559,28 +522,28 @@ class KeyApi(object): '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['access_key'] = \ - access_key + kwargs['id'] = \ + id return self.delete_key_endpoint.call_with_http_info(**kwargs) def get_key( self, - access_key, **kwargs ): """Get key information # noqa: E501 - Return information about a specific key and return its information # noqa: E501 + Return information about a specific key like its identifiers, its permissions and buckets on which it has permissions. You can search by specifying the exact key identifier (`id`) or by specifying a pattern (`search`). For confidentiality reasons, the secret key is not returned by default: you must pass the `showSecretKey` query parameter to get it. # 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_key(access_key, async_req=True) + >>> thread = api.get_key(async_req=True) >>> result = thread.get() - Args: - access_key (str): The exact API access key generated by Garage Keyword Args: + id (str): The exact API access key generated by Garage. Incompatible with `search`. . [optional] + search (str): A pattern (beginning or full string) corresponding to a key identifier or friendly name. Incompatible with `id`. . [optional] + show_secret_key (str): Wether or not the secret key should be returned in the response. [optional] if omitted the server will use the default value of "false" _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 @@ -642,8 +605,6 @@ class KeyApi(object): '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['access_key'] = \ - access_key return self.get_key_endpoint.call_with_http_info(**kwargs) def import_key( @@ -807,106 +768,23 @@ class KeyApi(object): kwargs['_request_auths'] = kwargs.get('_request_auths', None) 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, + id, update_key_request, **kwargs ): """Update a key # noqa: E501 - Updates information about the specified API access key. # noqa: E501 + Updates information about the specified API access key. *Note: the secret key is not returned in the response, `null` is sent instead.* # 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, update_key_request, async_req=True) + >>> thread = api.update_key(id, update_key_request, async_req=True) >>> result = thread.get() Args: - access_key (str): The exact API access key generated by Garage + id (str): The exact API access key generated by Garage 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 Keyword Args: @@ -971,8 +849,8 @@ class KeyApi(object): '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['access_key'] = \ - access_key + kwargs['id'] = \ + id kwargs['update_key_request'] = \ update_key_request return self.update_key_endpoint.call_with_http_info(**kwargs) diff --git a/garage_admin_sdk/api/layout_api.py b/garage_admin_sdk/api/layout_api.py index 39785d7..06510e9 100644 --- a/garage_admin_sdk/api/layout_api.py +++ b/garage_admin_sdk/api/layout_api.py @@ -1,9 +1,9 @@ """ - Garage Administration API v0+garage-v0.8.0 + Garage Administration API v0+garage-v0.9.0 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.8.0 + The version of the OpenAPI document: v0.9.0 Generated by: https://openapi-generator.tech """ @@ -21,9 +21,10 @@ from garage_admin_sdk.model_utils import ( # noqa: F401 none_type, validate_and_convert_types ) +from garage_admin_sdk.model.apply_layout200_response import ApplyLayout200Response from garage_admin_sdk.model.cluster_layout import ClusterLayout from garage_admin_sdk.model.layout_version import LayoutVersion -from garage_admin_sdk.model.node_cluster_info import NodeClusterInfo +from garage_admin_sdk.model.node_role_change import NodeRoleChange class LayoutApi(object): @@ -39,7 +40,7 @@ class LayoutApi(object): self.api_client = api_client self.add_layout_endpoint = _Endpoint( settings={ - 'response_type': None, + 'response_type': (ClusterLayout,), 'auth': [ 'bearerAuth' ], @@ -50,10 +51,10 @@ class LayoutApi(object): }, params_map={ 'all': [ - 'request_body', + 'node_role_change', ], 'required': [ - 'request_body', + 'node_role_change', ], 'nullable': [ ], @@ -68,19 +69,21 @@ class LayoutApi(object): 'allowed_values': { }, 'openapi_types': { - 'request_body': - ({str: (NodeClusterInfo,)},), + 'node_role_change': + ([NodeRoleChange],), }, 'attribute_map': { }, 'location_map': { - 'request_body': 'body', + 'node_role_change': 'body', }, 'collection_format_map': { } }, headers_map={ - 'accept': [], + 'accept': [ + 'application/json' + ], 'content_type': [ 'application/json' ] @@ -89,7 +92,7 @@ class LayoutApi(object): ) self.apply_layout_endpoint = _Endpoint( settings={ - 'response_type': None, + 'response_type': (ApplyLayout200Response,), 'auth': [ 'bearerAuth' ], @@ -130,7 +133,9 @@ class LayoutApi(object): } }, headers_map={ - 'accept': [], + 'accept': [ + 'application/json' + ], 'content_type': [ 'application/json' ] @@ -234,20 +239,20 @@ class LayoutApi(object): def add_layout( self, - request_body, + node_role_change, **kwargs ): """Send modifications to the cluster layout # noqa: E501 - Send modifications to the cluster layout. These modifications will be included in the staged role changes, visible in subsequent calls of `GET /layout`. Once the set of staged changes is satisfactory, the user may call `POST /layout/apply` to apply the changed changes, or `POST /layout/revert` to clear all of the staged changes in the layout. Note that setting the capacity to `null` will configure the node as a gateway. # noqa: E501 + Send modifications to the cluster layout. These modifications will be included in the staged role changes, visible in subsequent calls of `GET /layout`. Once the set of staged changes is satisfactory, the user may call `POST /layout/apply` to apply the changed changes, or `POST /layout/revert` to clear all of the staged changes in the layout. Setting the capacity to `null` will configure the node as a gateway. Otherwise, capacity must be now set in bytes (before Garage 0.9 it was arbitrary weights). For example to declare 100GB, you must set `capacity: 100000000000`. Garage uses internally the International System of Units (SI), it assumes that 1kB = 1000 bytes, and displays storage as kB, MB, GB (and not KiB, MiB, GiB that assume 1KiB = 1024 bytes). # 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_layout(request_body, async_req=True) + >>> thread = api.add_layout(node_role_change, async_req=True) >>> result = thread.get() Args: - request_body ({str: (NodeClusterInfo,)}): To add a new node to the layout or to change the configuration of an existing node, simply set the values you want. To remove a node, set it to `null` instead of passing a configuration object. Contrary to the CLI that may update only a subset of the fields capacity, zone and tags, when calling this API all of these values must be specified. + node_role_change ([NodeRoleChange]): To add a new node to the layout or to change the configuration of an existing node, simply set the values you want (`zone`, `capacity`, and `tags`). To remove a node, simply pass the `remove: true` field. This logic is represented in OpenAPI with a \"One Of\" object. Contrary to the CLI that may update only a subset of the fields capacity, zone and tags, when calling this API all of these values must be specified. Keyword Args: _return_http_data_only (bool): response data without head status @@ -282,7 +287,7 @@ class LayoutApi(object): async_req (bool): execute request asynchronously Returns: - None + ClusterLayout If the method is called asynchronously, returns the request thread. """ @@ -311,8 +316,8 @@ class LayoutApi(object): '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') kwargs['_request_auths'] = kwargs.get('_request_auths', None) - kwargs['request_body'] = \ - request_body + kwargs['node_role_change'] = \ + node_role_change return self.add_layout_endpoint.call_with_http_info(**kwargs) def apply_layout( @@ -322,7 +327,7 @@ class LayoutApi(object): ): """Apply staged layout # noqa: E501 - Applies to the cluster the layout changes currently registered as staged layout changes. # noqa: E501 + Applies to the cluster the layout changes currently registered as staged layout changes. *Note: do not try to parse the `message` field of the response, it is given as an array of string specifically because its format is not stable.* # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -365,7 +370,7 @@ class LayoutApi(object): async_req (bool): execute request asynchronously Returns: - None + ApplyLayout200Response If the method is called asynchronously, returns the request thread. """ @@ -404,7 +409,7 @@ class LayoutApi(object): ): """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 + Returns the cluster's current layout, including: - Currently configured cluster layout - Staged changes to the cluster layout *Capacity is given in bytes* *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 diff --git a/garage_admin_sdk/api/nodes_api.py b/garage_admin_sdk/api/nodes_api.py index acd2dbb..b6aad98 100644 --- a/garage_admin_sdk/api/nodes_api.py +++ b/garage_admin_sdk/api/nodes_api.py @@ -1,9 +1,9 @@ """ - Garage Administration API v0+garage-v0.8.0 + Garage Administration API v0+garage-v0.9.0 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.8.0 + The version of the OpenAPI document: v0.9.0 Generated by: https://openapi-generator.tech """ @@ -22,6 +22,7 @@ from garage_admin_sdk.model_utils import ( # noqa: F401 validate_and_convert_types ) from garage_admin_sdk.model.add_node200_response_inner import AddNode200ResponseInner +from garage_admin_sdk.model.get_health200_response import GetHealth200Response from garage_admin_sdk.model.get_nodes200_response import GetNodes200Response @@ -88,6 +89,50 @@ class NodesApi(object): }, api_client=api_client ) + self.get_health_endpoint = _Endpoint( + settings={ + 'response_type': (GetHealth200Response,), + 'auth': [ + 'bearerAuth' + ], + 'endpoint_path': '/health', + 'operation_id': 'get_health', + '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.get_nodes_endpoint = _Endpoint( settings={ 'response_type': (GetNodes200Response,), @@ -138,7 +183,7 @@ class NodesApi(object): request_body, **kwargs ): - """Connect target node to other Garage nodes # noqa: E501 + """Connect a new node # noqa: E501 Instructs this Garage node to connect to other Garage nodes at specified `@`. `node_id` is generated automatically on node start. # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -216,13 +261,91 @@ class NodesApi(object): request_body return self.add_node_endpoint.call_with_http_info(**kwargs) + def get_health( + self, + **kwargs + ): + """Cluster health report # noqa: E501 + + Returns the global status of the cluster, the number of connected nodes (over the number of known ones), the number of healthy storage nodes (over the declared ones), and the number of healthy partitions (over the total). # 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_health(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: + GetHealth200Response + 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_health_endpoint.call_with_http_info(**kwargs) + def get_nodes( self, **kwargs ): - """Status of this node and other nodes in the cluster # noqa: E501 + """Describe 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 + 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 *Capacity is given in bytes* # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True diff --git a/garage_admin_sdk/api_client.py b/garage_admin_sdk/api_client.py index b0c6ca8..6ac5c7f 100644 --- a/garage_admin_sdk/api_client.py +++ b/garage_admin_sdk/api_client.py @@ -1,9 +1,9 @@ """ - Garage Administration API v0+garage-v0.8.0 + Garage Administration API v0+garage-v0.9.0 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.8.0 + The version of the OpenAPI document: v0.9.0 Generated by: https://openapi-generator.tech """ @@ -76,7 +76,7 @@ class ApiClient(object): self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = 'OpenAPI-Generator/0.8.0/python' + self.user_agent = 'OpenAPI-Generator/0.9.0/python' def __enter__(self): return self diff --git a/garage_admin_sdk/configuration.py b/garage_admin_sdk/configuration.py index 89375ba..d2201e4 100644 --- a/garage_admin_sdk/configuration.py +++ b/garage_admin_sdk/configuration.py @@ -1,9 +1,9 @@ """ - Garage Administration API v0+garage-v0.8.0 + Garage Administration API v0+garage-v0.9.0 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.8.0 + The version of the OpenAPI document: v0.9.0 Generated by: https://openapi-generator.tech """ @@ -93,7 +93,7 @@ class Configuration(object): ): """Constructor """ - self._base_path = "http://localhost:3903/v0" if host is None else host + self._base_path = "http://localhost:3903/v1" if host is None else host """Default Base url """ self.server_index = 0 if server_index is None and host is None else server_index @@ -387,8 +387,8 @@ class Configuration(object): return "Python SDK Debug Report:\n"\ "OS: {env}\n"\ "Python Version: {pyversion}\n"\ - "Version of the API: v0.8.0\n"\ - "SDK Package Version: 0.8.0".\ + "Version of the API: v0.9.0\n"\ + "SDK Package Version: 0.9.0".\ format(env=sys.platform, pyversion=sys.version) def get_host_settings(self): @@ -398,7 +398,7 @@ class Configuration(object): """ return [ { - 'url': "http://localhost:3903/v0", + 'url': "http://localhost:3903/v1", 'description': "A local server", } ] diff --git a/garage_admin_sdk/exceptions.py b/garage_admin_sdk/exceptions.py index ac96627..13f2264 100644 --- a/garage_admin_sdk/exceptions.py +++ b/garage_admin_sdk/exceptions.py @@ -1,9 +1,9 @@ """ - Garage Administration API v0+garage-v0.8.0 + Garage Administration API v0+garage-v0.9.0 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.8.0 + The version of the OpenAPI document: v0.9.0 Generated by: https://openapi-generator.tech """ diff --git a/garage_admin_sdk/model/add_key_request.py b/garage_admin_sdk/model/add_key_request.py index bf5eaf0..fa523ea 100644 --- a/garage_admin_sdk/model/add_key_request.py +++ b/garage_admin_sdk/model/add_key_request.py @@ -1,9 +1,9 @@ """ - Garage Administration API v0+garage-v0.8.0 + Garage Administration API v0+garage-v0.9.0 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.8.0 + The version of the OpenAPI document: v0.9.0 Generated by: https://openapi-generator.tech """ @@ -81,7 +81,7 @@ class AddKeyRequest(ModelNormal): and the value is attribute type. """ return { - 'name': (str,), # noqa: E501 + 'name': (str, none_type,), # noqa: E501 } @cached_property @@ -134,7 +134,7 @@ class AddKeyRequest(ModelNormal): 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 + name (str, none_type): [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -220,7 +220,7 @@ class AddKeyRequest(ModelNormal): 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 + name (str, none_type): [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) diff --git a/garage_admin_sdk/model/add_node200_response_inner.py b/garage_admin_sdk/model/add_node200_response_inner.py index f219373..386e22c 100644 --- a/garage_admin_sdk/model/add_node200_response_inner.py +++ b/garage_admin_sdk/model/add_node200_response_inner.py @@ -1,9 +1,9 @@ """ - Garage Administration API v0+garage-v0.8.0 + Garage Administration API v0+garage-v0.9.0 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.8.0 + The version of the OpenAPI document: v0.9.0 Generated by: https://openapi-generator.tech """ diff --git a/garage_admin_sdk/model/allow_bucket_key_request.py b/garage_admin_sdk/model/allow_bucket_key_request.py index 1088939..0a506db 100644 --- a/garage_admin_sdk/model/allow_bucket_key_request.py +++ b/garage_admin_sdk/model/allow_bucket_key_request.py @@ -1,9 +1,9 @@ """ - Garage Administration API v0+garage-v0.8.0 + Garage Administration API v0+garage-v0.9.0 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.8.0 + The version of the OpenAPI document: v0.9.0 Generated by: https://openapi-generator.tech """ diff --git a/garage_admin_sdk/model/allow_bucket_key_request_permissions.py b/garage_admin_sdk/model/allow_bucket_key_request_permissions.py index cee3b02..24c790a 100644 --- a/garage_admin_sdk/model/allow_bucket_key_request_permissions.py +++ b/garage_admin_sdk/model/allow_bucket_key_request_permissions.py @@ -1,9 +1,9 @@ """ - Garage Administration API v0+garage-v0.8.0 + Garage Administration API v0+garage-v0.9.0 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.8.0 + The version of the OpenAPI document: v0.9.0 Generated by: https://openapi-generator.tech """ diff --git a/garage_admin_sdk/model/apply_layout200_response.py b/garage_admin_sdk/model/apply_layout200_response.py new file mode 100644 index 0000000..8570bd9 --- /dev/null +++ b/garage_admin_sdk/model/apply_layout200_response.py @@ -0,0 +1,281 @@ +""" + Garage Administration API v0+garage-v0.9.0 + + 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.9.0 + 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 + globals()['ClusterLayout'] = ClusterLayout + + +class ApplyLayout200Response(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 { + 'message': ([str],), # noqa: E501 + 'layout': (ClusterLayout,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'message': 'message', # noqa: E501 + 'layout': 'layout', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, message, layout, *args, **kwargs): # noqa: E501 + """ApplyLayout200Response - a model defined in OpenAPI + + Args: + message ([str]): + layout (ClusterLayout): + + 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,) + """ + + _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__,) + + self.message = message + self.layout = layout + 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, message, layout, *args, **kwargs): # noqa: E501 + """ApplyLayout200Response - a model defined in OpenAPI + + Args: + message ([str]): + layout (ClusterLayout): + + 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,) + """ + + _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__,) + + self.message = message + self.layout = layout + 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.") diff --git a/garage_admin_sdk/model/bucket_info.py b/garage_admin_sdk/model/bucket_info.py index 174aa9c..1e61e38 100644 --- a/garage_admin_sdk/model/bucket_info.py +++ b/garage_admin_sdk/model/bucket_info.py @@ -1,9 +1,9 @@ """ - Garage Administration API v0+garage-v0.8.0 + Garage Administration API v0+garage-v0.9.0 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.8.0 + The version of the OpenAPI document: v0.9.0 Generated by: https://openapi-generator.tech """ diff --git a/garage_admin_sdk/model/bucket_info_quotas.py b/garage_admin_sdk/model/bucket_info_quotas.py index 18976d4..6ac9f7f 100644 --- a/garage_admin_sdk/model/bucket_info_quotas.py +++ b/garage_admin_sdk/model/bucket_info_quotas.py @@ -1,9 +1,9 @@ """ - Garage Administration API v0+garage-v0.8.0 + Garage Administration API v0+garage-v0.9.0 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.8.0 + The version of the OpenAPI document: v0.9.0 Generated by: https://openapi-generator.tech """ diff --git a/garage_admin_sdk/model/bucket_info_website_config.py b/garage_admin_sdk/model/bucket_info_website_config.py index 775b067..1b11e3a 100644 --- a/garage_admin_sdk/model/bucket_info_website_config.py +++ b/garage_admin_sdk/model/bucket_info_website_config.py @@ -1,9 +1,9 @@ """ - Garage Administration API v0+garage-v0.8.0 + Garage Administration API v0+garage-v0.9.0 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.8.0 + The version of the OpenAPI document: v0.9.0 Generated by: https://openapi-generator.tech """ diff --git a/garage_admin_sdk/model/bucket_key_info.py b/garage_admin_sdk/model/bucket_key_info.py index 9c1db3d..1e276ce 100644 --- a/garage_admin_sdk/model/bucket_key_info.py +++ b/garage_admin_sdk/model/bucket_key_info.py @@ -1,9 +1,9 @@ """ - Garage Administration API v0+garage-v0.8.0 + Garage Administration API v0+garage-v0.9.0 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.8.0 + The version of the OpenAPI document: v0.9.0 Generated by: https://openapi-generator.tech """ diff --git a/garage_admin_sdk/model/cluster_layout.py b/garage_admin_sdk/model/cluster_layout.py index ce71b45..84ee062 100644 --- a/garage_admin_sdk/model/cluster_layout.py +++ b/garage_admin_sdk/model/cluster_layout.py @@ -1,9 +1,9 @@ """ - Garage Administration API v0+garage-v0.8.0 + Garage Administration API v0+garage-v0.9.0 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.8.0 + The version of the OpenAPI document: v0.9.0 Generated by: https://openapi-generator.tech """ @@ -31,7 +31,9 @@ from garage_admin_sdk.exceptions import ApiAttributeError def lazy_import(): from garage_admin_sdk.model.node_cluster_info import NodeClusterInfo + from garage_admin_sdk.model.node_role_change import NodeRoleChange globals()['NodeClusterInfo'] = NodeClusterInfo + globals()['NodeRoleChange'] = NodeRoleChange class ClusterLayout(ModelNormal): @@ -88,8 +90,8 @@ class ClusterLayout(ModelNormal): lazy_import() return { 'version': (int,), # noqa: E501 - 'roles': ({str: (NodeClusterInfo,)},), # noqa: E501 - 'staged_role_changes': ({str: (NodeClusterInfo,)},), # noqa: E501 + 'roles': ([NodeClusterInfo],), # noqa: E501 + 'staged_role_changes': ([NodeRoleChange],), # noqa: E501 } @cached_property @@ -115,8 +117,8 @@ class ClusterLayout(ModelNormal): Args: version (int): - roles ({str: (NodeClusterInfo,)}): - staged_role_changes ({str: (NodeClusterInfo,)}): + roles ([NodeClusterInfo]): + staged_role_changes ([NodeRoleChange]): Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -208,8 +210,8 @@ class ClusterLayout(ModelNormal): Args: version (int): - roles ({str: (NodeClusterInfo,)}): - staged_role_changes ({str: (NodeClusterInfo,)}): + roles ([NodeClusterInfo]): + staged_role_changes ([NodeRoleChange]): Keyword Args: _check_type (bool): if True, values for parameters in openapi_types diff --git a/garage_admin_sdk/model/create_bucket_request.py b/garage_admin_sdk/model/create_bucket_request.py index 4b64638..5a9ca2f 100644 --- a/garage_admin_sdk/model/create_bucket_request.py +++ b/garage_admin_sdk/model/create_bucket_request.py @@ -1,9 +1,9 @@ """ - Garage Administration API v0+garage-v0.8.0 + Garage Administration API v0+garage-v0.9.0 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.8.0 + The version of the OpenAPI document: v0.9.0 Generated by: https://openapi-generator.tech """ diff --git a/garage_admin_sdk/model/create_bucket_request_local_alias.py b/garage_admin_sdk/model/create_bucket_request_local_alias.py index 27e4895..83faa4d 100644 --- a/garage_admin_sdk/model/create_bucket_request_local_alias.py +++ b/garage_admin_sdk/model/create_bucket_request_local_alias.py @@ -1,9 +1,9 @@ """ - Garage Administration API v0+garage-v0.8.0 + Garage Administration API v0+garage-v0.9.0 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.8.0 + The version of the OpenAPI document: v0.9.0 Generated by: https://openapi-generator.tech """ diff --git a/garage_admin_sdk/model/create_bucket_request_local_alias_allow.py b/garage_admin_sdk/model/create_bucket_request_local_alias_allow.py index ccc8b9b..7a5f5b6 100644 --- a/garage_admin_sdk/model/create_bucket_request_local_alias_allow.py +++ b/garage_admin_sdk/model/create_bucket_request_local_alias_allow.py @@ -1,9 +1,9 @@ """ - Garage Administration API v0+garage-v0.8.0 + Garage Administration API v0+garage-v0.9.0 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.8.0 + The version of the OpenAPI document: v0.9.0 Generated by: https://openapi-generator.tech """ diff --git a/garage_admin_sdk/model/get_health200_response.py b/garage_admin_sdk/model/get_health200_response.py new file mode 100644 index 0000000..88d1b53 --- /dev/null +++ b/garage_admin_sdk/model/get_health200_response.py @@ -0,0 +1,311 @@ +""" + Garage Administration API v0+garage-v0.9.0 + + 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.9.0 + 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 GetHealth200Response(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 { + 'status': (str,), # noqa: E501 + 'known_nodes': (int,), # noqa: E501 + 'connected_nodes': (int,), # noqa: E501 + 'storage_nodes': (int,), # noqa: E501 + 'storage_nodes_ok': (int,), # noqa: E501 + 'partitions': (int,), # noqa: E501 + 'partitions_quorum': (int,), # noqa: E501 + 'partitions_all_ok': (int,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'status': 'status', # noqa: E501 + 'known_nodes': 'knownNodes', # noqa: E501 + 'connected_nodes': 'connectedNodes', # noqa: E501 + 'storage_nodes': 'storageNodes', # noqa: E501 + 'storage_nodes_ok': 'storageNodesOk', # noqa: E501 + 'partitions': 'partitions', # noqa: E501 + 'partitions_quorum': 'partitionsQuorum', # noqa: E501 + 'partitions_all_ok': 'partitionsAllOk', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, status, known_nodes, connected_nodes, storage_nodes, storage_nodes_ok, partitions, partitions_quorum, partitions_all_ok, *args, **kwargs): # noqa: E501 + """GetHealth200Response - a model defined in OpenAPI + + Args: + status (str): + known_nodes (int): + connected_nodes (int): + storage_nodes (int): + storage_nodes_ok (int): + partitions (int): + partitions_quorum (int): + partitions_all_ok (int): + + 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,) + """ + + _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__,) + + self.status = status + self.known_nodes = known_nodes + self.connected_nodes = connected_nodes + self.storage_nodes = storage_nodes + self.storage_nodes_ok = storage_nodes_ok + self.partitions = partitions + self.partitions_quorum = partitions_quorum + self.partitions_all_ok = partitions_all_ok + 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, status, known_nodes, connected_nodes, storage_nodes, storage_nodes_ok, partitions, partitions_quorum, partitions_all_ok, *args, **kwargs): # noqa: E501 + """GetHealth200Response - a model defined in OpenAPI + + Args: + status (str): + known_nodes (int): + connected_nodes (int): + storage_nodes (int): + storage_nodes_ok (int): + partitions (int): + partitions_quorum (int): + partitions_all_ok (int): + + 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,) + """ + + _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__,) + + self.status = status + self.known_nodes = known_nodes + self.connected_nodes = connected_nodes + self.storage_nodes = storage_nodes + self.storage_nodes_ok = storage_nodes_ok + self.partitions = partitions + self.partitions_quorum = partitions_quorum + self.partitions_all_ok = partitions_all_ok + 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.") diff --git a/garage_admin_sdk/model/get_nodes200_response.py b/garage_admin_sdk/model/get_nodes200_response.py index a0c1500..b18e5f3 100644 --- a/garage_admin_sdk/model/get_nodes200_response.py +++ b/garage_admin_sdk/model/get_nodes200_response.py @@ -1,9 +1,9 @@ """ - Garage Administration API v0+garage-v0.8.0 + Garage Administration API v0+garage-v0.9.0 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.8.0 + The version of the OpenAPI document: v0.9.0 Generated by: https://openapi-generator.tech """ @@ -91,7 +91,10 @@ class GetNodes200Response(ModelNormal): return { 'node': (str,), # noqa: E501 'garage_version': (str,), # noqa: E501 - 'known_nodes': ({str: (NodeNetworkInfo,)},), # noqa: E501 + 'garage_features': ([str],), # noqa: E501 + 'rust_version': (str,), # noqa: E501 + 'db_engine': (str,), # noqa: E501 + 'known_nodes': ([NodeNetworkInfo],), # noqa: E501 'layout': (ClusterLayout,), # noqa: E501 } @@ -103,6 +106,9 @@ class GetNodes200Response(ModelNormal): attribute_map = { 'node': 'node', # noqa: E501 'garage_version': 'garageVersion', # noqa: E501 + 'garage_features': 'garageFeatures', # noqa: E501 + 'rust_version': 'rustVersion', # noqa: E501 + 'db_engine': 'dbEngine', # noqa: E501 'known_nodes': 'knownNodes', # noqa: E501 'layout': 'layout', # noqa: E501 } @@ -114,13 +120,16 @@ class GetNodes200Response(ModelNormal): @classmethod @convert_js_args_to_python_args - def _from_openapi_data(cls, node, garage_version, known_nodes, layout, *args, **kwargs): # noqa: E501 + def _from_openapi_data(cls, node, garage_version, garage_features, rust_version, db_engine, known_nodes, layout, *args, **kwargs): # noqa: E501 """GetNodes200Response - a model defined in OpenAPI Args: node (str): garage_version (str): - known_nodes ({str: (NodeNetworkInfo,)}): + garage_features ([str]): + rust_version (str): + db_engine (str): + known_nodes ([NodeNetworkInfo]): layout (ClusterLayout): Keyword Args: @@ -187,6 +196,9 @@ class GetNodes200Response(ModelNormal): self.node = node self.garage_version = garage_version + self.garage_features = garage_features + self.rust_version = rust_version + self.db_engine = db_engine self.known_nodes = known_nodes self.layout = layout for var_name, var_value in kwargs.items(): @@ -209,13 +221,16 @@ class GetNodes200Response(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, node, garage_version, known_nodes, layout, *args, **kwargs): # noqa: E501 + def __init__(self, node, garage_version, garage_features, rust_version, db_engine, known_nodes, layout, *args, **kwargs): # noqa: E501 """GetNodes200Response - a model defined in OpenAPI Args: node (str): garage_version (str): - known_nodes ({str: (NodeNetworkInfo,)}): + garage_features ([str]): + rust_version (str): + db_engine (str): + known_nodes ([NodeNetworkInfo]): layout (ClusterLayout): Keyword Args: @@ -280,6 +295,9 @@ class GetNodes200Response(ModelNormal): self.node = node self.garage_version = garage_version + self.garage_features = garage_features + self.rust_version = rust_version + self.db_engine = db_engine self.known_nodes = known_nodes self.layout = layout for var_name, var_value in kwargs.items(): diff --git a/garage_admin_sdk/model/import_key_request.py b/garage_admin_sdk/model/import_key_request.py index 9417f4e..953110f 100644 --- a/garage_admin_sdk/model/import_key_request.py +++ b/garage_admin_sdk/model/import_key_request.py @@ -1,9 +1,9 @@ """ - Garage Administration API v0+garage-v0.8.0 + Garage Administration API v0+garage-v0.9.0 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.8.0 + The version of the OpenAPI document: v0.9.0 Generated by: https://openapi-generator.tech """ @@ -81,7 +81,7 @@ class ImportKeyRequest(ModelNormal): and the value is attribute type. """ return { - 'name': (str,), # noqa: E501 + 'name': (str, none_type,), # noqa: E501 'access_key_id': (str,), # noqa: E501 'secret_access_key': (str,), # noqa: E501 } @@ -108,7 +108,7 @@ class ImportKeyRequest(ModelNormal): """ImportKeyRequest - a model defined in OpenAPI Args: - name (str): + name (str, none_type): access_key_id (str): secret_access_key (str): @@ -201,7 +201,7 @@ class ImportKeyRequest(ModelNormal): """ImportKeyRequest - a model defined in OpenAPI Args: - name (str): + name (str, none_type): access_key_id (str): secret_access_key (str): diff --git a/garage_admin_sdk/model/key_info.py b/garage_admin_sdk/model/key_info.py index 3ee863b..f4c8635 100644 --- a/garage_admin_sdk/model/key_info.py +++ b/garage_admin_sdk/model/key_info.py @@ -1,9 +1,9 @@ """ - Garage Administration API v0+garage-v0.8.0 + Garage Administration API v0+garage-v0.9.0 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.8.0 + The version of the OpenAPI document: v0.9.0 Generated by: https://openapi-generator.tech """ @@ -91,7 +91,7 @@ class KeyInfo(ModelNormal): return { 'name': (str,), # noqa: E501 'access_key_id': (str,), # noqa: E501 - 'secret_access_key': (str,), # noqa: E501 + 'secret_access_key': (str, none_type,), # noqa: E501 'permissions': (KeyInfoPermissions,), # noqa: E501 'buckets': ([KeyInfoBucketsInner],), # noqa: E501 } @@ -152,7 +152,7 @@ class KeyInfo(ModelNormal): _visited_composed_classes = (Animal,) name (str): [optional] # noqa: E501 access_key_id (str): [optional] # noqa: E501 - secret_access_key (str): [optional] # noqa: E501 + secret_access_key (str, none_type): [optional] # noqa: E501 permissions (KeyInfoPermissions): [optional] # noqa: E501 buckets ([KeyInfoBucketsInner]): [optional] # noqa: E501 """ @@ -242,7 +242,7 @@ class KeyInfo(ModelNormal): _visited_composed_classes = (Animal,) name (str): [optional] # noqa: E501 access_key_id (str): [optional] # noqa: E501 - secret_access_key (str): [optional] # noqa: E501 + secret_access_key (str, none_type): [optional] # noqa: E501 permissions (KeyInfoPermissions): [optional] # noqa: E501 buckets ([KeyInfoBucketsInner]): [optional] # noqa: E501 """ diff --git a/garage_admin_sdk/model/key_info_buckets_inner.py b/garage_admin_sdk/model/key_info_buckets_inner.py index e3a8e18..232879f 100644 --- a/garage_admin_sdk/model/key_info_buckets_inner.py +++ b/garage_admin_sdk/model/key_info_buckets_inner.py @@ -1,9 +1,9 @@ """ - Garage Administration API v0+garage-v0.8.0 + Garage Administration API v0+garage-v0.9.0 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.8.0 + The version of the OpenAPI document: v0.9.0 Generated by: https://openapi-generator.tech """ diff --git a/garage_admin_sdk/model/key_info_buckets_inner_permissions.py b/garage_admin_sdk/model/key_info_buckets_inner_permissions.py index 177e8ae..4c681f4 100644 --- a/garage_admin_sdk/model/key_info_buckets_inner_permissions.py +++ b/garage_admin_sdk/model/key_info_buckets_inner_permissions.py @@ -1,9 +1,9 @@ """ - Garage Administration API v0+garage-v0.8.0 + Garage Administration API v0+garage-v0.9.0 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.8.0 + The version of the OpenAPI document: v0.9.0 Generated by: https://openapi-generator.tech """ diff --git a/garage_admin_sdk/model/key_info_permissions.py b/garage_admin_sdk/model/key_info_permissions.py index 035ee39..d3b8fff 100644 --- a/garage_admin_sdk/model/key_info_permissions.py +++ b/garage_admin_sdk/model/key_info_permissions.py @@ -1,9 +1,9 @@ """ - Garage Administration API v0+garage-v0.8.0 + Garage Administration API v0+garage-v0.9.0 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.8.0 + The version of the OpenAPI document: v0.9.0 Generated by: https://openapi-generator.tech """ diff --git a/garage_admin_sdk/model/layout_version.py b/garage_admin_sdk/model/layout_version.py index a3369b2..d0da725 100644 --- a/garage_admin_sdk/model/layout_version.py +++ b/garage_admin_sdk/model/layout_version.py @@ -1,9 +1,9 @@ """ - Garage Administration API v0+garage-v0.8.0 + Garage Administration API v0+garage-v0.9.0 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.8.0 + The version of the OpenAPI document: v0.9.0 Generated by: https://openapi-generator.tech """ @@ -100,9 +100,12 @@ class LayoutVersion(ModelNormal): @classmethod @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + def _from_openapi_data(cls, version, *args, **kwargs): # noqa: E501 """LayoutVersion - a model defined in OpenAPI + Args: + version (int): + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -134,7 +137,6 @@ class LayoutVersion(ModelNormal): Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - version (int): [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -166,6 +168,7 @@ class LayoutVersion(ModelNormal): self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.version = version for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ @@ -186,9 +189,12 @@ class LayoutVersion(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 + def __init__(self, version, *args, **kwargs): # noqa: E501 """LayoutVersion - a model defined in OpenAPI + Args: + version (int): + Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -220,7 +226,6 @@ class LayoutVersion(ModelNormal): Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - version (int): [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -250,6 +255,7 @@ class LayoutVersion(ModelNormal): self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.version = version for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/garage_admin_sdk/model/list_buckets200_response_inner.py b/garage_admin_sdk/model/list_buckets200_response_inner.py index d478a66..2bbb5c9 100644 --- a/garage_admin_sdk/model/list_buckets200_response_inner.py +++ b/garage_admin_sdk/model/list_buckets200_response_inner.py @@ -1,9 +1,9 @@ """ - Garage Administration API v0+garage-v0.8.0 + Garage Administration API v0+garage-v0.9.0 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.8.0 + The version of the OpenAPI document: v0.9.0 Generated by: https://openapi-generator.tech """ diff --git a/garage_admin_sdk/model/list_buckets200_response_inner_local_aliases_inner.py b/garage_admin_sdk/model/list_buckets200_response_inner_local_aliases_inner.py index 083c503..4788d61 100644 --- a/garage_admin_sdk/model/list_buckets200_response_inner_local_aliases_inner.py +++ b/garage_admin_sdk/model/list_buckets200_response_inner_local_aliases_inner.py @@ -1,9 +1,9 @@ """ - Garage Administration API v0+garage-v0.8.0 + Garage Administration API v0+garage-v0.9.0 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.8.0 + The version of the OpenAPI document: v0.9.0 Generated by: https://openapi-generator.tech """ diff --git a/garage_admin_sdk/model/list_keys200_response_inner.py b/garage_admin_sdk/model/list_keys200_response_inner.py index 9a6f276..f270913 100644 --- a/garage_admin_sdk/model/list_keys200_response_inner.py +++ b/garage_admin_sdk/model/list_keys200_response_inner.py @@ -1,9 +1,9 @@ """ - Garage Administration API v0+garage-v0.8.0 + Garage Administration API v0+garage-v0.9.0 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.8.0 + The version of the OpenAPI document: v0.9.0 Generated by: https://openapi-generator.tech """ diff --git a/garage_admin_sdk/model/node_cluster_info.py b/garage_admin_sdk/model/node_cluster_info.py index 868bf9a..843c9e3 100644 --- a/garage_admin_sdk/model/node_cluster_info.py +++ b/garage_admin_sdk/model/node_cluster_info.py @@ -1,9 +1,9 @@ """ - Garage Administration API v0+garage-v0.8.0 + Garage Administration API v0+garage-v0.9.0 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.8.0 + The version of the OpenAPI document: v0.9.0 Generated by: https://openapi-generator.tech """ @@ -82,8 +82,8 @@ class NodeClusterInfo(ModelNormal): """ return { 'zone': (str,), # noqa: E501 - 'capacity': (int, none_type,), # noqa: E501 'tags': ([str],), # noqa: E501 + 'capacity': (int, none_type,), # noqa: E501 } @cached_property @@ -93,8 +93,8 @@ class NodeClusterInfo(ModelNormal): attribute_map = { 'zone': 'zone', # noqa: E501 - 'capacity': 'capacity', # noqa: E501 'tags': 'tags', # noqa: E501 + 'capacity': 'capacity', # noqa: E501 } read_only_vars = { @@ -104,12 +104,11 @@ class NodeClusterInfo(ModelNormal): @classmethod @convert_js_args_to_python_args - def _from_openapi_data(cls, zone, capacity, tags, *args, **kwargs): # noqa: E501 + def _from_openapi_data(cls, zone, tags, *args, **kwargs): # noqa: E501 """NodeClusterInfo - a model defined in OpenAPI Args: zone (str): - capacity (int, none_type): tags ([str]): User defined tags, put whatever makes sense for you, these tags are not interpreted by Garage Keyword Args: @@ -143,6 +142,7 @@ class NodeClusterInfo(ModelNormal): Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) + capacity (int, none_type): [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -175,7 +175,6 @@ class NodeClusterInfo(ModelNormal): self._visited_composed_classes = _visited_composed_classes + (self.__class__,) self.zone = zone - self.capacity = capacity self.tags = tags for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ @@ -197,12 +196,11 @@ class NodeClusterInfo(ModelNormal): ]) @convert_js_args_to_python_args - def __init__(self, zone, capacity, tags, *args, **kwargs): # noqa: E501 + def __init__(self, zone, tags, *args, **kwargs): # noqa: E501 """NodeClusterInfo - a model defined in OpenAPI Args: zone (str): - capacity (int, none_type): tags ([str]): User defined tags, put whatever makes sense for you, these tags are not interpreted by Garage Keyword Args: @@ -236,6 +234,7 @@ class NodeClusterInfo(ModelNormal): Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) + capacity (int, none_type): [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -266,7 +265,6 @@ class NodeClusterInfo(ModelNormal): self._visited_composed_classes = _visited_composed_classes + (self.__class__,) self.zone = zone - self.capacity = capacity self.tags = tags for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ diff --git a/garage_admin_sdk/model/node_network_info.py b/garage_admin_sdk/model/node_network_info.py index aeda1fc..1dcbb73 100644 --- a/garage_admin_sdk/model/node_network_info.py +++ b/garage_admin_sdk/model/node_network_info.py @@ -1,9 +1,9 @@ """ - Garage Administration API v0+garage-v0.8.0 + Garage Administration API v0+garage-v0.9.0 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.8.0 + The version of the OpenAPI document: v0.9.0 Generated by: https://openapi-generator.tech """ @@ -85,6 +85,7 @@ class NodeNetworkInfo(ModelNormal): 'is_up': (bool,), # noqa: E501 'last_seen_secs_ago': (int, none_type,), # noqa: E501 'hostname': (str,), # noqa: E501 + 'id': (str,), # noqa: E501 } @cached_property @@ -94,9 +95,10 @@ class NodeNetworkInfo(ModelNormal): attribute_map = { 'addr': 'addr', # noqa: E501 - 'is_up': 'is_up', # noqa: E501 - 'last_seen_secs_ago': 'last_seen_secs_ago', # noqa: E501 + 'is_up': 'isUp', # noqa: E501 + 'last_seen_secs_ago': 'lastSeenSecsAgo', # noqa: E501 'hostname': 'hostname', # noqa: E501 + 'id': 'id', # noqa: E501 } read_only_vars = { @@ -146,6 +148,7 @@ class NodeNetworkInfo(ModelNormal): Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) + id (str): [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -241,6 +244,7 @@ class NodeNetworkInfo(ModelNormal): Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) + id (str): [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) diff --git a/garage_admin_sdk/model/node_role_change.py b/garage_admin_sdk/model/node_role_change.py new file mode 100644 index 0000000..29037ef --- /dev/null +++ b/garage_admin_sdk/model/node_role_change.py @@ -0,0 +1,338 @@ +""" + Garage Administration API v0+garage-v0.9.0 + + 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.9.0 + 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.node_role_remove import NodeRoleRemove + from garage_admin_sdk.model.node_role_update import NodeRoleUpdate + globals()['NodeRoleRemove'] = NodeRoleRemove + globals()['NodeRoleUpdate'] = NodeRoleUpdate + + +class NodeRoleChange(ModelComposed): + """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 { + 'id': (str,), # noqa: E501 + 'remove': (bool,), # noqa: E501 + 'zone': (str,), # noqa: E501 + 'capacity': (int, none_type,), # noqa: E501 + 'tags': ([str],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'remove': 'remove', # noqa: E501 + 'zone': 'zone', # noqa: E501 + 'capacity': 'capacity', # noqa: E501 + 'tags': 'tags', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """NodeRoleChange - 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,) + id (str): [optional] # noqa: E501 + remove (bool): [optional] # noqa: E501 + zone (str): [optional] # noqa: E501 + capacity (int, none_type): [optional] # noqa: E501 + tags ([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', ()) + + 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__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # 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', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """NodeRoleChange - 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,) + id (str): [optional] # noqa: E501 + remove (bool): [optional] # noqa: E501 + zone (str): [optional] # noqa: E501 + capacity (int, none_type): [optional] # noqa: E501 + tags ([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__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # 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.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + ], + 'allOf': [ + ], + 'oneOf': [ + NodeRoleRemove, + NodeRoleUpdate, + ], + } diff --git a/garage_admin_sdk/model/node_role_remove.py b/garage_admin_sdk/model/node_role_remove.py new file mode 100644 index 0000000..b4b2e9c --- /dev/null +++ b/garage_admin_sdk/model/node_role_remove.py @@ -0,0 +1,275 @@ +""" + Garage Administration API v0+garage-v0.9.0 + + 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.9.0 + 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 NodeRoleRemove(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 { + 'id': (str,), # noqa: E501 + 'remove': (bool,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'remove': 'remove', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, remove, *args, **kwargs): # noqa: E501 + """NodeRoleRemove - a model defined in OpenAPI + + Args: + id (str): + remove (bool): + + 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,) + """ + + _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__,) + + self.id = id + self.remove = remove + 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, id, remove, *args, **kwargs): # noqa: E501 + """NodeRoleRemove - a model defined in OpenAPI + + Args: + id (str): + remove (bool): + + 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,) + """ + + _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__,) + + self.id = id + self.remove = remove + 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.") diff --git a/garage_admin_sdk/model/node_role_update.py b/garage_admin_sdk/model/node_role_update.py new file mode 100644 index 0000000..59b0cd2 --- /dev/null +++ b/garage_admin_sdk/model/node_role_update.py @@ -0,0 +1,287 @@ +""" + Garage Administration API v0+garage-v0.9.0 + + 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.9.0 + 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 NodeRoleUpdate(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 { + 'id': (str,), # noqa: E501 + 'zone': (str,), # noqa: E501 + 'capacity': (int, none_type,), # noqa: E501 + 'tags': ([str],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'zone': 'zone', # noqa: E501 + 'capacity': 'capacity', # noqa: E501 + 'tags': 'tags', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, zone, capacity, tags, *args, **kwargs): # noqa: E501 + """NodeRoleUpdate - a model defined in OpenAPI + + Args: + id (str): + zone (str): + capacity (int, none_type): + tags ([str]): + + 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,) + """ + + _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__,) + + self.id = id + self.zone = zone + self.capacity = capacity + self.tags = tags + 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, id, zone, capacity, tags, *args, **kwargs): # noqa: E501 + """NodeRoleUpdate - a model defined in OpenAPI + + Args: + id (str): + zone (str): + capacity (int, none_type): + tags ([str]): + + 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,) + """ + + _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__,) + + self.id = id + self.zone = zone + self.capacity = capacity + self.tags = tags + 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.") diff --git a/garage_admin_sdk/model/update_bucket_request.py b/garage_admin_sdk/model/update_bucket_request.py index 63f3915..a3c31b7 100644 --- a/garage_admin_sdk/model/update_bucket_request.py +++ b/garage_admin_sdk/model/update_bucket_request.py @@ -1,9 +1,9 @@ """ - Garage Administration API v0+garage-v0.8.0 + Garage Administration API v0+garage-v0.9.0 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.8.0 + The version of the OpenAPI document: v0.9.0 Generated by: https://openapi-generator.tech """ diff --git a/garage_admin_sdk/model/update_bucket_request_quotas.py b/garage_admin_sdk/model/update_bucket_request_quotas.py index 437f92b..68605b4 100644 --- a/garage_admin_sdk/model/update_bucket_request_quotas.py +++ b/garage_admin_sdk/model/update_bucket_request_quotas.py @@ -1,9 +1,9 @@ """ - Garage Administration API v0+garage-v0.8.0 + Garage Administration API v0+garage-v0.9.0 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.8.0 + The version of the OpenAPI document: v0.9.0 Generated by: https://openapi-generator.tech """ diff --git a/garage_admin_sdk/model/update_bucket_request_website_access.py b/garage_admin_sdk/model/update_bucket_request_website_access.py index cc15778..e31c034 100644 --- a/garage_admin_sdk/model/update_bucket_request_website_access.py +++ b/garage_admin_sdk/model/update_bucket_request_website_access.py @@ -1,9 +1,9 @@ """ - Garage Administration API v0+garage-v0.8.0 + Garage Administration API v0+garage-v0.9.0 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.8.0 + The version of the OpenAPI document: v0.9.0 Generated by: https://openapi-generator.tech """ diff --git a/garage_admin_sdk/model/update_key_request.py b/garage_admin_sdk/model/update_key_request.py index e119f65..18edca5 100644 --- a/garage_admin_sdk/model/update_key_request.py +++ b/garage_admin_sdk/model/update_key_request.py @@ -1,9 +1,9 @@ """ - Garage Administration API v0+garage-v0.8.0 + Garage Administration API v0+garage-v0.9.0 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.8.0 + The version of the OpenAPI document: v0.9.0 Generated by: https://openapi-generator.tech """ diff --git a/garage_admin_sdk/model/update_key_request_allow.py b/garage_admin_sdk/model/update_key_request_allow.py index 9ddb4af..609ed60 100644 --- a/garage_admin_sdk/model/update_key_request_allow.py +++ b/garage_admin_sdk/model/update_key_request_allow.py @@ -1,9 +1,9 @@ """ - Garage Administration API v0+garage-v0.8.0 + Garage Administration API v0+garage-v0.9.0 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.8.0 + The version of the OpenAPI document: v0.9.0 Generated by: https://openapi-generator.tech """ diff --git a/garage_admin_sdk/model/update_key_request_deny.py b/garage_admin_sdk/model/update_key_request_deny.py index d8ef3dd..5e3af6a 100644 --- a/garage_admin_sdk/model/update_key_request_deny.py +++ b/garage_admin_sdk/model/update_key_request_deny.py @@ -1,9 +1,9 @@ """ - Garage Administration API v0+garage-v0.8.0 + Garage Administration API v0+garage-v0.9.0 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.8.0 + The version of the OpenAPI document: v0.9.0 Generated by: https://openapi-generator.tech """ diff --git a/garage_admin_sdk/model_utils.py b/garage_admin_sdk/model_utils.py index fc7c0fc..46d7928 100644 --- a/garage_admin_sdk/model_utils.py +++ b/garage_admin_sdk/model_utils.py @@ -1,9 +1,9 @@ """ - Garage Administration API v0+garage-v0.8.0 + Garage Administration API v0+garage-v0.9.0 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.8.0 + The version of the OpenAPI document: v0.9.0 Generated by: https://openapi-generator.tech """ diff --git a/garage_admin_sdk/models/__init__.py b/garage_admin_sdk/models/__init__.py index a516b66..d8682b3 100644 --- a/garage_admin_sdk/models/__init__.py +++ b/garage_admin_sdk/models/__init__.py @@ -13,6 +13,7 @@ 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.allow_bucket_key_request import AllowBucketKeyRequest from garage_admin_sdk.model.allow_bucket_key_request_permissions import AllowBucketKeyRequestPermissions +from garage_admin_sdk.model.apply_layout200_response import ApplyLayout200Response from garage_admin_sdk.model.bucket_info import BucketInfo from garage_admin_sdk.model.bucket_info_quotas import BucketInfoQuotas from garage_admin_sdk.model.bucket_info_website_config import BucketInfoWebsiteConfig @@ -21,6 +22,7 @@ from garage_admin_sdk.model.cluster_layout import ClusterLayout from garage_admin_sdk.model.create_bucket_request import CreateBucketRequest from garage_admin_sdk.model.create_bucket_request_local_alias import CreateBucketRequestLocalAlias from garage_admin_sdk.model.create_bucket_request_local_alias_allow import CreateBucketRequestLocalAliasAllow +from garage_admin_sdk.model.get_health200_response import GetHealth200Response from garage_admin_sdk.model.get_nodes200_response import GetNodes200Response from garage_admin_sdk.model.import_key_request import ImportKeyRequest from garage_admin_sdk.model.key_info import KeyInfo @@ -33,6 +35,9 @@ from garage_admin_sdk.model.list_buckets200_response_inner_local_aliases_inner i 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_network_info import NodeNetworkInfo +from garage_admin_sdk.model.node_role_change import NodeRoleChange +from garage_admin_sdk.model.node_role_remove import NodeRoleRemove +from garage_admin_sdk.model.node_role_update import NodeRoleUpdate from garage_admin_sdk.model.update_bucket_request import UpdateBucketRequest from garage_admin_sdk.model.update_bucket_request_quotas import UpdateBucketRequestQuotas from garage_admin_sdk.model.update_bucket_request_website_access import UpdateBucketRequestWebsiteAccess diff --git a/garage_admin_sdk/rest.py b/garage_admin_sdk/rest.py index 2f0ab6c..f18813a 100644 --- a/garage_admin_sdk/rest.py +++ b/garage_admin_sdk/rest.py @@ -1,9 +1,9 @@ """ - Garage Administration API v0+garage-v0.8.0 + Garage Administration API v0+garage-v0.9.0 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.8.0 + The version of the OpenAPI document: v0.9.0 Generated by: https://openapi-generator.tech """ diff --git a/setup.py b/setup.py index d07078e..e69f3da 100644 --- a/setup.py +++ b/setup.py @@ -1,9 +1,9 @@ """ - Garage Administration API v0+garage-v0.8.0 + Garage Administration API v0+garage-v0.9.0 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.8.0 + The version of the OpenAPI document: v0.9.0 Generated by: https://openapi-generator.tech """ @@ -11,7 +11,7 @@ from setuptools import setup, find_packages # noqa: H301 NAME = "garage-admin-sdk-python" -VERSION = "0.8.0" +VERSION = "0.9.0" # To install the library, run the following # # python setup.py install @@ -27,11 +27,11 @@ REQUIRES = [ setup( name=NAME, version=VERSION, - description="Garage Administration API v0+garage-v0.8.0", + description="Garage Administration API v0+garage-v0.9.0", author="OpenAPI Generator community", author_email="team@openapitools.org", url="", - keywords=["OpenAPI", "OpenAPI-Generator", "Garage Administration API v0+garage-v0.8.0"], + keywords=["OpenAPI", "OpenAPI-Generator", "Garage Administration API v0+garage-v0.9.0"], python_requires=">=3.6", install_requires=REQUIRES, packages=find_packages(exclude=["test", "tests"]), diff --git a/test/test_apply_layout200_response.py b/test/test_apply_layout200_response.py new file mode 100644 index 0000000..55c83ef --- /dev/null +++ b/test/test_apply_layout200_response.py @@ -0,0 +1,37 @@ +""" + Garage Administration API v0+garage-v0.9.0 + + 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.9.0 + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import garage_admin_sdk +from garage_admin_sdk.model.cluster_layout import ClusterLayout +globals()['ClusterLayout'] = ClusterLayout +from garage_admin_sdk.model.apply_layout200_response import ApplyLayout200Response + + +class TestApplyLayout200Response(unittest.TestCase): + """ApplyLayout200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testApplyLayout200Response(self): + """Test ApplyLayout200Response""" + # FIXME: construct object with mandatory attributes with example values + # model = ApplyLayout200Response() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_get_health200_response.py b/test/test_get_health200_response.py new file mode 100644 index 0000000..87357f0 --- /dev/null +++ b/test/test_get_health200_response.py @@ -0,0 +1,35 @@ +""" + Garage Administration API v0+garage-v0.9.0 + + 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.9.0 + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import garage_admin_sdk +from garage_admin_sdk.model.get_health200_response import GetHealth200Response + + +class TestGetHealth200Response(unittest.TestCase): + """GetHealth200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testGetHealth200Response(self): + """Test GetHealth200Response""" + # FIXME: construct object with mandatory attributes with example values + # model = GetHealth200Response() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_node_role_change.py b/test/test_node_role_change.py new file mode 100644 index 0000000..3ef10b8 --- /dev/null +++ b/test/test_node_role_change.py @@ -0,0 +1,39 @@ +""" + Garage Administration API v0+garage-v0.9.0 + + 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.9.0 + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import garage_admin_sdk +from garage_admin_sdk.model.node_role_remove import NodeRoleRemove +from garage_admin_sdk.model.node_role_update import NodeRoleUpdate +globals()['NodeRoleRemove'] = NodeRoleRemove +globals()['NodeRoleUpdate'] = NodeRoleUpdate +from garage_admin_sdk.model.node_role_change import NodeRoleChange + + +class TestNodeRoleChange(unittest.TestCase): + """NodeRoleChange unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testNodeRoleChange(self): + """Test NodeRoleChange""" + # FIXME: construct object with mandatory attributes with example values + # model = NodeRoleChange() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_node_role_remove.py b/test/test_node_role_remove.py new file mode 100644 index 0000000..bf5c65a --- /dev/null +++ b/test/test_node_role_remove.py @@ -0,0 +1,35 @@ +""" + Garage Administration API v0+garage-v0.9.0 + + 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.9.0 + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import garage_admin_sdk +from garage_admin_sdk.model.node_role_remove import NodeRoleRemove + + +class TestNodeRoleRemove(unittest.TestCase): + """NodeRoleRemove unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testNodeRoleRemove(self): + """Test NodeRoleRemove""" + # FIXME: construct object with mandatory attributes with example values + # model = NodeRoleRemove() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_node_role_update.py b/test/test_node_role_update.py new file mode 100644 index 0000000..5a1df39 --- /dev/null +++ b/test/test_node_role_update.py @@ -0,0 +1,35 @@ +""" + Garage Administration API v0+garage-v0.9.0 + + 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.9.0 + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import garage_admin_sdk +from garage_admin_sdk.model.node_role_update import NodeRoleUpdate + + +class TestNodeRoleUpdate(unittest.TestCase): + """NodeRoleUpdate unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testNodeRoleUpdate(self): + """Test NodeRoleUpdate""" + # FIXME: construct object with mandatory attributes with example values + # model = NodeRoleUpdate() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main()