diff --git a/azure-mgmt-hanaonazure/HISTORY.rst b/azure-mgmt-hanaonazure/HISTORY.rst index 5bd5e91b90b9..4ce1379cb9a0 100644 --- a/azure-mgmt-hanaonazure/HISTORY.rst +++ b/azure-mgmt-hanaonazure/HISTORY.rst @@ -3,6 +3,13 @@ Release History =============== +0.3.0 (2019-01-03) +++++++++++++++++++ + +**Features** + +- Added operation HanaInstancesOperations.update + 0.2.1 (2018-08-31) ++++++++++++++++++ diff --git a/azure-mgmt-hanaonazure/MANIFEST.in b/azure-mgmt-hanaonazure/MANIFEST.in index bb37a2723dae..6ceb27f7a96e 100644 --- a/azure-mgmt-hanaonazure/MANIFEST.in +++ b/azure-mgmt-hanaonazure/MANIFEST.in @@ -1 +1,4 @@ include *.rst +include azure/__init__.py +include azure/mgmt/__init__.py + diff --git a/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/__init__.py b/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/__init__.py index 92a1fb68367c..14c784db2fb6 100644 --- a/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/__init__.py +++ b/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/__init__.py @@ -21,6 +21,7 @@ from .display_py3 import Display from .operation_py3 import Operation from .error_response_py3 import ErrorResponse, ErrorResponseException + from .tags_py3 import Tags except (SyntaxError, ImportError): from .resource import Resource from .hardware_profile import HardwareProfile @@ -33,6 +34,7 @@ from .display import Display from .operation import Operation from .error_response import ErrorResponse, ErrorResponseException + from .tags import Tags from .operation_paged import OperationPaged from .hana_instance_paged import HanaInstancePaged from .hana_management_client_enums import ( @@ -53,6 +55,7 @@ 'Display', 'Operation', 'ErrorResponse', 'ErrorResponseException', + 'Tags', 'OperationPaged', 'HanaInstancePaged', 'HanaHardwareTypeNamesEnum', diff --git a/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/hana_management_client_enums.py b/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/hana_management_client_enums.py index 14c2d7027d1a..ae4ad333dbcf 100644 --- a/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/hana_management_client_enums.py +++ b/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/hana_management_client_enums.py @@ -27,6 +27,7 @@ class HanaInstanceSizeNamesEnum(str, Enum): s192 = "S192" s192m = "S192m" s192xm = "S192xm" + s96 = "S96" s384 = "S384" s384m = "S384m" s384xm = "S384xm" diff --git a/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/hardware_profile.py b/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/hardware_profile.py index ed283992ccfa..773868c26f1b 100644 --- a/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/hardware_profile.py +++ b/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/hardware_profile.py @@ -23,7 +23,7 @@ class HardwareProfile(Model): :vartype hardware_type: str or ~azure.mgmt.hanaonazure.models.HanaHardwareTypeNamesEnum :ivar hana_instance_size: Specifies the HANA instance SKU. Possible values - include: 'S72m', 'S144m', 'S72', 'S144', 'S192', 'S192m', 'S192xm', + include: 'S72m', 'S144m', 'S72', 'S144', 'S192', 'S192m', 'S192xm', 'S96', 'S384', 'S384m', 'S384xm', 'S384xxm', 'S576m', 'S576xm', 'S768', 'S768m', 'S768xm', 'S960m' :vartype hana_instance_size: str or diff --git a/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/hardware_profile_py3.py b/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/hardware_profile_py3.py index 09adb7de1e60..3b26032f6133 100644 --- a/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/hardware_profile_py3.py +++ b/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/hardware_profile_py3.py @@ -23,7 +23,7 @@ class HardwareProfile(Model): :vartype hardware_type: str or ~azure.mgmt.hanaonazure.models.HanaHardwareTypeNamesEnum :ivar hana_instance_size: Specifies the HANA instance SKU. Possible values - include: 'S72m', 'S144m', 'S72', 'S144', 'S192', 'S192m', 'S192xm', + include: 'S72m', 'S144m', 'S72', 'S144', 'S192', 'S192m', 'S192xm', 'S96', 'S384', 'S384m', 'S384xm', 'S384xxm', 'S576m', 'S576xm', 'S768', 'S768m', 'S768xm', 'S960m' :vartype hana_instance_size: str or diff --git a/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/ip_address.py b/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/ip_address.py index a0d1cb8961ed..03abffe7f88e 100644 --- a/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/ip_address.py +++ b/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/ip_address.py @@ -13,7 +13,7 @@ class IpAddress(Model): - """Specifies the IP address of the network interaface. + """Specifies the IP address of the network interface. Variables are only populated by the server, and will be ignored when sending a request. diff --git a/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/ip_address_py3.py b/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/ip_address_py3.py index 92c31926f971..31087cd52407 100644 --- a/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/ip_address_py3.py +++ b/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/ip_address_py3.py @@ -13,7 +13,7 @@ class IpAddress(Model): - """Specifies the IP address of the network interaface. + """Specifies the IP address of the network interface. Variables are only populated by the server, and will be ignored when sending a request. diff --git a/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/tags.py b/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/tags.py new file mode 100644 index 000000000000..8ba09d9de11b --- /dev/null +++ b/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/tags.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Tags(Model): + """Tags field of the HANA instance. + + :param tags: Tags field of the HANA instance. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(Tags, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) diff --git a/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/tags_py3.py b/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/tags_py3.py new file mode 100644 index 000000000000..669760aed216 --- /dev/null +++ b/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/tags_py3.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Tags(Model): + """Tags field of the HANA instance. + + :param tags: Tags field of the HANA instance. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, tags=None, **kwargs) -> None: + super(Tags, self).__init__(**kwargs) + self.tags = tags diff --git a/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/operations/hana_instances_operations.py b/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/operations/hana_instances_operations.py index c0cf8275c92c..f8990f720b3f 100644 --- a/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/operations/hana_instances_operations.py +++ b/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/operations/hana_instances_operations.py @@ -239,6 +239,78 @@ def get( return deserialized get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HanaOnAzure/hanaInstances/{hanaInstanceName}'} + def update( + self, resource_group_name, hana_instance_name, tags=None, custom_headers=None, raw=False, **operation_config): + """Patches the Tags field of a SAP HANA instance. + + Patches the Tags field of a SAP HANA instance for the specified + subscription, resource group, and instance name. + + :param resource_group_name: Name of the resource group. + :type resource_group_name: str + :param hana_instance_name: Name of the SAP HANA on Azure instance. + :type hana_instance_name: str + :param tags: Tags field of the HANA instance. + :type tags: dict[str, str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HanaInstance or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.hanaonazure.models.HanaInstance or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + tags_parameter = models.Tags(tags=tags) + + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'hanaInstanceName': self._serialize.url("hana_instance_name", hana_instance_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(tags_parameter, 'Tags') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('HanaInstance', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HanaOnAzure/hanaInstances/{hanaInstanceName}'} + def restart( self, resource_group_name, hana_instance_name, custom_headers=None, raw=False, **operation_config): """The operation to restart a SAP HANA instance. diff --git a/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/version.py b/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/version.py index 3da0f49f071f..3e682bbd5fb1 100644 --- a/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/version.py +++ b/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "0.2.1" +VERSION = "0.3.0"