diff --git a/README.md b/README.md index d3a94c0..85c4a48 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/custom/config.json b/custom/config.json index ffda4d1..91c4d53 100644 --- a/custom/config.json +++ b/custom/config.json @@ -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" } diff --git a/docs/InstancesApi.md b/docs/InstancesApi.md index e755e3c..d4fe72e 100644 --- a/docs/InstancesApi.md +++ b/docs/InstancesApi.md @@ -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 diff --git a/pfruck_contabo/__init__.py b/pfruck_contabo/__init__.py index 58cd435..6fcd244 100644 --- a/pfruck_contabo/__init__.py +++ b/pfruck_contabo/__init__.py @@ -10,7 +10,7 @@ """ -__version__ = "1.6.0" +__version__ = "1.7.0" # import ApiClient from pfruck_contabo.api_client import ApiClient diff --git a/pfruck_contabo/api/instances_api.py b/pfruck_contabo/api/instances_api.py index 06f0ab2..922f1ab 100644 --- a/pfruck_contabo/api/instances_api.py +++ b/pfruck_contabo/api/instances_api.py @@ -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={ diff --git a/pfruck_contabo/api_client.py b/pfruck_contabo/api_client.py index 21a21ce..6d668a4 100644 --- a/pfruck_contabo/api_client.py +++ b/pfruck_contabo/api_client.py @@ -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 @@ -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] @@ -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'], diff --git a/pfruck_contabo/configuration.py b/pfruck_contabo/configuration.py index e3eb365..b59d86c 100644 --- a/pfruck_contabo/configuration.py +++ b/pfruck_contabo/configuration.py @@ -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): diff --git a/setup.py b/setup.py index bc3bef3..e95bbee 100644 --- a/setup.py +++ b/setup.py @@ -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 @@ -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