Skip to content

Commit

Permalink
[AutoPR hanaonazure/resource-manager] Removing monitoring hana instan…
Browse files Browse the repository at this point in the history
…ce API (#6535)

* Generated from 70b51057c4cca0cdb6a743b4e02f39c132121570

Removing monitoring hana instance API

* Generated from a6757c439ed37f69147b6a7b50a20f1ca69789be

Removing monitoring hana instance API

* Packaging update of azure-mgmt-hanaonazure

* Updated Release History
  • Loading branch information
AutorestCI authored and Zim Kalinowski committed Jul 31, 2019
1 parent e833df0 commit 95220b7
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 93 deletions.
12 changes: 12 additions & 0 deletions sdk/hanaonazure/azure-mgmt-hanaonazure/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,18 @@
Release History
===============

0.9.0 (2019-07-31)
++++++++++++++++++

**Features**

- Model SapMonitor has a new parameter hana_db_credentials_msi_id
- Model SapMonitor has a new parameter hana_db_password_key_vault_url

**Breaking changes**

- Removed operation HanaInstancesOperations.enable_monitoring

0.8.0 (2019-06-26)
++++++++++++++++++

Expand Down
2 changes: 1 addition & 1 deletion sdk/hanaonazure/azure-mgmt-hanaonazure/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This is the Microsoft Azure SAP Hana on Azure Management Client Library.
Azure Resource Manager (ARM) is the next generation of management APIs that
replace the old Azure Service Management (ASM).

This package has been tested with Python 2.7, 3.4, 3.5, 3.6 and 3.7.
This package has been tested with Python 2.7, 3.5, 3.6 and 3.7.

For the older Azure Service Management (ASM) libraries, see
`azure-servicemanagement-legacy <https://pypi.python.org/pypi/azure-servicemanagement-legacy>`__ library.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,12 @@ class SapMonitor(Resource):
:type hana_db_username: str
:param hana_db_password: Database password of the HANA instance.
:type hana_db_password: str
:param hana_db_password_key_vault_url: KeyVault URL link to the password
for the HANA database.
:type hana_db_password_key_vault_url: str
:param hana_db_credentials_msi_id: MSI ID passed by customer which has
access to customer's KeyVault and to be assigned to the Collector VM.
:type hana_db_credentials_msi_id: str
:ivar provisioning_state: State of provisioning of the HanaInstance.
Possible values include: 'Accepted', 'Creating', 'Updating', 'Failed',
'Succeeded', 'Deleting', 'Migrating'
Expand Down Expand Up @@ -516,6 +522,8 @@ class SapMonitor(Resource):
'hana_db_sql_port': {'key': 'properties.hanaDbSqlPort', 'type': 'int'},
'hana_db_username': {'key': 'properties.hanaDbUsername', 'type': 'str'},
'hana_db_password': {'key': 'properties.hanaDbPassword', 'type': 'str'},
'hana_db_password_key_vault_url': {'key': 'properties.hanaDbPasswordKeyVaultUrl', 'type': 'str'},
'hana_db_credentials_msi_id': {'key': 'properties.hanaDbCredentialsMsiId', 'type': 'str'},
'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
}

Expand All @@ -527,6 +535,8 @@ def __init__(self, **kwargs):
self.hana_db_sql_port = kwargs.get('hana_db_sql_port', None)
self.hana_db_username = kwargs.get('hana_db_username', None)
self.hana_db_password = kwargs.get('hana_db_password', None)
self.hana_db_password_key_vault_url = kwargs.get('hana_db_password_key_vault_url', None)
self.hana_db_credentials_msi_id = kwargs.get('hana_db_credentials_msi_id', None)
self.provisioning_state = None


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,12 @@ class SapMonitor(Resource):
:type hana_db_username: str
:param hana_db_password: Database password of the HANA instance.
:type hana_db_password: str
:param hana_db_password_key_vault_url: KeyVault URL link to the password
for the HANA database.
:type hana_db_password_key_vault_url: str
:param hana_db_credentials_msi_id: MSI ID passed by customer which has
access to customer's KeyVault and to be assigned to the Collector VM.
:type hana_db_credentials_msi_id: str
:ivar provisioning_state: State of provisioning of the HanaInstance.
Possible values include: 'Accepted', 'Creating', 'Updating', 'Failed',
'Succeeded', 'Deleting', 'Migrating'
Expand Down Expand Up @@ -516,17 +522,21 @@ class SapMonitor(Resource):
'hana_db_sql_port': {'key': 'properties.hanaDbSqlPort', 'type': 'int'},
'hana_db_username': {'key': 'properties.hanaDbUsername', 'type': 'str'},
'hana_db_password': {'key': 'properties.hanaDbPassword', 'type': 'str'},
'hana_db_password_key_vault_url': {'key': 'properties.hanaDbPasswordKeyVaultUrl', 'type': 'str'},
'hana_db_credentials_msi_id': {'key': 'properties.hanaDbCredentialsMsiId', 'type': 'str'},
'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
}

def __init__(self, *, location: str=None, hana_subnet: str=None, hana_hostname: str=None, hana_db_name: str=None, hana_db_sql_port: int=None, hana_db_username: str=None, hana_db_password: str=None, **kwargs) -> None:
def __init__(self, *, location: str=None, hana_subnet: str=None, hana_hostname: str=None, hana_db_name: str=None, hana_db_sql_port: int=None, hana_db_username: str=None, hana_db_password: str=None, hana_db_password_key_vault_url: str=None, hana_db_credentials_msi_id: str=None, **kwargs) -> None:
super(SapMonitor, self).__init__(location=location, **kwargs)
self.hana_subnet = hana_subnet
self.hana_hostname = hana_hostname
self.hana_db_name = hana_db_name
self.hana_db_sql_port = hana_db_sql_port
self.hana_db_username = hana_db_username
self.hana_db_password = hana_db_password
self.hana_db_password_key_vault_url = hana_db_password_key_vault_url
self.hana_db_credentials_msi_id = hana_db_credentials_msi_id
self.provisioning_state = None


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

import uuid
from msrest.pipeline import ClientRawResponse
from msrestazure.azure_exceptions import CloudError
from msrest.polling import LROPoller, NoPolling
from msrestazure.polling.arm_polling import ARMPolling

Expand Down Expand Up @@ -737,91 +736,3 @@ def get_long_running_output(response):
else: polling_method = polling
return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
shutdown.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HanaOnAzure/hanaInstances/{hanaInstanceName}/shutdown'}


def _enable_monitoring_initial(
self, resource_group_name, hana_instance_name, monitoring_parameter, custom_headers=None, raw=False, **operation_config):
# Construct URL
url = self.enable_monitoring.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['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(monitoring_parameter, 'MonitoringDetails')

# Construct and send request
request = self._client.post(url, query_parameters, header_parameters, body_content)
response = self._client.send(request, stream=False, **operation_config)

if response.status_code not in [200, 202]:
exp = CloudError(response)
exp.request_id = response.headers.get('x-ms-request-id')
raise exp

if raw:
client_raw_response = ClientRawResponse(None, response)
return client_raw_response

def enable_monitoring(
self, resource_group_name, hana_instance_name, monitoring_parameter, custom_headers=None, raw=False, polling=True, **operation_config):
"""The operation to add a monitor to an SAP HANA instance.
: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 monitoring_parameter: Request body that only contains
monitoring attributes
:type monitoring_parameter:
~azure.mgmt.hanaonazure.models.MonitoringDetails
:param dict custom_headers: headers that will be added to the request
:param bool raw: The poller return type is ClientRawResponse, the
direct response alongside the deserialized response
:param polling: True for ARMPolling, False for no polling, or a
polling object for personal polling strategy
:return: An instance of LROPoller that returns None or
ClientRawResponse<None> if raw==True
:rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or
~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]]
:raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
"""
raw_result = self._enable_monitoring_initial(
resource_group_name=resource_group_name,
hana_instance_name=hana_instance_name,
monitoring_parameter=monitoring_parameter,
custom_headers=custom_headers,
raw=True,
**operation_config
)

def get_long_running_output(response):
if raw:
client_raw_response = ClientRawResponse(None, response)
return client_raw_response

lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
if polling is True: polling_method = ARMPolling(lro_delay, **operation_config)
elif polling is False: polling_method = NoPolling()
else: polling_method = polling
return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
enable_monitoring.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HanaOnAzure/hanaInstances/{hanaInstanceName}/monitoring'}
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@
# regenerated.
# --------------------------------------------------------------------------

VERSION = "0.8.0"
VERSION = "0.9.0"

1 change: 0 additions & 1 deletion sdk/hanaonazure/azure-mgmt-hanaonazure/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
Expand Down

0 comments on commit 95220b7

Please sign in to comment.