Skip to content

Commit

Permalink
Merge pull request #31 from p-fruck/actions/auto-update-1646072512
Browse files Browse the repository at this point in the history
API-Update: Switch method to PUT for reinstall_instance action
  • Loading branch information
p-fruck authored Feb 28, 2022
2 parents 09d1520 + cec3742 commit a3bc7c5
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 13 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ Class | Method | HTTP request | Description
*InstanceActionsAuditsApi* | [**retrieve_instances_actions_audits_list**](docs/InstanceActionsAuditsApi.md#retrieve_instances_actions_audits_list) | **GET** /v1/compute/instances/actions/audits | List history about your actions (audit) triggered via the API
*InstancesApi* | [**cancel_instance**](docs/InstancesApi.md#cancel_instance) | **POST** /v1/compute/instances/{instanceId}/cancel | Cancel specific instance by id
*InstancesApi* | [**create_instance**](docs/InstancesApi.md#create_instance) | **POST** /v1/compute/instances | Create a new instance
*InstancesApi* | [**reinstall_instance**](docs/InstancesApi.md#reinstall_instance) | **PATCH** /v1/compute/instances/{instanceId} | Reinstall specific instance
*InstancesApi* | [**reinstall_instance**](docs/InstancesApi.md#reinstall_instance) | **PUT** /v1/compute/instances/{instanceId} | Reinstall specific instance
*InstancesApi* | [**retrieve_instance**](docs/InstancesApi.md#retrieve_instance) | **GET** /v1/compute/instances/{instanceId} | Get specific instance by id
*InstancesApi* | [**retrieve_instances_list**](docs/InstancesApi.md#retrieve_instances_list) | **GET** /v1/compute/instances | List instances
*InstancesAuditsApi* | [**retrieve_instances_audits_list**](docs/InstancesAuditsApi.md#retrieve_instances_audits_list) | **GET** /v1/compute/instances/audits | List history about your instances (audit) triggered via the API
Expand Down
2 changes: 1 addition & 1 deletion custom/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"packageName": "pfruck_contabo",
"projectName": "pfruck_contabo",
"packageUrl": "https://github.com/p-fruck/python-contabo",
"packageVersion": "1.6.0"
"packageVersion": "1.7.0"
}
2 changes: 1 addition & 1 deletion docs/InstancesApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Method | HTTP request | Description
------------- | ------------- | -------------
[**cancel_instance**](InstancesApi.md#cancel_instance) | **POST** /v1/compute/instances/{instanceId}/cancel | Cancel specific instance by id
[**create_instance**](InstancesApi.md#create_instance) | **POST** /v1/compute/instances | Create a new instance
[**reinstall_instance**](InstancesApi.md#reinstall_instance) | **PATCH** /v1/compute/instances/{instanceId} | Reinstall specific instance
[**reinstall_instance**](InstancesApi.md#reinstall_instance) | **PUT** /v1/compute/instances/{instanceId} | Reinstall specific instance
[**retrieve_instance**](InstancesApi.md#retrieve_instance) | **GET** /v1/compute/instances/{instanceId} | Get specific instance by id
[**retrieve_instances_list**](InstancesApi.md#retrieve_instances_list) | **GET** /v1/compute/instances | List instances

Expand Down
2 changes: 1 addition & 1 deletion pfruck_contabo/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"""


__version__ = "1.6.0"
__version__ = "1.7.0"

# import ApiClient
from pfruck_contabo.api_client import ApiClient
Expand Down
2 changes: 1 addition & 1 deletion pfruck_contabo/api/instances_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ def __init__(self, api_client=None):
],
'endpoint_path': '/v1/compute/instances/{instanceId}',
'operation_id': 'reinstall_instance',
'http_method': 'PATCH',
'http_method': 'PUT',
'servers': None,
},
params_map={
Expand Down
9 changes: 4 additions & 5 deletions pfruck_contabo/api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def __init__(self, configuration=None, header_name=None, header_value=None,
self.default_headers[header_name] = header_value
self.cookie = cookie
# Set default User-Agent.
self.user_agent = 'OpenAPI-Generator/1.6.0/python'
self.user_agent = 'OpenAPI-Generator/1.7.0/python'

def __enter__(self):
return self
Expand Down Expand Up @@ -582,7 +582,7 @@ def select_header_content_type(self, content_types, method=None, body=None):
:return: Content-Type (e.g. application/json).
"""
if not content_types:
return None
return 'application/json'

content_types = [x.lower() for x in content_types]

Expand Down Expand Up @@ -842,11 +842,10 @@ def call_with_http_info(self, **kwargs):
content_type_headers_list = self.headers_map['content_type']
if content_type_headers_list:
if params['body'] != "":
content_types_list = self.api_client.select_header_content_type(
header_list = self.api_client.select_header_content_type(
content_type_headers_list, self.settings['http_method'],
params['body'])
if content_types_list:
params['header']['Content-Type'] = content_types_list
params['header']['Content-Type'] = header_list

return self.api_client.call_api(
self.settings['endpoint_path'], self.settings['http_method'],
Expand Down
2 changes: 1 addition & 1 deletion pfruck_contabo/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ def to_debug_report(self):
"OS: {env}\n"\
"Python Version: {pyversion}\n"\
"Version of the API: 1.0.0\n"\
"SDK Package Version: 1.6.0".\
"SDK Package Version: 1.7.0".\
format(env=sys.platform, pyversion=sys.version)

def get_host_settings(self):
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from setuptools import setup, find_packages # noqa: H301

NAME = "pfruck_contabo"
VERSION = "1.6.0"
VERSION = "1.7.0"
# To install the library, run the following
#
# python setup.py install
Expand Down Expand Up @@ -159,7 +159,7 @@
*InstanceActionsAuditsApi* | [**retrieve_instances_actions_audits_list**](https://github.com/p-fruck/python-contabo/blob/main/docs/InstanceActionsAuditsApi.md#retrieve_instances_actions_audits_list) | **GET** /v1/compute/instances/actions/audits | List history about your actions (audit) triggered via the API
*InstancesApi* | [**cancel_instance**](https://github.com/p-fruck/python-contabo/blob/main/docs/InstancesApi.md#cancel_instance) | **POST** /v1/compute/instances/{instanceId}/cancel | Cancel specific instance by id
*InstancesApi* | [**create_instance**](https://github.com/p-fruck/python-contabo/blob/main/docs/InstancesApi.md#create_instance) | **POST** /v1/compute/instances | Create a new instance
*InstancesApi* | [**reinstall_instance**](https://github.com/p-fruck/python-contabo/blob/main/docs/InstancesApi.md#reinstall_instance) | **PATCH** /v1/compute/instances/{instanceId} | Reinstall specific instance
*InstancesApi* | [**reinstall_instance**](https://github.com/p-fruck/python-contabo/blob/main/docs/InstancesApi.md#reinstall_instance) | **PUT** /v1/compute/instances/{instanceId} | Reinstall specific instance
*InstancesApi* | [**retrieve_instance**](https://github.com/p-fruck/python-contabo/blob/main/docs/InstancesApi.md#retrieve_instance) | **GET** /v1/compute/instances/{instanceId} | Get specific instance by id
*InstancesApi* | [**retrieve_instances_list**](https://github.com/p-fruck/python-contabo/blob/main/docs/InstancesApi.md#retrieve_instances_list) | **GET** /v1/compute/instances | List instances
*InstancesAuditsApi* | [**retrieve_instances_audits_list**](https://github.com/p-fruck/python-contabo/blob/main/docs/InstancesAuditsApi.md#retrieve_instances_audits_list) | **GET** /v1/compute/instances/audits | List history about your instances (audit) triggered via the API
Expand Down

0 comments on commit a3bc7c5

Please sign in to comment.