Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions azure-mgmt-hanaonazure/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@
Release History
===============

0.3.0 (2019-01-03)
++++++++++++++++++

**Features**

- Added operation HanaInstancesOperations.update

0.2.1 (2018-08-31)
++++++++++++++++++

Expand Down
3 changes: 3 additions & 0 deletions azure-mgmt-hanaonazure/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
include *.rst
include azure/__init__.py
include azure/mgmt/__init__.py

Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 (
Expand All @@ -53,6 +55,7 @@
'Display',
'Operation',
'ErrorResponse', 'ErrorResponseException',
'Tags',
'OperationPaged',
'HanaInstancePaged',
'HanaHardwareTypeNamesEnum',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class HanaInstanceSizeNamesEnum(str, Enum):
s192 = "S192"
s192m = "S192m"
s192xm = "S192xm"
s96 = "S96"
s384 = "S384"
s384m = "S384m"
s384xm = "S384xm"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
28 changes: 28 additions & 0 deletions azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/tags.py
Original file line number Diff line number Diff line change
@@ -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)
28 changes: 28 additions & 0 deletions azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/tags_py3.py
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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<msrest:optionsforoperations>`.
:return: HanaInstance or ClientRawResponse if raw=true
:rtype: ~azure.mgmt.hanaonazure.models.HanaInstance or
~msrest.pipeline.ClientRawResponse
:raises:
:class:`ErrorResponseException<azure.mgmt.hanaonazure.models.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.
Expand Down
2 changes: 1 addition & 1 deletion azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@
# regenerated.
# --------------------------------------------------------------------------

VERSION = "0.2.1"
VERSION = "0.3.0"