Update with required fields

This commit is contained in:
Quentin 2022-09-14 15:45:21 +02:00
parent bc28db7463
commit a015827776
Signed by: quentin
GPG Key ID: E9602264D639FF68
21 changed files with 214 additions and 120 deletions

View File

@ -79,7 +79,7 @@ a large range of the API are provided. Thanks in advance :-)
```bash
git clone ...
git submodule init
git submodule update --init
```
### (Re)generate libraries

2
garage

@ -1 +1 @@
Subproject commit 5a7675cf7cda7c92e016a183cdc921ef97554759
Subproject commit 008119e1ba24f19f8f8fdaec7a451b209ef56a12

View File

@ -81,11 +81,11 @@ 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 optionnaly set a friendly name for this key\" (optional)
) # AddKeyRequest | \"You can set a friendly name for this key, send an empty string instead\"
try:
# Create a new API key
api_response = api_instance.add_key(add_key_request=add_key_request)
api_response = api_instance.add_key(add_key_request)
pprint(api_response)
except garage_admin_sdk.ApiException as e:
print("Exception when calling KeyApi->add_key: %s\n" % e)

View File

@ -4,9 +4,9 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**version** | **int** | | [optional]
**roles** | [**{str: (NodeClusterInfo,)}**](NodeClusterInfo.md) | | [optional]
**staged_role_changes** | [**{str: (NodeClusterInfo,)}**](NodeClusterInfo.md) | | [optional]
**version** | **int** | |
**roles** | [**{str: (NodeClusterInfo,)}**](NodeClusterInfo.md) | |
**staged_role_changes** | [**{str: (NodeClusterInfo,)}**](NodeClusterInfo.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)

View File

@ -4,10 +4,10 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**node** | **str** | | [optional]
**garage_version** | **str** | | [optional]
**known_nodes** | [**{str: (NodeNetworkInfo,)}**](NodeNetworkInfo.md) | | [optional]
**layout** | [**ClusterLayout**](ClusterLayout.md) | | [optional]
**node** | **str** | |
**garage_version** | **str** | |
**known_nodes** | [**{str: (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]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -4,9 +4,9 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **str** | | [optional]
**access_key_id** | **str** | | [optional]
**secret_access_key** | **str** | | [optional]
**name** | **str** | |
**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]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -14,7 +14,7 @@ Method | HTTP request | Description
# **add_key**
> KeyInfo add_key()
> KeyInfo add_key(add_key_request)
Create a new API key
@ -53,13 +53,12 @@ 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 optionnaly set a friendly name for this key\" (optional)
) # AddKeyRequest | \"You can set a friendly name for this key, send an empty string instead\"
# example passing only required values which don't have defaults set
# and optional values
try:
# Create a new API key
api_response = api_instance.add_key(add_key_request=add_key_request)
api_response = api_instance.add_key(add_key_request)
pprint(api_response)
except garage_admin_sdk.ApiException as e:
print("Exception when calling KeyApi->add_key: %s\n" % e)
@ -70,7 +69,7 @@ with garage_admin_sdk.ApiClient(configuration) as api_client:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**add_key_request** | [**AddKeyRequest**](AddKeyRequest.md)| \"You can optionnaly set a friendly name for this key\" | [optional]
**add_key_request** | [**AddKeyRequest**](AddKeyRequest.md)| \"You can set a friendly name for this key, send an empty string instead\" |
### Return type
@ -251,7 +250,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)
# **import_key**
> KeyInfo import_key()
> KeyInfo import_key(import_key_request)
Import an existing key
@ -292,13 +291,12 @@ with garage_admin_sdk.ApiClient(configuration) as api_client:
name="test-key",
access_key_id="GK31c2f218a2e44f485b94239e",
secret_access_key="b892c0665f0ada8a4755dae98baa3b133590e11dae3bcc1f9d769d67f16c3835",
) # ImportKeyRequest | Information on the key to import (optional)
) # ImportKeyRequest | Information on the key to import
# example passing only required values which don't have defaults set
# and optional values
try:
# Import an existing key
api_response = api_instance.import_key(import_key_request=import_key_request)
api_response = api_instance.import_key(import_key_request)
pprint(api_response)
except garage_admin_sdk.ApiException as e:
print("Exception when calling KeyApi->import_key: %s\n" % e)
@ -309,7 +307,7 @@ with garage_admin_sdk.ApiClient(configuration) as api_client:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**import_key_request** | [**ImportKeyRequest**](ImportKeyRequest.md)| Information on the key to import | [optional]
**import_key_request** | [**ImportKeyRequest**](ImportKeyRequest.md)| Information on the key to import |
### Return type

View File

@ -11,7 +11,7 @@ Method | HTTP request | Description
# **add_layout**
> add_layout()
> add_layout(request_body)
Send modifications to the cluster layout
@ -48,14 +48,17 @@ 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(None),
} # {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. (optional)
"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.
# example passing only required values which don't have defaults set
# and optional values
try:
# Send modifications to the cluster layout
api_instance.add_layout(request_body=request_body)
api_instance.add_layout(request_body)
except garage_admin_sdk.ApiException as e:
print("Exception when calling LayoutApi->add_layout: %s\n" % e)
```
@ -65,7 +68,7 @@ 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. | [optional]
**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. |
### Return type
@ -92,7 +95,7 @@ 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()
> apply_layout(layout_version)
Apply staged layout
@ -130,13 +133,12 @@ with garage_admin_sdk.ApiClient(configuration) as api_client:
api_instance = layout_api.LayoutApi(api_client)
layout_version = LayoutVersion(
version=13,
) # LayoutVersion | Similarly to the CLI, the body must include the version of the new layout that will be created, which MUST be 1 + the value of the currently existing layout in the cluster. (optional)
) # LayoutVersion | Similarly to the CLI, the body must include the version of the new layout that will be created, which MUST be 1 + the value of the currently existing layout in the cluster.
# example passing only required values which don't have defaults set
# and optional values
try:
# Apply staged layout
api_instance.apply_layout(layout_version=layout_version)
api_instance.apply_layout(layout_version)
except garage_admin_sdk.ApiException as e:
print("Exception when calling LayoutApi->apply_layout: %s\n" % e)
```
@ -146,7 +148,7 @@ with garage_admin_sdk.ApiClient(configuration) as api_client:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**layout_version** | [**LayoutVersion**](LayoutVersion.md)| Similarly to the CLI, the body must include the version of the new layout that will be created, which MUST be 1 + the value of the currently existing layout in the cluster. | [optional]
**layout_version** | [**LayoutVersion**](LayoutVersion.md)| Similarly to the CLI, the body must include the version of the new layout that will be created, which MUST be 1 + the value of the currently existing layout in the cluster. |
### Return type
@ -247,7 +249,7 @@ 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)
# **revert_layout**
> revert_layout()
> revert_layout(layout_version)
Clear staged layout
@ -285,13 +287,12 @@ with garage_admin_sdk.ApiClient(configuration) as api_client:
api_instance = layout_api.LayoutApi(api_client)
layout_version = LayoutVersion(
version=13,
) # LayoutVersion | Reverting the staged changes is done by incrementing the version number and clearing the contents of the staged change list. Similarly to the CLI, the body must include the incremented version number, which MUST be 1 + the value of the currently existing layout in the cluster. (optional)
) # LayoutVersion | Reverting the staged changes is done by incrementing the version number and clearing the contents of the staged change list. Similarly to the CLI, the body must include the incremented version number, which MUST be 1 + the value of the currently existing layout in the cluster.
# example passing only required values which don't have defaults set
# and optional values
try:
# Clear staged layout
api_instance.revert_layout(layout_version=layout_version)
api_instance.revert_layout(layout_version)
except garage_admin_sdk.ApiException as e:
print("Exception when calling LayoutApi->revert_layout: %s\n" % e)
```
@ -301,7 +302,7 @@ with garage_admin_sdk.ApiClient(configuration) as api_client:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**layout_version** | [**LayoutVersion**](LayoutVersion.md)| Reverting the staged changes is done by incrementing the version number and clearing the contents of the staged change list. Similarly to the CLI, the body must include the incremented version number, which MUST be 1 + the value of the currently existing layout in the cluster. | [optional]
**layout_version** | [**LayoutVersion**](LayoutVersion.md)| Reverting the staged changes is done by incrementing the version number and clearing the contents of the staged change list. Similarly to the CLI, the body must include the incremented version number, which MUST be 1 + the value of the currently existing layout in the cluster. |
### Return type

View File

@ -4,7 +4,7 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **str** | | [optional]
**id** | **str** | |
**name** | **str** | | [optional]
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]

View File

@ -4,9 +4,9 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**zone** | **str** | | [optional]
**capacity** | **int** | | [optional]
**tags** | **[str]** | User defined tags, put whatever makes sense for you, these tags are not interpreted by Garage | [optional]
**zone** | **str** | |
**capacity** | **int** | |
**tags** | **[str]** | User defined tags, put whatever makes sense for you, these tags are not interpreted by Garage |
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -4,10 +4,10 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**addr** | **str** | | [optional]
**is_up** | **bool** | | [optional]
**last_seen_secs_ago** | **int** | | [optional]
**hostname** | **str** | | [optional]
**addr** | **str** | |
**is_up** | **bool** | |
**last_seen_secs_ago** | **int, none_type** | |
**hostname** | **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)

View File

@ -9,7 +9,7 @@ Method | HTTP request | Description
# **add_node**
> [AddNode200ResponseInner] add_node()
> [AddNode200ResponseInner] add_node(request_body)
Connect target node to other Garage nodes
@ -45,13 +45,12 @@ configuration = garage_admin_sdk.Configuration(
with garage_admin_sdk.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = nodes_api.NodesApi(api_client)
request_body = ["ec79480e0ce52ae26fd00c9da684e4fa56658d9c64cdcecb094e936de0bfe71f@10.0.0.11:3901","4a6ae5a1d0d33bf895f5bb4f0a418b7dc94c47c0dd2eb108d1158f3c8f60b0ff@10.0.0.12:3901"] # [str] | (optional)
request_body = ["ec79480e0ce52ae26fd00c9da684e4fa56658d9c64cdcecb094e936de0bfe71f@10.0.0.11:3901","4a6ae5a1d0d33bf895f5bb4f0a418b7dc94c47c0dd2eb108d1158f3c8f60b0ff@10.0.0.12:3901"] # [str] |
# example passing only required values which don't have defaults set
# and optional values
try:
# Connect target node to other Garage nodes
api_response = api_instance.add_node(request_body=request_body)
api_response = api_instance.add_node(request_body)
pprint(api_response)
except garage_admin_sdk.ApiException as e:
print("Exception when calling NodesApi->add_node: %s\n" % e)
@ -62,7 +61,7 @@ with garage_admin_sdk.ApiClient(configuration) as api_client:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**request_body** | **[str]**| | [optional]
**request_body** | **[str]**| |
### Return type

View File

@ -54,7 +54,9 @@ class KeyApi(object):
'all': [
'add_key_request',
],
'required': [],
'required': [
'add_key_request',
],
'nullable': [
],
'enum': [
@ -204,7 +206,9 @@ class KeyApi(object):
'all': [
'import_key_request',
],
'required': [],
'required': [
'import_key_request',
],
'nullable': [
],
'enum': [
@ -394,6 +398,7 @@ class KeyApi(object):
def add_key(
self,
add_key_request,
**kwargs
):
"""Create a new API key # noqa: E501
@ -402,12 +407,13 @@ 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.add_key(async_req=True)
>>> thread = api.add_key(add_key_request, async_req=True)
>>> result = thread.get()
Args:
add_key_request (AddKeyRequest): \"You can set a friendly name for this key, send an empty string instead\"
Keyword Args:
add_key_request (AddKeyRequest): \"You can optionnaly set a friendly name for this key\" . [optional]
_return_http_data_only (bool): response data without head status
code and headers. Default is True.
_preload_content (bool): if False, the urllib3.HTTPResponse object
@ -469,6 +475,8 @@ class KeyApi(object):
'_content_type')
kwargs['_host_index'] = kwargs.get('_host_index')
kwargs['_request_auths'] = kwargs.get('_request_auths', None)
kwargs['add_key_request'] = \
add_key_request
return self.add_key_endpoint.call_with_http_info(**kwargs)
def delete_key(
@ -639,6 +647,7 @@ class KeyApi(object):
def import_key(
self,
import_key_request,
**kwargs
):
"""Import an existing key # noqa: E501
@ -647,12 +656,13 @@ 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.import_key(async_req=True)
>>> thread = api.import_key(import_key_request, async_req=True)
>>> result = thread.get()
Args:
import_key_request (ImportKeyRequest): Information on the key to import
Keyword Args:
import_key_request (ImportKeyRequest): Information on the key to import . [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
@ -714,6 +724,8 @@ class KeyApi(object):
'_content_type')
kwargs['_host_index'] = kwargs.get('_host_index')
kwargs['_request_auths'] = kwargs.get('_request_auths', None)
kwargs['import_key_request'] = \
import_key_request
return self.import_key_endpoint.call_with_http_info(**kwargs)
def list_keys(

View File

@ -52,7 +52,9 @@ class LayoutApi(object):
'all': [
'request_body',
],
'required': [],
'required': [
'request_body',
],
'nullable': [
],
'enum': [
@ -100,7 +102,9 @@ class LayoutApi(object):
'all': [
'layout_version',
],
'required': [],
'required': [
'layout_version',
],
'nullable': [
],
'enum': [
@ -192,7 +196,9 @@ class LayoutApi(object):
'all': [
'layout_version',
],
'required': [],
'required': [
'layout_version',
],
'nullable': [
],
'enum': [
@ -228,6 +234,7 @@ class LayoutApi(object):
def add_layout(
self,
request_body,
**kwargs
):
"""Send modifications to the cluster layout # noqa: E501
@ -236,12 +243,13 @@ class LayoutApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.add_layout(async_req=True)
>>> thread = api.add_layout(request_body, 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.
Keyword 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. . [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
@ -303,10 +311,13 @@ 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
return self.add_layout_endpoint.call_with_http_info(**kwargs)
def apply_layout(
self,
layout_version,
**kwargs
):
"""Apply staged layout # noqa: E501
@ -315,12 +326,13 @@ class LayoutApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.apply_layout(async_req=True)
>>> thread = api.apply_layout(layout_version, async_req=True)
>>> result = thread.get()
Args:
layout_version (LayoutVersion): Similarly to the CLI, the body must include the version of the new layout that will be created, which MUST be 1 + the value of the currently existing layout in the cluster.
Keyword Args:
layout_version (LayoutVersion): Similarly to the CLI, the body must include the version of the new layout that will be created, which MUST be 1 + the value of the currently existing layout in the cluster. . [optional]
_return_http_data_only (bool): response data without head status
code and headers. Default is True.
_preload_content (bool): if False, the urllib3.HTTPResponse object
@ -382,6 +394,8 @@ class LayoutApi(object):
'_content_type')
kwargs['_host_index'] = kwargs.get('_host_index')
kwargs['_request_auths'] = kwargs.get('_request_auths', None)
kwargs['layout_version'] = \
layout_version
return self.apply_layout_endpoint.call_with_http_info(**kwargs)
def get_layout(
@ -464,6 +478,7 @@ class LayoutApi(object):
def revert_layout(
self,
layout_version,
**kwargs
):
"""Clear staged layout # noqa: E501
@ -472,12 +487,13 @@ class LayoutApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.revert_layout(async_req=True)
>>> thread = api.revert_layout(layout_version, async_req=True)
>>> result = thread.get()
Args:
layout_version (LayoutVersion): Reverting the staged changes is done by incrementing the version number and clearing the contents of the staged change list. Similarly to the CLI, the body must include the incremented version number, which MUST be 1 + the value of the currently existing layout in the cluster.
Keyword Args:
layout_version (LayoutVersion): Reverting the staged changes is done by incrementing the version number and clearing the contents of the staged change list. Similarly to the CLI, the body must include the incremented version number, which MUST be 1 + the value of the currently existing layout in the cluster. . [optional]
_return_http_data_only (bool): response data without head status
code and headers. Default is True.
_preload_content (bool): if False, the urllib3.HTTPResponse object
@ -539,5 +555,7 @@ class LayoutApi(object):
'_content_type')
kwargs['_host_index'] = kwargs.get('_host_index')
kwargs['_request_auths'] = kwargs.get('_request_auths', None)
kwargs['layout_version'] = \
layout_version
return self.revert_layout_endpoint.call_with_http_info(**kwargs)

View File

@ -51,7 +51,9 @@ class NodesApi(object):
'all': [
'request_body',
],
'required': [],
'required': [
'request_body',
],
'nullable': [
],
'enum': [
@ -133,6 +135,7 @@ class NodesApi(object):
def add_node(
self,
request_body,
**kwargs
):
"""Connect target node to other Garage nodes # noqa: E501
@ -141,12 +144,13 @@ class NodesApi(object):
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.add_node(async_req=True)
>>> thread = api.add_node(request_body, async_req=True)
>>> result = thread.get()
Args:
request_body ([str]):
Keyword Args:
request_body ([str]): [optional]
_return_http_data_only (bool): response data without head status
code and headers. Default is True.
_preload_content (bool): if False, the urllib3.HTTPResponse object
@ -208,6 +212,8 @@ class NodesApi(object):
'_content_type')
kwargs['_host_index'] = kwargs.get('_host_index')
kwargs['_request_auths'] = kwargs.get('_request_auths', None)
kwargs['request_body'] = \
request_body
return self.add_node_endpoint.call_with_http_info(**kwargs)
def get_nodes(

View File

@ -110,9 +110,14 @@ class ClusterLayout(ModelNormal):
@classmethod
@convert_js_args_to_python_args
def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
def _from_openapi_data(cls, version, roles, staged_role_changes, *args, **kwargs): # noqa: E501
"""ClusterLayout - a model defined in OpenAPI
Args:
version (int):
roles ({str: (NodeClusterInfo,)}):
staged_role_changes ({str: (NodeClusterInfo,)}):
Keyword Args:
_check_type (bool): if True, values for parameters in openapi_types
will be type checked and a TypeError will be
@ -144,9 +149,6 @@ class ClusterLayout(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
roles ({str: (NodeClusterInfo,)}): [optional] # noqa: E501
staged_role_changes ({str: (NodeClusterInfo,)}): [optional] # noqa: E501
"""
_check_type = kwargs.pop('_check_type', True)
@ -178,6 +180,9 @@ class ClusterLayout(ModelNormal):
self._configuration = _configuration
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
self.version = version
self.roles = roles
self.staged_role_changes = staged_role_changes
for var_name, var_value in kwargs.items():
if var_name not in self.attribute_map and \
self._configuration is not None and \
@ -198,9 +203,14 @@ class ClusterLayout(ModelNormal):
])
@convert_js_args_to_python_args
def __init__(self, *args, **kwargs): # noqa: E501
def __init__(self, version, roles, staged_role_changes, *args, **kwargs): # noqa: E501
"""ClusterLayout - a model defined in OpenAPI
Args:
version (int):
roles ({str: (NodeClusterInfo,)}):
staged_role_changes ({str: (NodeClusterInfo,)}):
Keyword Args:
_check_type (bool): if True, values for parameters in openapi_types
will be type checked and a TypeError will be
@ -232,9 +242,6 @@ class ClusterLayout(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
roles ({str: (NodeClusterInfo,)}): [optional] # noqa: E501
staged_role_changes ({str: (NodeClusterInfo,)}): [optional] # noqa: E501
"""
_check_type = kwargs.pop('_check_type', True)
@ -264,6 +271,9 @@ class ClusterLayout(ModelNormal):
self._configuration = _configuration
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
self.version = version
self.roles = roles
self.staged_role_changes = staged_role_changes
for var_name, var_value in kwargs.items():
if var_name not in self.attribute_map and \
self._configuration is not None and \

View File

@ -114,9 +114,15 @@ class GetNodes200Response(ModelNormal):
@classmethod
@convert_js_args_to_python_args
def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
def _from_openapi_data(cls, node, garage_version, known_nodes, layout, *args, **kwargs): # noqa: E501
"""GetNodes200Response - a model defined in OpenAPI
Args:
node (str):
garage_version (str):
known_nodes ({str: (NodeNetworkInfo,)}):
layout (ClusterLayout):
Keyword Args:
_check_type (bool): if True, values for parameters in openapi_types
will be type checked and a TypeError will be
@ -148,10 +154,6 @@ class GetNodes200Response(ModelNormal):
Animal class but this time we won't travel
through its discriminator because we passed in
_visited_composed_classes = (Animal,)
node (str): [optional] # noqa: E501
garage_version (str): [optional] # noqa: E501
known_nodes ({str: (NodeNetworkInfo,)}): [optional] # noqa: E501
layout (ClusterLayout): [optional] # noqa: E501
"""
_check_type = kwargs.pop('_check_type', True)
@ -183,6 +185,10 @@ class GetNodes200Response(ModelNormal):
self._configuration = _configuration
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
self.node = node
self.garage_version = garage_version
self.known_nodes = known_nodes
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 \
@ -203,9 +209,15 @@ class GetNodes200Response(ModelNormal):
])
@convert_js_args_to_python_args
def __init__(self, *args, **kwargs): # noqa: E501
def __init__(self, node, garage_version, known_nodes, layout, *args, **kwargs): # noqa: E501
"""GetNodes200Response - a model defined in OpenAPI
Args:
node (str):
garage_version (str):
known_nodes ({str: (NodeNetworkInfo,)}):
layout (ClusterLayout):
Keyword Args:
_check_type (bool): if True, values for parameters in openapi_types
will be type checked and a TypeError will be
@ -237,10 +249,6 @@ class GetNodes200Response(ModelNormal):
Animal class but this time we won't travel
through its discriminator because we passed in
_visited_composed_classes = (Animal,)
node (str): [optional] # noqa: E501
garage_version (str): [optional] # noqa: E501
known_nodes ({str: (NodeNetworkInfo,)}): [optional] # noqa: E501
layout (ClusterLayout): [optional] # noqa: E501
"""
_check_type = kwargs.pop('_check_type', True)
@ -270,6 +278,10 @@ class GetNodes200Response(ModelNormal):
self._configuration = _configuration
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
self.node = node
self.garage_version = garage_version
self.known_nodes = known_nodes
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 \

View File

@ -104,9 +104,14 @@ class ImportKeyRequest(ModelNormal):
@classmethod
@convert_js_args_to_python_args
def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
def _from_openapi_data(cls, name, access_key_id, secret_access_key, *args, **kwargs): # noqa: E501
"""ImportKeyRequest - a model defined in OpenAPI
Args:
name (str):
access_key_id (str):
secret_access_key (str):
Keyword Args:
_check_type (bool): if True, values for parameters in openapi_types
will be type checked and a TypeError will be
@ -138,9 +143,6 @@ class ImportKeyRequest(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
access_key_id (str): [optional] # noqa: E501
secret_access_key (str): [optional] # noqa: E501
"""
_check_type = kwargs.pop('_check_type', True)
@ -172,6 +174,9 @@ class ImportKeyRequest(ModelNormal):
self._configuration = _configuration
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
self.name = name
self.access_key_id = access_key_id
self.secret_access_key = secret_access_key
for var_name, var_value in kwargs.items():
if var_name not in self.attribute_map and \
self._configuration is not None and \
@ -192,9 +197,14 @@ class ImportKeyRequest(ModelNormal):
])
@convert_js_args_to_python_args
def __init__(self, *args, **kwargs): # noqa: E501
def __init__(self, name, access_key_id, secret_access_key, *args, **kwargs): # noqa: E501
"""ImportKeyRequest - a model defined in OpenAPI
Args:
name (str):
access_key_id (str):
secret_access_key (str):
Keyword Args:
_check_type (bool): if True, values for parameters in openapi_types
will be type checked and a TypeError will be
@ -226,9 +236,6 @@ class ImportKeyRequest(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
access_key_id (str): [optional] # noqa: E501
secret_access_key (str): [optional] # noqa: E501
"""
_check_type = kwargs.pop('_check_type', True)
@ -258,6 +265,9 @@ class ImportKeyRequest(ModelNormal):
self._configuration = _configuration
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
self.name = name
self.access_key_id = access_key_id
self.secret_access_key = secret_access_key
for var_name, var_value in kwargs.items():
if var_name not in self.attribute_map and \
self._configuration is not None and \

View File

@ -102,9 +102,12 @@ class ListKeys200ResponseInner(ModelNormal):
@classmethod
@convert_js_args_to_python_args
def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
def _from_openapi_data(cls, id, *args, **kwargs): # noqa: E501
"""ListKeys200ResponseInner - a model defined in OpenAPI
Args:
id (str):
Keyword Args:
_check_type (bool): if True, values for parameters in openapi_types
will be type checked and a TypeError will be
@ -136,7 +139,6 @@ class ListKeys200ResponseInner(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
name (str): [optional] # noqa: E501
"""
@ -169,6 +171,7 @@ class ListKeys200ResponseInner(ModelNormal):
self._configuration = _configuration
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
self.id = id
for var_name, var_value in kwargs.items():
if var_name not in self.attribute_map and \
self._configuration is not None and \
@ -189,9 +192,12 @@ class ListKeys200ResponseInner(ModelNormal):
])
@convert_js_args_to_python_args
def __init__(self, *args, **kwargs): # noqa: E501
def __init__(self, id, *args, **kwargs): # noqa: E501
"""ListKeys200ResponseInner - a model defined in OpenAPI
Args:
id (str):
Keyword Args:
_check_type (bool): if True, values for parameters in openapi_types
will be type checked and a TypeError will be
@ -223,7 +229,6 @@ class ListKeys200ResponseInner(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
name (str): [optional] # noqa: E501
"""
@ -254,6 +259,7 @@ class ListKeys200ResponseInner(ModelNormal):
self._configuration = _configuration
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
self.id = id
for var_name, var_value in kwargs.items():
if var_name not in self.attribute_map and \
self._configuration is not None and \

View File

@ -104,9 +104,14 @@ class NodeClusterInfo(ModelNormal):
@classmethod
@convert_js_args_to_python_args
def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
def _from_openapi_data(cls, zone, capacity, tags, *args, **kwargs): # noqa: E501
"""NodeClusterInfo - a model defined in OpenAPI
Args:
zone (str):
capacity (int):
tags ([str]): User defined tags, put whatever makes sense for you, these tags are not interpreted by Garage
Keyword Args:
_check_type (bool): if True, values for parameters in openapi_types
will be type checked and a TypeError will be
@ -138,9 +143,6 @@ class NodeClusterInfo(ModelNormal):
Animal class but this time we won't travel
through its discriminator because we passed in
_visited_composed_classes = (Animal,)
zone (str): [optional] # noqa: E501
capacity (int): [optional] # noqa: E501
tags ([str]): User defined tags, put whatever makes sense for you, these tags are not interpreted by Garage . [optional] # noqa: E501
"""
_check_type = kwargs.pop('_check_type', True)
@ -172,6 +174,9 @@ class NodeClusterInfo(ModelNormal):
self._configuration = _configuration
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 \
self._configuration is not None and \
@ -192,9 +197,14 @@ class NodeClusterInfo(ModelNormal):
])
@convert_js_args_to_python_args
def __init__(self, *args, **kwargs): # noqa: E501
def __init__(self, zone, capacity, tags, *args, **kwargs): # noqa: E501
"""NodeClusterInfo - a model defined in OpenAPI
Args:
zone (str):
capacity (int):
tags ([str]): User defined tags, put whatever makes sense for you, these tags are not interpreted by Garage
Keyword Args:
_check_type (bool): if True, values for parameters in openapi_types
will be type checked and a TypeError will be
@ -226,9 +236,6 @@ class NodeClusterInfo(ModelNormal):
Animal class but this time we won't travel
through its discriminator because we passed in
_visited_composed_classes = (Animal,)
zone (str): [optional] # noqa: E501
capacity (int): [optional] # noqa: E501
tags ([str]): User defined tags, put whatever makes sense for you, these tags are not interpreted by Garage . [optional] # noqa: E501
"""
_check_type = kwargs.pop('_check_type', True)
@ -258,6 +265,9 @@ class NodeClusterInfo(ModelNormal):
self._configuration = _configuration
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 \
self._configuration is not None and \

View File

@ -83,7 +83,7 @@ class NodeNetworkInfo(ModelNormal):
return {
'addr': (str,), # noqa: E501
'is_up': (bool,), # noqa: E501
'last_seen_secs_ago': (int,), # noqa: E501
'last_seen_secs_ago': (int, none_type,), # noqa: E501
'hostname': (str,), # noqa: E501
}
@ -106,9 +106,15 @@ class NodeNetworkInfo(ModelNormal):
@classmethod
@convert_js_args_to_python_args
def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
def _from_openapi_data(cls, addr, is_up, last_seen_secs_ago, hostname, *args, **kwargs): # noqa: E501
"""NodeNetworkInfo - a model defined in OpenAPI
Args:
addr (str):
is_up (bool):
last_seen_secs_ago (int, none_type):
hostname (str):
Keyword Args:
_check_type (bool): if True, values for parameters in openapi_types
will be type checked and a TypeError will be
@ -140,10 +146,6 @@ class NodeNetworkInfo(ModelNormal):
Animal class but this time we won't travel
through its discriminator because we passed in
_visited_composed_classes = (Animal,)
addr (str): [optional] # noqa: E501
is_up (bool): [optional] # noqa: E501
last_seen_secs_ago (int): [optional] # noqa: E501
hostname (str): [optional] # noqa: E501
"""
_check_type = kwargs.pop('_check_type', True)
@ -175,6 +177,10 @@ class NodeNetworkInfo(ModelNormal):
self._configuration = _configuration
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
self.addr = addr
self.is_up = is_up
self.last_seen_secs_ago = last_seen_secs_ago
self.hostname = hostname
for var_name, var_value in kwargs.items():
if var_name not in self.attribute_map and \
self._configuration is not None and \
@ -195,9 +201,15 @@ class NodeNetworkInfo(ModelNormal):
])
@convert_js_args_to_python_args
def __init__(self, *args, **kwargs): # noqa: E501
def __init__(self, addr, is_up, last_seen_secs_ago, hostname, *args, **kwargs): # noqa: E501
"""NodeNetworkInfo - a model defined in OpenAPI
Args:
addr (str):
is_up (bool):
last_seen_secs_ago (int, none_type):
hostname (str):
Keyword Args:
_check_type (bool): if True, values for parameters in openapi_types
will be type checked and a TypeError will be
@ -229,10 +241,6 @@ class NodeNetworkInfo(ModelNormal):
Animal class but this time we won't travel
through its discriminator because we passed in
_visited_composed_classes = (Animal,)
addr (str): [optional] # noqa: E501
is_up (bool): [optional] # noqa: E501
last_seen_secs_ago (int): [optional] # noqa: E501
hostname (str): [optional] # noqa: E501
"""
_check_type = kwargs.pop('_check_type', True)
@ -262,6 +270,10 @@ class NodeNetworkInfo(ModelNormal):
self._configuration = _configuration
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
self.addr = addr
self.is_up = is_up
self.last_seen_secs_ago = last_seen_secs_ago
self.hostname = hostname
for var_name, var_value in kwargs.items():
if var_name not in self.attribute_map and \
self._configuration is not None and \