diff --git a/sdk/hanaonazure/azure-mgmt-hanaonazure/HISTORY.rst b/sdk/hanaonazure/azure-mgmt-hanaonazure/HISTORY.rst index feb2133c9049..b99767ae2a90 100644 --- a/sdk/hanaonazure/azure-mgmt-hanaonazure/HISTORY.rst +++ b/sdk/hanaonazure/azure-mgmt-hanaonazure/HISTORY.rst @@ -3,6 +3,27 @@ Release History =============== +0.8.0 (2019-06-26) +++++++++++++++++++ + +**Features** + +- Added operation HanaInstancesOperations.start +- Added operation HanaInstancesOperations.shutdown +- Added operation group SapMonitorsOperations + +**General Breaking changes** + +This version uses a next-generation code generator that *might* introduce breaking changes if from some import. +In summary, some modules were incorrectly visible/importable and have been renamed. This fixed several issues caused by usage of classes that were not supposed to be used in the first place. + +- HanaManagementClient cannot be imported from `azure.mgmt.hanaonazure.hana_management_client` anymore (import from `azure.mgmt.hanaonazure` works like before) +- HanaManagementClientConfiguration import has been moved from `azure.mgmt.hanaonazure.hana_management_client` to `azure.mgmt.hanaonazure` +- A model `MyClass` from a "models" sub-module cannot be imported anymore using `azure.mgmt.hanaonazure.models.my_class` (import from `azure.mgmt.hanaonazure.models` works like before) +- An operation class `MyClassOperations` from an `operations` sub-module cannot be imported anymore using `azure.mgmt.hanaonazure.operations.my_class_operations` (import from `azure.mgmt.hanaonazure.operations` works like before) + +Last but not least, HTTP connection pooling is now enabled by default. You should always use a client as a context manager, or call close(), or use no more than one client per process. + 0.7.1 (2019-06-12) ++++++++++++++++++ diff --git a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/__init__.py b/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/__init__.py index b1e6703c9de4..75fd3a3241a8 100644 --- a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/__init__.py +++ b/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/__init__.py @@ -9,10 +9,11 @@ # regenerated. # -------------------------------------------------------------------------- -from .hana_management_client import HanaManagementClient -from .version import VERSION +from ._configuration import HanaManagementClientConfiguration +from ._hana_management_client import HanaManagementClient +__all__ = ['HanaManagementClient', 'HanaManagementClientConfiguration'] -__all__ = ['HanaManagementClient'] +from .version import VERSION __version__ = VERSION diff --git a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/_configuration.py b/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/_configuration.py new file mode 100644 index 000000000000..2342f36b178d --- /dev/null +++ b/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/_configuration.py @@ -0,0 +1,50 @@ +# 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 msrestazure import AzureConfiguration + +from .version import VERSION + + +class HanaManagementClientConfiguration(AzureConfiguration): + """Configuration for HanaManagementClient + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: Subscription ID which uniquely identify Microsoft + Azure subscription. The subscription ID forms part of the URI for every + service call. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if not base_url: + base_url = 'https://management.azure.com' + + super(HanaManagementClientConfiguration, self).__init__(base_url) + + # Starting Autorest.Python 4.0.64, make connection pool activated by default + self.keep_alive = True + + self.add_user_agent('azure-mgmt-hanaonazure/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id diff --git a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/hana_management_client.py b/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/_hana_management_client.py similarity index 59% rename from sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/hana_management_client.py rename to sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/_hana_management_client.py index 8b660e12b291..14a418e6c608 100644 --- a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/hana_management_client.py +++ b/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/_hana_management_client.py @@ -11,45 +11,12 @@ from msrest.service_client import SDKClient from msrest import Serializer, Deserializer -from msrestazure import AzureConfiguration -from .version import VERSION -from .operations.operations import Operations -from .operations.hana_instances_operations import HanaInstancesOperations -from . import models - - -class HanaManagementClientConfiguration(AzureConfiguration): - """Configuration for HanaManagementClient - Note that all parameters used to create this instance are saved as instance - attributes. - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Subscription ID which uniquely identify Microsoft - Azure subscription. The subscription ID forms part of the URI for every - service call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(HanaManagementClientConfiguration, self).__init__(base_url) - - self.add_user_agent('azure-mgmt-hanaonazure/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id +from ._configuration import HanaManagementClientConfiguration +from .operations import Operations +from .operations import HanaInstancesOperations +from .operations import SapMonitorsOperations +from . import models class HanaManagementClient(SDKClient): @@ -62,6 +29,8 @@ class HanaManagementClient(SDKClient): :vartype operations: azure.mgmt.hanaonazure.operations.Operations :ivar hana_instances: HanaInstances operations :vartype hana_instances: azure.mgmt.hanaonazure.operations.HanaInstancesOperations + :ivar sap_monitors: SapMonitors operations + :vartype sap_monitors: azure.mgmt.hanaonazure.operations.SapMonitorsOperations :param credentials: Credentials needed for the client to connect to Azure. :type credentials: :mod:`A msrestazure Credentials @@ -88,3 +57,5 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.hana_instances = HanaInstancesOperations( self._client, self.config, self._serialize, self._deserialize) + self.sap_monitors = SapMonitorsOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/__init__.py b/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/__init__.py index 33792a244feb..2d5850e75153 100644 --- a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/__init__.py +++ b/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/__init__.py @@ -10,36 +10,39 @@ # -------------------------------------------------------------------------- try: - from .resource_py3 import Resource - from .hardware_profile_py3 import HardwareProfile - from .disk_py3 import Disk - from .storage_profile_py3 import StorageProfile - from .os_profile_py3 import OSProfile - from .ip_address_py3 import IpAddress - from .network_profile_py3 import NetworkProfile - from .hana_instance_py3 import HanaInstance - from .display_py3 import Display - from .operation_py3 import Operation - from .error_response_py3 import ErrorResponse, ErrorResponseException - from .tags_py3 import Tags - from .monitoring_details_py3 import MonitoringDetails + from ._models_py3 import Disk + from ._models_py3 import Display + from ._models_py3 import ErrorResponse, ErrorResponseException + from ._models_py3 import HanaInstance + from ._models_py3 import HardwareProfile + from ._models_py3 import IpAddress + from ._models_py3 import MonitoringDetails + from ._models_py3 import NetworkProfile + from ._models_py3 import Operation + from ._models_py3 import OSProfile + from ._models_py3 import Resource + from ._models_py3 import SapMonitor + from ._models_py3 import StorageProfile + from ._models_py3 import Tags except (SyntaxError, ImportError): - from .resource import Resource - from .hardware_profile import HardwareProfile - from .disk import Disk - from .storage_profile import StorageProfile - from .os_profile import OSProfile - from .ip_address import IpAddress - from .network_profile import NetworkProfile - from .hana_instance import HanaInstance - from .display import Display - from .operation import Operation - from .error_response import ErrorResponse, ErrorResponseException - from .tags import Tags - from .monitoring_details import MonitoringDetails -from .operation_paged import OperationPaged -from .hana_instance_paged import HanaInstancePaged -from .hana_management_client_enums import ( + from ._models import Disk + from ._models import Display + from ._models import ErrorResponse, ErrorResponseException + from ._models import HanaInstance + from ._models import HardwareProfile + from ._models import IpAddress + from ._models import MonitoringDetails + from ._models import NetworkProfile + from ._models import Operation + from ._models import OSProfile + from ._models import Resource + from ._models import SapMonitor + from ._models import StorageProfile + from ._models import Tags +from ._paged_models import HanaInstancePaged +from ._paged_models import OperationPaged +from ._paged_models import SapMonitorPaged +from ._hana_management_client_enums import ( HanaHardwareTypeNamesEnum, HanaInstanceSizeNamesEnum, HanaInstancePowerStateEnum, @@ -47,21 +50,23 @@ ) __all__ = [ - 'Resource', - 'HardwareProfile', 'Disk', - 'StorageProfile', - 'OSProfile', + 'Display', + 'ErrorResponse', 'ErrorResponseException', + 'HanaInstance', + 'HardwareProfile', 'IpAddress', + 'MonitoringDetails', 'NetworkProfile', - 'HanaInstance', - 'Display', 'Operation', - 'ErrorResponse', 'ErrorResponseException', + 'OSProfile', + 'Resource', + 'SapMonitor', + 'StorageProfile', 'Tags', - 'MonitoringDetails', 'OperationPaged', 'HanaInstancePaged', + 'SapMonitorPaged', 'HanaHardwareTypeNamesEnum', 'HanaInstanceSizeNamesEnum', 'HanaInstancePowerStateEnum', diff --git a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/hana_management_client_enums.py b/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/_hana_management_client_enums.py similarity index 100% rename from sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/hana_management_client_enums.py rename to sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/_hana_management_client_enums.py diff --git a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/_models.py b/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/_models.py new file mode 100644 index 000000000000..d9c93b5d62d8 --- /dev/null +++ b/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/_models.py @@ -0,0 +1,574 @@ +# 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 +from msrest.exceptions import HttpOperationError + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class Disk(Model): + """Specifies the disk information fo the HANA instance. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param name: The disk name. + :type name: str + :param disk_size_gb: Specifies the size of an empty data disk in + gigabytes. + :type disk_size_gb: int + :ivar lun: Specifies the logical unit number of the data disk. This value + is used to identify data disks within the VM and therefore must be unique + for each data disk attached to a VM. + :vartype lun: int + """ + + _validation = { + 'lun': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + 'lun': {'key': 'lun', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(Disk, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.disk_size_gb = kwargs.get('disk_size_gb', None) + self.lun = None + + +class Display(Model): + """Detailed HANA operation information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar provider: The localized friendly form of the resource provider name. + This form is also expected to include the publisher/company responsible. + Use Title Casing. Begin with "Microsoft" for 1st party services. + :vartype provider: str + :ivar resource: The localized friendly form of the resource type related + to this action/operation. This form should match the public documentation + for the resource provider. Use Title Casing. For examples, refer to the + “name” section. + :vartype resource: str + :ivar operation: The localized friendly name for the operation as shown to + the user. This name should be concise (to fit in drop downs), but clear + (self-documenting). Use Title Casing and include the entity/resource to + which it applies. + :vartype operation: str + :ivar description: The localized friendly description for the operation as + shown to the user. This description should be thorough, yet concise. It + will be used in tool-tips and detailed views. + :vartype description: str + :ivar origin: The intended executor of the operation; governs the display + of the operation in the RBAC UX and the audit logs UX. Default value is + 'user,system' + :vartype origin: str + """ + + _validation = { + 'provider': {'readonly': True}, + 'resource': {'readonly': True}, + 'operation': {'readonly': True}, + 'description': {'readonly': True}, + 'origin': {'readonly': True}, + } + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'origin': {'key': 'origin', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Display, self).__init__(**kwargs) + self.provider = None + self.resource = None + self.operation = None + self.description = None + self.origin = None + + +class ErrorResponse(Model): + """Describes the format of Error response. + + :param code: Error code + :type code: str + :param message: Error message indicating why the operation failed. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ErrorResponse, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + + +class ErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'ErrorResponse'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) + + +class Resource(Model): + """The resource model definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Resource location + :type location: str + :ivar tags: Resource tags + :vartype tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tags': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = kwargs.get('location', None) + self.tags = None + + +class HanaInstance(Resource): + """HANA instance info on Azure (ARM properties and HANA properties). + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Resource location + :type location: str + :ivar tags: Resource tags + :vartype tags: dict[str, str] + :param hardware_profile: Specifies the hardware settings for the HANA + instance. + :type hardware_profile: ~azure.mgmt.hanaonazure.models.HardwareProfile + :param storage_profile: Specifies the storage settings for the HANA + instance disks. + :type storage_profile: ~azure.mgmt.hanaonazure.models.StorageProfile + :param os_profile: Specifies the operating system settings for the HANA + instance. + :type os_profile: ~azure.mgmt.hanaonazure.models.OSProfile + :param network_profile: Specifies the network settings for the HANA + instance. + :type network_profile: ~azure.mgmt.hanaonazure.models.NetworkProfile + :ivar hana_instance_id: Specifies the HANA instance unique ID. + :vartype hana_instance_id: str + :ivar power_state: Resource power state. Possible values include: + 'starting', 'started', 'stopping', 'stopped', 'restarting', 'unknown' + :vartype power_state: str or + ~azure.mgmt.hanaonazure.models.HanaInstancePowerStateEnum + :ivar proximity_placement_group: Resource proximity placement group + :vartype proximity_placement_group: str + :ivar hw_revision: Hardware revision of a HANA instance + :vartype hw_revision: str + :param partner_node_id: ARM ID of another HanaInstance that will share a + network with this HanaInstance + :type partner_node_id: str + :ivar provisioning_state: State of provisioning of the HanaInstance. + Possible values include: 'Accepted', 'Creating', 'Updating', 'Failed', + 'Succeeded', 'Deleting', 'Migrating' + :vartype provisioning_state: str or + ~azure.mgmt.hanaonazure.models.HanaProvisioningStatesEnum + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tags': {'readonly': True}, + 'hana_instance_id': {'readonly': True}, + 'power_state': {'readonly': True}, + 'proximity_placement_group': {'readonly': True}, + 'hw_revision': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, + 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, + 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'}, + 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, + 'hana_instance_id': {'key': 'properties.hanaInstanceId', 'type': 'str'}, + 'power_state': {'key': 'properties.powerState', 'type': 'str'}, + 'proximity_placement_group': {'key': 'properties.proximityPlacementGroup', 'type': 'str'}, + 'hw_revision': {'key': 'properties.hwRevision', 'type': 'str'}, + 'partner_node_id': {'key': 'properties.partnerNodeId', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(HanaInstance, self).__init__(**kwargs) + self.hardware_profile = kwargs.get('hardware_profile', None) + self.storage_profile = kwargs.get('storage_profile', None) + self.os_profile = kwargs.get('os_profile', None) + self.network_profile = kwargs.get('network_profile', None) + self.hana_instance_id = None + self.power_state = None + self.proximity_placement_group = None + self.hw_revision = None + self.partner_node_id = kwargs.get('partner_node_id', None) + self.provisioning_state = None + + +class HardwareProfile(Model): + """Specifies the hardware settings for the HANA instance. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar hardware_type: Name of the hardware type (vendor and/or their + product name). Possible values include: 'Cisco_UCS', 'HPE' + :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', 'S96', + 'S384', 'S384m', 'S384xm', 'S384xxm', 'S576m', 'S576xm', 'S768', 'S768m', + 'S768xm', 'S960m', 'S224o', 'S224m', 'S224om', 'S224oxm', 'S224oxxm' + :vartype hana_instance_size: str or + ~azure.mgmt.hanaonazure.models.HanaInstanceSizeNamesEnum + """ + + _validation = { + 'hardware_type': {'readonly': True}, + 'hana_instance_size': {'readonly': True}, + } + + _attribute_map = { + 'hardware_type': {'key': 'hardwareType', 'type': 'str'}, + 'hana_instance_size': {'key': 'hanaInstanceSize', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(HardwareProfile, self).__init__(**kwargs) + self.hardware_type = None + self.hana_instance_size = None + + +class IpAddress(Model): + """Specifies the IP address of the network interface. + + :param ip_address: Specifies the IP address of the network interface. + :type ip_address: str + """ + + _attribute_map = { + 'ip_address': {'key': 'ipAddress', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IpAddress, self).__init__(**kwargs) + self.ip_address = kwargs.get('ip_address', None) + + +class MonitoringDetails(Model): + """Details needed to monitor a Hana Instance. + + :param hana_subnet: ARM ID of an Azure Subnet with access to the HANA + instance. + :type hana_subnet: str + :param hana_hostname: Hostname of the HANA Instance blade. + :type hana_hostname: str + :param hana_db_name: Name of the database itself. + :type hana_db_name: str + :param hana_db_sql_port: The port number of the tenant DB. Used to connect + to the DB. + :type hana_db_sql_port: int + :param hana_db_username: Username for the HANA database to login to for + monitoring + :type hana_db_username: str + :param hana_db_password: Password for the HANA database to login for + monitoring + :type hana_db_password: str + """ + + _attribute_map = { + 'hana_subnet': {'key': 'hanaSubnet', 'type': 'str'}, + 'hana_hostname': {'key': 'hanaHostname', 'type': 'str'}, + 'hana_db_name': {'key': 'hanaDbName', 'type': 'str'}, + 'hana_db_sql_port': {'key': 'hanaDbSqlPort', 'type': 'int'}, + 'hana_db_username': {'key': 'hanaDbUsername', 'type': 'str'}, + 'hana_db_password': {'key': 'hanaDbPassword', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(MonitoringDetails, self).__init__(**kwargs) + self.hana_subnet = kwargs.get('hana_subnet', None) + self.hana_hostname = kwargs.get('hana_hostname', None) + self.hana_db_name = kwargs.get('hana_db_name', None) + 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) + + +class NetworkProfile(Model): + """Specifies the network settings for the HANA instance disks. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param network_interfaces: Specifies the network interfaces for the HANA + instance. + :type network_interfaces: list[~azure.mgmt.hanaonazure.models.IpAddress] + :ivar circuit_id: Specifies the circuit id for connecting to express + route. + :vartype circuit_id: str + """ + + _validation = { + 'circuit_id': {'readonly': True}, + } + + _attribute_map = { + 'network_interfaces': {'key': 'networkInterfaces', 'type': '[IpAddress]'}, + 'circuit_id': {'key': 'circuitId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(NetworkProfile, self).__init__(**kwargs) + self.network_interfaces = kwargs.get('network_interfaces', None) + self.circuit_id = None + + +class Operation(Model): + """HANA operation information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The name of the operation being performed on this particular + object. This name should match the action name that appears in RBAC / the + event service. + :vartype name: str + :param display: Displayed HANA operation information + :type display: ~azure.mgmt.hanaonazure.models.Display + """ + + _validation = { + 'name': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'Display'}, + } + + def __init__(self, **kwargs): + super(Operation, self).__init__(**kwargs) + self.name = None + self.display = kwargs.get('display', None) + + +class OSProfile(Model): + """Specifies the operating system settings for the HANA instance. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param computer_name: Specifies the host OS name of the HANA instance. + :type computer_name: str + :ivar os_type: This property allows you to specify the type of the OS. + :vartype os_type: str + :ivar version: Specifies version of operating system. + :vartype version: str + :param ssh_public_key: Specifies the SSH public key used to access the + operating system. + :type ssh_public_key: str + """ + + _validation = { + 'os_type': {'readonly': True}, + 'version': {'readonly': True}, + } + + _attribute_map = { + 'computer_name': {'key': 'computerName', 'type': 'str'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + 'ssh_public_key': {'key': 'sshPublicKey', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OSProfile, self).__init__(**kwargs) + self.computer_name = kwargs.get('computer_name', None) + self.os_type = None + self.version = None + self.ssh_public_key = kwargs.get('ssh_public_key', None) + + +class SapMonitor(Resource): + """SAP monitor info on Azure (ARM properties and SAP monitor properties). + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Resource location + :type location: str + :ivar tags: Resource tags + :vartype tags: dict[str, str] + :param hana_subnet: Specifies the SAP monitor unique ID. + :type hana_subnet: str + :param hana_hostname: Hostname of the HANA instance. + :type hana_hostname: str + :param hana_db_name: Database name of the HANA instance. + :type hana_db_name: str + :param hana_db_sql_port: Database port of the HANA instance. + :type hana_db_sql_port: int + :param hana_db_username: Database username of the HANA instance. + :type hana_db_username: str + :param hana_db_password: Database password of the HANA instance. + :type hana_db_password: str + :ivar provisioning_state: State of provisioning of the HanaInstance. + Possible values include: 'Accepted', 'Creating', 'Updating', 'Failed', + 'Succeeded', 'Deleting', 'Migrating' + :vartype provisioning_state: str or + ~azure.mgmt.hanaonazure.models.HanaProvisioningStatesEnum + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tags': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'hana_subnet': {'key': 'properties.hanaSubnet', 'type': 'str'}, + 'hana_hostname': {'key': 'properties.hanaHostname', 'type': 'str'}, + 'hana_db_name': {'key': 'properties.hanaDbName', 'type': 'str'}, + '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'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SapMonitor, self).__init__(**kwargs) + self.hana_subnet = kwargs.get('hana_subnet', None) + self.hana_hostname = kwargs.get('hana_hostname', None) + self.hana_db_name = kwargs.get('hana_db_name', None) + 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.provisioning_state = None + + +class StorageProfile(Model): + """Specifies the storage settings for the HANA instance disks. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar nfs_ip_address: IP Address to connect to storage. + :vartype nfs_ip_address: str + :param os_disks: Specifies information about the operating system disk + used by the hana instance. + :type os_disks: list[~azure.mgmt.hanaonazure.models.Disk] + """ + + _validation = { + 'nfs_ip_address': {'readonly': True}, + } + + _attribute_map = { + 'nfs_ip_address': {'key': 'nfsIpAddress', 'type': 'str'}, + 'os_disks': {'key': 'osDisks', 'type': '[Disk]'}, + } + + def __init__(self, **kwargs): + super(StorageProfile, self).__init__(**kwargs) + self.nfs_ip_address = None + self.os_disks = kwargs.get('os_disks', None) + + +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/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/_models_py3.py b/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/_models_py3.py new file mode 100644 index 000000000000..dece72c8661c --- /dev/null +++ b/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/_models_py3.py @@ -0,0 +1,574 @@ +# 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 +from msrest.exceptions import HttpOperationError + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class Disk(Model): + """Specifies the disk information fo the HANA instance. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param name: The disk name. + :type name: str + :param disk_size_gb: Specifies the size of an empty data disk in + gigabytes. + :type disk_size_gb: int + :ivar lun: Specifies the logical unit number of the data disk. This value + is used to identify data disks within the VM and therefore must be unique + for each data disk attached to a VM. + :vartype lun: int + """ + + _validation = { + 'lun': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + 'lun': {'key': 'lun', 'type': 'int'}, + } + + def __init__(self, *, name: str=None, disk_size_gb: int=None, **kwargs) -> None: + super(Disk, self).__init__(**kwargs) + self.name = name + self.disk_size_gb = disk_size_gb + self.lun = None + + +class Display(Model): + """Detailed HANA operation information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar provider: The localized friendly form of the resource provider name. + This form is also expected to include the publisher/company responsible. + Use Title Casing. Begin with "Microsoft" for 1st party services. + :vartype provider: str + :ivar resource: The localized friendly form of the resource type related + to this action/operation. This form should match the public documentation + for the resource provider. Use Title Casing. For examples, refer to the + “name” section. + :vartype resource: str + :ivar operation: The localized friendly name for the operation as shown to + the user. This name should be concise (to fit in drop downs), but clear + (self-documenting). Use Title Casing and include the entity/resource to + which it applies. + :vartype operation: str + :ivar description: The localized friendly description for the operation as + shown to the user. This description should be thorough, yet concise. It + will be used in tool-tips and detailed views. + :vartype description: str + :ivar origin: The intended executor of the operation; governs the display + of the operation in the RBAC UX and the audit logs UX. Default value is + 'user,system' + :vartype origin: str + """ + + _validation = { + 'provider': {'readonly': True}, + 'resource': {'readonly': True}, + 'operation': {'readonly': True}, + 'description': {'readonly': True}, + 'origin': {'readonly': True}, + } + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'origin': {'key': 'origin', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(Display, self).__init__(**kwargs) + self.provider = None + self.resource = None + self.operation = None + self.description = None + self.origin = None + + +class ErrorResponse(Model): + """Describes the format of Error response. + + :param code: Error code + :type code: str + :param message: Error message indicating why the operation failed. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, code: str=None, message: str=None, **kwargs) -> None: + super(ErrorResponse, self).__init__(**kwargs) + self.code = code + self.message = message + + +class ErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'ErrorResponse'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) + + +class Resource(Model): + """The resource model definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Resource location + :type location: str + :ivar tags: Resource tags + :vartype tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tags': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, location: str=None, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = location + self.tags = None + + +class HanaInstance(Resource): + """HANA instance info on Azure (ARM properties and HANA properties). + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Resource location + :type location: str + :ivar tags: Resource tags + :vartype tags: dict[str, str] + :param hardware_profile: Specifies the hardware settings for the HANA + instance. + :type hardware_profile: ~azure.mgmt.hanaonazure.models.HardwareProfile + :param storage_profile: Specifies the storage settings for the HANA + instance disks. + :type storage_profile: ~azure.mgmt.hanaonazure.models.StorageProfile + :param os_profile: Specifies the operating system settings for the HANA + instance. + :type os_profile: ~azure.mgmt.hanaonazure.models.OSProfile + :param network_profile: Specifies the network settings for the HANA + instance. + :type network_profile: ~azure.mgmt.hanaonazure.models.NetworkProfile + :ivar hana_instance_id: Specifies the HANA instance unique ID. + :vartype hana_instance_id: str + :ivar power_state: Resource power state. Possible values include: + 'starting', 'started', 'stopping', 'stopped', 'restarting', 'unknown' + :vartype power_state: str or + ~azure.mgmt.hanaonazure.models.HanaInstancePowerStateEnum + :ivar proximity_placement_group: Resource proximity placement group + :vartype proximity_placement_group: str + :ivar hw_revision: Hardware revision of a HANA instance + :vartype hw_revision: str + :param partner_node_id: ARM ID of another HanaInstance that will share a + network with this HanaInstance + :type partner_node_id: str + :ivar provisioning_state: State of provisioning of the HanaInstance. + Possible values include: 'Accepted', 'Creating', 'Updating', 'Failed', + 'Succeeded', 'Deleting', 'Migrating' + :vartype provisioning_state: str or + ~azure.mgmt.hanaonazure.models.HanaProvisioningStatesEnum + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tags': {'readonly': True}, + 'hana_instance_id': {'readonly': True}, + 'power_state': {'readonly': True}, + 'proximity_placement_group': {'readonly': True}, + 'hw_revision': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, + 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, + 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'}, + 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, + 'hana_instance_id': {'key': 'properties.hanaInstanceId', 'type': 'str'}, + 'power_state': {'key': 'properties.powerState', 'type': 'str'}, + 'proximity_placement_group': {'key': 'properties.proximityPlacementGroup', 'type': 'str'}, + 'hw_revision': {'key': 'properties.hwRevision', 'type': 'str'}, + 'partner_node_id': {'key': 'properties.partnerNodeId', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, hardware_profile=None, storage_profile=None, os_profile=None, network_profile=None, partner_node_id: str=None, **kwargs) -> None: + super(HanaInstance, self).__init__(location=location, **kwargs) + self.hardware_profile = hardware_profile + self.storage_profile = storage_profile + self.os_profile = os_profile + self.network_profile = network_profile + self.hana_instance_id = None + self.power_state = None + self.proximity_placement_group = None + self.hw_revision = None + self.partner_node_id = partner_node_id + self.provisioning_state = None + + +class HardwareProfile(Model): + """Specifies the hardware settings for the HANA instance. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar hardware_type: Name of the hardware type (vendor and/or their + product name). Possible values include: 'Cisco_UCS', 'HPE' + :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', 'S96', + 'S384', 'S384m', 'S384xm', 'S384xxm', 'S576m', 'S576xm', 'S768', 'S768m', + 'S768xm', 'S960m', 'S224o', 'S224m', 'S224om', 'S224oxm', 'S224oxxm' + :vartype hana_instance_size: str or + ~azure.mgmt.hanaonazure.models.HanaInstanceSizeNamesEnum + """ + + _validation = { + 'hardware_type': {'readonly': True}, + 'hana_instance_size': {'readonly': True}, + } + + _attribute_map = { + 'hardware_type': {'key': 'hardwareType', 'type': 'str'}, + 'hana_instance_size': {'key': 'hanaInstanceSize', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(HardwareProfile, self).__init__(**kwargs) + self.hardware_type = None + self.hana_instance_size = None + + +class IpAddress(Model): + """Specifies the IP address of the network interface. + + :param ip_address: Specifies the IP address of the network interface. + :type ip_address: str + """ + + _attribute_map = { + 'ip_address': {'key': 'ipAddress', 'type': 'str'}, + } + + def __init__(self, *, ip_address: str=None, **kwargs) -> None: + super(IpAddress, self).__init__(**kwargs) + self.ip_address = ip_address + + +class MonitoringDetails(Model): + """Details needed to monitor a Hana Instance. + + :param hana_subnet: ARM ID of an Azure Subnet with access to the HANA + instance. + :type hana_subnet: str + :param hana_hostname: Hostname of the HANA Instance blade. + :type hana_hostname: str + :param hana_db_name: Name of the database itself. + :type hana_db_name: str + :param hana_db_sql_port: The port number of the tenant DB. Used to connect + to the DB. + :type hana_db_sql_port: int + :param hana_db_username: Username for the HANA database to login to for + monitoring + :type hana_db_username: str + :param hana_db_password: Password for the HANA database to login for + monitoring + :type hana_db_password: str + """ + + _attribute_map = { + 'hana_subnet': {'key': 'hanaSubnet', 'type': 'str'}, + 'hana_hostname': {'key': 'hanaHostname', 'type': 'str'}, + 'hana_db_name': {'key': 'hanaDbName', 'type': 'str'}, + 'hana_db_sql_port': {'key': 'hanaDbSqlPort', 'type': 'int'}, + 'hana_db_username': {'key': 'hanaDbUsername', 'type': 'str'}, + 'hana_db_password': {'key': 'hanaDbPassword', 'type': 'str'}, + } + + def __init__(self, *, 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: + super(MonitoringDetails, self).__init__(**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 + + +class NetworkProfile(Model): + """Specifies the network settings for the HANA instance disks. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param network_interfaces: Specifies the network interfaces for the HANA + instance. + :type network_interfaces: list[~azure.mgmt.hanaonazure.models.IpAddress] + :ivar circuit_id: Specifies the circuit id for connecting to express + route. + :vartype circuit_id: str + """ + + _validation = { + 'circuit_id': {'readonly': True}, + } + + _attribute_map = { + 'network_interfaces': {'key': 'networkInterfaces', 'type': '[IpAddress]'}, + 'circuit_id': {'key': 'circuitId', 'type': 'str'}, + } + + def __init__(self, *, network_interfaces=None, **kwargs) -> None: + super(NetworkProfile, self).__init__(**kwargs) + self.network_interfaces = network_interfaces + self.circuit_id = None + + +class Operation(Model): + """HANA operation information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The name of the operation being performed on this particular + object. This name should match the action name that appears in RBAC / the + event service. + :vartype name: str + :param display: Displayed HANA operation information + :type display: ~azure.mgmt.hanaonazure.models.Display + """ + + _validation = { + 'name': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'Display'}, + } + + def __init__(self, *, display=None, **kwargs) -> None: + super(Operation, self).__init__(**kwargs) + self.name = None + self.display = display + + +class OSProfile(Model): + """Specifies the operating system settings for the HANA instance. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param computer_name: Specifies the host OS name of the HANA instance. + :type computer_name: str + :ivar os_type: This property allows you to specify the type of the OS. + :vartype os_type: str + :ivar version: Specifies version of operating system. + :vartype version: str + :param ssh_public_key: Specifies the SSH public key used to access the + operating system. + :type ssh_public_key: str + """ + + _validation = { + 'os_type': {'readonly': True}, + 'version': {'readonly': True}, + } + + _attribute_map = { + 'computer_name': {'key': 'computerName', 'type': 'str'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + 'ssh_public_key': {'key': 'sshPublicKey', 'type': 'str'}, + } + + def __init__(self, *, computer_name: str=None, ssh_public_key: str=None, **kwargs) -> None: + super(OSProfile, self).__init__(**kwargs) + self.computer_name = computer_name + self.os_type = None + self.version = None + self.ssh_public_key = ssh_public_key + + +class SapMonitor(Resource): + """SAP monitor info on Azure (ARM properties and SAP monitor properties). + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Resource location + :type location: str + :ivar tags: Resource tags + :vartype tags: dict[str, str] + :param hana_subnet: Specifies the SAP monitor unique ID. + :type hana_subnet: str + :param hana_hostname: Hostname of the HANA instance. + :type hana_hostname: str + :param hana_db_name: Database name of the HANA instance. + :type hana_db_name: str + :param hana_db_sql_port: Database port of the HANA instance. + :type hana_db_sql_port: int + :param hana_db_username: Database username of the HANA instance. + :type hana_db_username: str + :param hana_db_password: Database password of the HANA instance. + :type hana_db_password: str + :ivar provisioning_state: State of provisioning of the HanaInstance. + Possible values include: 'Accepted', 'Creating', 'Updating', 'Failed', + 'Succeeded', 'Deleting', 'Migrating' + :vartype provisioning_state: str or + ~azure.mgmt.hanaonazure.models.HanaProvisioningStatesEnum + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tags': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'hana_subnet': {'key': 'properties.hanaSubnet', 'type': 'str'}, + 'hana_hostname': {'key': 'properties.hanaHostname', 'type': 'str'}, + 'hana_db_name': {'key': 'properties.hanaDbName', 'type': 'str'}, + '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'}, + '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: + 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.provisioning_state = None + + +class StorageProfile(Model): + """Specifies the storage settings for the HANA instance disks. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar nfs_ip_address: IP Address to connect to storage. + :vartype nfs_ip_address: str + :param os_disks: Specifies information about the operating system disk + used by the hana instance. + :type os_disks: list[~azure.mgmt.hanaonazure.models.Disk] + """ + + _validation = { + 'nfs_ip_address': {'readonly': True}, + } + + _attribute_map = { + 'nfs_ip_address': {'key': 'nfsIpAddress', 'type': 'str'}, + 'os_disks': {'key': 'osDisks', 'type': '[Disk]'}, + } + + def __init__(self, *, os_disks=None, **kwargs) -> None: + super(StorageProfile, self).__init__(**kwargs) + self.nfs_ip_address = None + self.os_disks = os_disks + + +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/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/hana_instance_paged.py b/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/_paged_models.py similarity index 52% rename from sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/hana_instance_paged.py rename to sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/_paged_models.py index 3d232eaa7e87..874542d2dcaf 100644 --- a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/hana_instance_paged.py +++ b/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/_paged_models.py @@ -12,6 +12,19 @@ from msrest.paging import Paged +class OperationPaged(Paged): + """ + A paging container for iterating over a list of :class:`Operation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Operation]'} + } + + def __init__(self, *args, **kwargs): + + super(OperationPaged, self).__init__(*args, **kwargs) class HanaInstancePaged(Paged): """ A paging container for iterating over a list of :class:`HanaInstance ` object @@ -25,3 +38,16 @@ class HanaInstancePaged(Paged): def __init__(self, *args, **kwargs): super(HanaInstancePaged, self).__init__(*args, **kwargs) +class SapMonitorPaged(Paged): + """ + A paging container for iterating over a list of :class:`SapMonitor ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SapMonitor]'} + } + + def __init__(self, *args, **kwargs): + + super(SapMonitorPaged, self).__init__(*args, **kwargs) diff --git a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/disk.py b/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/disk.py deleted file mode 100644 index 9f1a2df57b27..000000000000 --- a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/disk.py +++ /dev/null @@ -1,46 +0,0 @@ -# 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 Disk(Model): - """Specifies the disk information fo the HANA instance. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param name: The disk name. - :type name: str - :param disk_size_gb: Specifies the size of an empty data disk in - gigabytes. - :type disk_size_gb: int - :ivar lun: Specifies the logical unit number of the data disk. This value - is used to identify data disks within the VM and therefore must be unique - for each data disk attached to a VM. - :vartype lun: int - """ - - _validation = { - 'lun': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, - 'lun': {'key': 'lun', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(Disk, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.disk_size_gb = kwargs.get('disk_size_gb', None) - self.lun = None diff --git a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/disk_py3.py b/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/disk_py3.py deleted file mode 100644 index aa72032ca814..000000000000 --- a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/disk_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# 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 Disk(Model): - """Specifies the disk information fo the HANA instance. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param name: The disk name. - :type name: str - :param disk_size_gb: Specifies the size of an empty data disk in - gigabytes. - :type disk_size_gb: int - :ivar lun: Specifies the logical unit number of the data disk. This value - is used to identify data disks within the VM and therefore must be unique - for each data disk attached to a VM. - :vartype lun: int - """ - - _validation = { - 'lun': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, - 'lun': {'key': 'lun', 'type': 'int'}, - } - - def __init__(self, *, name: str=None, disk_size_gb: int=None, **kwargs) -> None: - super(Disk, self).__init__(**kwargs) - self.name = name - self.disk_size_gb = disk_size_gb - self.lun = None diff --git a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/display.py b/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/display.py deleted file mode 100644 index 25baa3464325..000000000000 --- a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/display.py +++ /dev/null @@ -1,67 +0,0 @@ -# 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 Display(Model): - """Detailed HANA operation information. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar provider: The localized friendly form of the resource provider name. - This form is also expected to include the publisher/company responsible. - Use Title Casing. Begin with "Microsoft" for 1st party services. - :vartype provider: str - :ivar resource: The localized friendly form of the resource type related - to this action/operation. This form should match the public documentation - for the resource provider. Use Title Casing. For examples, refer to the - “name” section. - :vartype resource: str - :ivar operation: The localized friendly name for the operation as shown to - the user. This name should be concise (to fit in drop downs), but clear - (self-documenting). Use Title Casing and include the entity/resource to - which it applies. - :vartype operation: str - :ivar description: The localized friendly description for the operation as - shown to the user. This description should be thorough, yet concise. It - will be used in tool-tips and detailed views. - :vartype description: str - :ivar origin: The intended executor of the operation; governs the display - of the operation in the RBAC UX and the audit logs UX. Default value is - 'user,system' - :vartype origin: str - """ - - _validation = { - 'provider': {'readonly': True}, - 'resource': {'readonly': True}, - 'operation': {'readonly': True}, - 'description': {'readonly': True}, - 'origin': {'readonly': True}, - } - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'origin': {'key': 'origin', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Display, self).__init__(**kwargs) - self.provider = None - self.resource = None - self.operation = None - self.description = None - self.origin = None diff --git a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/display_py3.py b/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/display_py3.py deleted file mode 100644 index 311420d15b7e..000000000000 --- a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/display_py3.py +++ /dev/null @@ -1,67 +0,0 @@ -# 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 Display(Model): - """Detailed HANA operation information. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar provider: The localized friendly form of the resource provider name. - This form is also expected to include the publisher/company responsible. - Use Title Casing. Begin with "Microsoft" for 1st party services. - :vartype provider: str - :ivar resource: The localized friendly form of the resource type related - to this action/operation. This form should match the public documentation - for the resource provider. Use Title Casing. For examples, refer to the - “name” section. - :vartype resource: str - :ivar operation: The localized friendly name for the operation as shown to - the user. This name should be concise (to fit in drop downs), but clear - (self-documenting). Use Title Casing and include the entity/resource to - which it applies. - :vartype operation: str - :ivar description: The localized friendly description for the operation as - shown to the user. This description should be thorough, yet concise. It - will be used in tool-tips and detailed views. - :vartype description: str - :ivar origin: The intended executor of the operation; governs the display - of the operation in the RBAC UX and the audit logs UX. Default value is - 'user,system' - :vartype origin: str - """ - - _validation = { - 'provider': {'readonly': True}, - 'resource': {'readonly': True}, - 'operation': {'readonly': True}, - 'description': {'readonly': True}, - 'origin': {'readonly': True}, - } - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'origin': {'key': 'origin', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(Display, self).__init__(**kwargs) - self.provider = None - self.resource = None - self.operation = None - self.description = None - self.origin = None diff --git a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/error_response.py b/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/error_response.py deleted file mode 100644 index b3d490a49503..000000000000 --- a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/error_response.py +++ /dev/null @@ -1,45 +0,0 @@ -# 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 -from msrest.exceptions import HttpOperationError - - -class ErrorResponse(Model): - """Describes the format of Error response. - - :param code: Error code - :type code: str - :param message: Error message indicating why the operation failed. - :type message: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ErrorResponse, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.message = kwargs.get('message', None) - - -class ErrorResponseException(HttpOperationError): - """Server responsed with exception of type: 'ErrorResponse'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) diff --git a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/error_response_py3.py b/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/error_response_py3.py deleted file mode 100644 index 5504940d6873..000000000000 --- a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/error_response_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# 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 -from msrest.exceptions import HttpOperationError - - -class ErrorResponse(Model): - """Describes the format of Error response. - - :param code: Error code - :type code: str - :param message: Error message indicating why the operation failed. - :type message: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, *, code: str=None, message: str=None, **kwargs) -> None: - super(ErrorResponse, self).__init__(**kwargs) - self.code = code - self.message = message - - -class ErrorResponseException(HttpOperationError): - """Server responsed with exception of type: 'ErrorResponse'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) diff --git a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/hana_instance.py b/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/hana_instance.py deleted file mode 100644 index 499d92ee41df..000000000000 --- a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/hana_instance.py +++ /dev/null @@ -1,104 +0,0 @@ -# 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 .resource import Resource - - -class HanaInstance(Resource): - """HANA instance info on Azure (ARM properties and HANA properties). - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Resource location - :type location: str - :ivar tags: Resource tags - :vartype tags: dict[str, str] - :param hardware_profile: Specifies the hardware settings for the HANA - instance. - :type hardware_profile: ~azure.mgmt.hanaonazure.models.HardwareProfile - :param storage_profile: Specifies the storage settings for the HANA - instance disks. - :type storage_profile: ~azure.mgmt.hanaonazure.models.StorageProfile - :param os_profile: Specifies the operating system settings for the HANA - instance. - :type os_profile: ~azure.mgmt.hanaonazure.models.OSProfile - :param network_profile: Specifies the network settings for the HANA - instance. - :type network_profile: ~azure.mgmt.hanaonazure.models.NetworkProfile - :ivar hana_instance_id: Specifies the HANA instance unique ID. - :vartype hana_instance_id: str - :ivar power_state: Resource power state. Possible values include: - 'starting', 'started', 'stopping', 'stopped', 'restarting', 'unknown' - :vartype power_state: str or - ~azure.mgmt.hanaonazure.models.HanaInstancePowerStateEnum - :ivar proximity_placement_group: Resource proximity placement group - :vartype proximity_placement_group: str - :ivar hw_revision: Hardware revision of a HANA instance - :vartype hw_revision: str - :param partner_node_id: ARM ID of another HanaInstance that will share a - network with this HanaInstance - :type partner_node_id: str - :ivar provisioning_state: State of provisioning of the HanaInstance. - Possible values include: 'Accepted', 'Creating', 'Updating', 'Failed', - 'Succeeded', 'Deleting', 'Migrating' - :vartype provisioning_state: str or - ~azure.mgmt.hanaonazure.models.HanaProvisioningStatesEnum - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'tags': {'readonly': True}, - 'hana_instance_id': {'readonly': True}, - 'power_state': {'readonly': True}, - 'proximity_placement_group': {'readonly': True}, - 'hw_revision': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, - 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, - 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, - 'hana_instance_id': {'key': 'properties.hanaInstanceId', 'type': 'str'}, - 'power_state': {'key': 'properties.powerState', 'type': 'str'}, - 'proximity_placement_group': {'key': 'properties.proximityPlacementGroup', 'type': 'str'}, - 'hw_revision': {'key': 'properties.hwRevision', 'type': 'str'}, - 'partner_node_id': {'key': 'properties.partnerNodeId', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(HanaInstance, self).__init__(**kwargs) - self.hardware_profile = kwargs.get('hardware_profile', None) - self.storage_profile = kwargs.get('storage_profile', None) - self.os_profile = kwargs.get('os_profile', None) - self.network_profile = kwargs.get('network_profile', None) - self.hana_instance_id = None - self.power_state = None - self.proximity_placement_group = None - self.hw_revision = None - self.partner_node_id = kwargs.get('partner_node_id', None) - self.provisioning_state = None diff --git a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/hana_instance_py3.py b/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/hana_instance_py3.py deleted file mode 100644 index 6241551241f4..000000000000 --- a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/hana_instance_py3.py +++ /dev/null @@ -1,104 +0,0 @@ -# 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 .resource_py3 import Resource - - -class HanaInstance(Resource): - """HANA instance info on Azure (ARM properties and HANA properties). - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Resource location - :type location: str - :ivar tags: Resource tags - :vartype tags: dict[str, str] - :param hardware_profile: Specifies the hardware settings for the HANA - instance. - :type hardware_profile: ~azure.mgmt.hanaonazure.models.HardwareProfile - :param storage_profile: Specifies the storage settings for the HANA - instance disks. - :type storage_profile: ~azure.mgmt.hanaonazure.models.StorageProfile - :param os_profile: Specifies the operating system settings for the HANA - instance. - :type os_profile: ~azure.mgmt.hanaonazure.models.OSProfile - :param network_profile: Specifies the network settings for the HANA - instance. - :type network_profile: ~azure.mgmt.hanaonazure.models.NetworkProfile - :ivar hana_instance_id: Specifies the HANA instance unique ID. - :vartype hana_instance_id: str - :ivar power_state: Resource power state. Possible values include: - 'starting', 'started', 'stopping', 'stopped', 'restarting', 'unknown' - :vartype power_state: str or - ~azure.mgmt.hanaonazure.models.HanaInstancePowerStateEnum - :ivar proximity_placement_group: Resource proximity placement group - :vartype proximity_placement_group: str - :ivar hw_revision: Hardware revision of a HANA instance - :vartype hw_revision: str - :param partner_node_id: ARM ID of another HanaInstance that will share a - network with this HanaInstance - :type partner_node_id: str - :ivar provisioning_state: State of provisioning of the HanaInstance. - Possible values include: 'Accepted', 'Creating', 'Updating', 'Failed', - 'Succeeded', 'Deleting', 'Migrating' - :vartype provisioning_state: str or - ~azure.mgmt.hanaonazure.models.HanaProvisioningStatesEnum - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'tags': {'readonly': True}, - 'hana_instance_id': {'readonly': True}, - 'power_state': {'readonly': True}, - 'proximity_placement_group': {'readonly': True}, - 'hw_revision': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, - 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, - 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'}, - 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, - 'hana_instance_id': {'key': 'properties.hanaInstanceId', 'type': 'str'}, - 'power_state': {'key': 'properties.powerState', 'type': 'str'}, - 'proximity_placement_group': {'key': 'properties.proximityPlacementGroup', 'type': 'str'}, - 'hw_revision': {'key': 'properties.hwRevision', 'type': 'str'}, - 'partner_node_id': {'key': 'properties.partnerNodeId', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__(self, *, location: str=None, hardware_profile=None, storage_profile=None, os_profile=None, network_profile=None, partner_node_id: str=None, **kwargs) -> None: - super(HanaInstance, self).__init__(location=location, **kwargs) - self.hardware_profile = hardware_profile - self.storage_profile = storage_profile - self.os_profile = os_profile - self.network_profile = network_profile - self.hana_instance_id = None - self.power_state = None - self.proximity_placement_group = None - self.hw_revision = None - self.partner_node_id = partner_node_id - self.provisioning_state = None diff --git a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/hardware_profile.py b/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/hardware_profile.py deleted file mode 100644 index 1c66d7d83331..000000000000 --- a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/hardware_profile.py +++ /dev/null @@ -1,46 +0,0 @@ -# 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 HardwareProfile(Model): - """Specifies the hardware settings for the HANA instance. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar hardware_type: Name of the hardware type (vendor and/or their - product name). Possible values include: 'Cisco_UCS', 'HPE' - :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', 'S96', - 'S384', 'S384m', 'S384xm', 'S384xxm', 'S576m', 'S576xm', 'S768', 'S768m', - 'S768xm', 'S960m', 'S224o', 'S224m', 'S224om', 'S224oxm', 'S224oxxm' - :vartype hana_instance_size: str or - ~azure.mgmt.hanaonazure.models.HanaInstanceSizeNamesEnum - """ - - _validation = { - 'hardware_type': {'readonly': True}, - 'hana_instance_size': {'readonly': True}, - } - - _attribute_map = { - 'hardware_type': {'key': 'hardwareType', 'type': 'str'}, - 'hana_instance_size': {'key': 'hanaInstanceSize', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(HardwareProfile, self).__init__(**kwargs) - self.hardware_type = None - self.hana_instance_size = None diff --git a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/hardware_profile_py3.py b/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/hardware_profile_py3.py deleted file mode 100644 index efc91a21fdc1..000000000000 --- a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/hardware_profile_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# 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 HardwareProfile(Model): - """Specifies the hardware settings for the HANA instance. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar hardware_type: Name of the hardware type (vendor and/or their - product name). Possible values include: 'Cisco_UCS', 'HPE' - :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', 'S96', - 'S384', 'S384m', 'S384xm', 'S384xxm', 'S576m', 'S576xm', 'S768', 'S768m', - 'S768xm', 'S960m', 'S224o', 'S224m', 'S224om', 'S224oxm', 'S224oxxm' - :vartype hana_instance_size: str or - ~azure.mgmt.hanaonazure.models.HanaInstanceSizeNamesEnum - """ - - _validation = { - 'hardware_type': {'readonly': True}, - 'hana_instance_size': {'readonly': True}, - } - - _attribute_map = { - 'hardware_type': {'key': 'hardwareType', 'type': 'str'}, - 'hana_instance_size': {'key': 'hanaInstanceSize', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(HardwareProfile, self).__init__(**kwargs) - self.hardware_type = None - self.hana_instance_size = None diff --git a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/ip_address.py b/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/ip_address.py deleted file mode 100644 index 1ec48ebbd78d..000000000000 --- a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/ip_address.py +++ /dev/null @@ -1,28 +0,0 @@ -# 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 IpAddress(Model): - """Specifies the IP address of the network interface. - - :param ip_address: Specifies the IP address of the network interface. - :type ip_address: str - """ - - _attribute_map = { - 'ip_address': {'key': 'ipAddress', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(IpAddress, self).__init__(**kwargs) - self.ip_address = kwargs.get('ip_address', None) diff --git a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/ip_address_py3.py b/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/ip_address_py3.py deleted file mode 100644 index ab18580deda9..000000000000 --- a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/ip_address_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# 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 IpAddress(Model): - """Specifies the IP address of the network interface. - - :param ip_address: Specifies the IP address of the network interface. - :type ip_address: str - """ - - _attribute_map = { - 'ip_address': {'key': 'ipAddress', 'type': 'str'}, - } - - def __init__(self, *, ip_address: str=None, **kwargs) -> None: - super(IpAddress, self).__init__(**kwargs) - self.ip_address = ip_address diff --git a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/monitoring_details.py b/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/monitoring_details.py deleted file mode 100644 index 36e91fcdcd27..000000000000 --- a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/monitoring_details.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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 MonitoringDetails(Model): - """Details needed to monitor a Hana Instance. - - :param hana_subnet: ARM ID of an Azure Subnet with access to the HANA - instance. - :type hana_subnet: str - :param hana_hostname: Hostname of the HANA Instance blade. - :type hana_hostname: str - :param hana_db_name: Name of the database itself. - :type hana_db_name: str - :param hana_db_sql_port: The port number of the tenant DB. Used to connect - to the DB. - :type hana_db_sql_port: int - :param hana_db_username: Username for the HANA database to login to for - monitoring - :type hana_db_username: str - :param hana_db_password: Password for the HANA database to login for - monitoring - :type hana_db_password: str - """ - - _attribute_map = { - 'hana_subnet': {'key': 'hanaSubnet', 'type': 'str'}, - 'hana_hostname': {'key': 'hanaHostname', 'type': 'str'}, - 'hana_db_name': {'key': 'hanaDbName', 'type': 'str'}, - 'hana_db_sql_port': {'key': 'hanaDbSqlPort', 'type': 'int'}, - 'hana_db_username': {'key': 'hanaDbUsername', 'type': 'str'}, - 'hana_db_password': {'key': 'hanaDbPassword', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(MonitoringDetails, self).__init__(**kwargs) - self.hana_subnet = kwargs.get('hana_subnet', None) - self.hana_hostname = kwargs.get('hana_hostname', None) - self.hana_db_name = kwargs.get('hana_db_name', None) - 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) diff --git a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/monitoring_details_py3.py b/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/monitoring_details_py3.py deleted file mode 100644 index 78e7b146e284..000000000000 --- a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/monitoring_details_py3.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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 MonitoringDetails(Model): - """Details needed to monitor a Hana Instance. - - :param hana_subnet: ARM ID of an Azure Subnet with access to the HANA - instance. - :type hana_subnet: str - :param hana_hostname: Hostname of the HANA Instance blade. - :type hana_hostname: str - :param hana_db_name: Name of the database itself. - :type hana_db_name: str - :param hana_db_sql_port: The port number of the tenant DB. Used to connect - to the DB. - :type hana_db_sql_port: int - :param hana_db_username: Username for the HANA database to login to for - monitoring - :type hana_db_username: str - :param hana_db_password: Password for the HANA database to login for - monitoring - :type hana_db_password: str - """ - - _attribute_map = { - 'hana_subnet': {'key': 'hanaSubnet', 'type': 'str'}, - 'hana_hostname': {'key': 'hanaHostname', 'type': 'str'}, - 'hana_db_name': {'key': 'hanaDbName', 'type': 'str'}, - 'hana_db_sql_port': {'key': 'hanaDbSqlPort', 'type': 'int'}, - 'hana_db_username': {'key': 'hanaDbUsername', 'type': 'str'}, - 'hana_db_password': {'key': 'hanaDbPassword', 'type': 'str'}, - } - - def __init__(self, *, 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: - super(MonitoringDetails, self).__init__(**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 diff --git a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/network_profile.py b/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/network_profile.py deleted file mode 100644 index ba74ee635792..000000000000 --- a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/network_profile.py +++ /dev/null @@ -1,41 +0,0 @@ -# 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 NetworkProfile(Model): - """Specifies the network settings for the HANA instance disks. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param network_interfaces: Specifies the network interfaces for the HANA - instance. - :type network_interfaces: list[~azure.mgmt.hanaonazure.models.IpAddress] - :ivar circuit_id: Specifies the circuit id for connecting to express - route. - :vartype circuit_id: str - """ - - _validation = { - 'circuit_id': {'readonly': True}, - } - - _attribute_map = { - 'network_interfaces': {'key': 'networkInterfaces', 'type': '[IpAddress]'}, - 'circuit_id': {'key': 'circuitId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(NetworkProfile, self).__init__(**kwargs) - self.network_interfaces = kwargs.get('network_interfaces', None) - self.circuit_id = None diff --git a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/network_profile_py3.py b/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/network_profile_py3.py deleted file mode 100644 index 42eeddf025c7..000000000000 --- a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/network_profile_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# 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 NetworkProfile(Model): - """Specifies the network settings for the HANA instance disks. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param network_interfaces: Specifies the network interfaces for the HANA - instance. - :type network_interfaces: list[~azure.mgmt.hanaonazure.models.IpAddress] - :ivar circuit_id: Specifies the circuit id for connecting to express - route. - :vartype circuit_id: str - """ - - _validation = { - 'circuit_id': {'readonly': True}, - } - - _attribute_map = { - 'network_interfaces': {'key': 'networkInterfaces', 'type': '[IpAddress]'}, - 'circuit_id': {'key': 'circuitId', 'type': 'str'}, - } - - def __init__(self, *, network_interfaces=None, **kwargs) -> None: - super(NetworkProfile, self).__init__(**kwargs) - self.network_interfaces = network_interfaces - self.circuit_id = None diff --git a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/operation.py b/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/operation.py deleted file mode 100644 index 0c18726636c4..000000000000 --- a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/operation.py +++ /dev/null @@ -1,41 +0,0 @@ -# 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 Operation(Model): - """HANA operation information. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The name of the operation being performed on this particular - object. This name should match the action name that appears in RBAC / the - event service. - :vartype name: str - :param display: Displayed HANA operation information - :type display: ~azure.mgmt.hanaonazure.models.Display - """ - - _validation = { - 'name': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'Display'}, - } - - def __init__(self, **kwargs): - super(Operation, self).__init__(**kwargs) - self.name = None - self.display = kwargs.get('display', None) diff --git a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/operation_paged.py b/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/operation_paged.py deleted file mode 100644 index f74530899382..000000000000 --- a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/operation_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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.paging import Paged - - -class OperationPaged(Paged): - """ - A paging container for iterating over a list of :class:`Operation ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Operation]'} - } - - def __init__(self, *args, **kwargs): - - super(OperationPaged, self).__init__(*args, **kwargs) diff --git a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/operation_py3.py b/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/operation_py3.py deleted file mode 100644 index a95d21640f4e..000000000000 --- a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/operation_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# 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 Operation(Model): - """HANA operation information. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The name of the operation being performed on this particular - object. This name should match the action name that appears in RBAC / the - event service. - :vartype name: str - :param display: Displayed HANA operation information - :type display: ~azure.mgmt.hanaonazure.models.Display - """ - - _validation = { - 'name': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'Display'}, - } - - def __init__(self, *, display=None, **kwargs) -> None: - super(Operation, self).__init__(**kwargs) - self.name = None - self.display = display diff --git a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/os_profile.py b/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/os_profile.py deleted file mode 100644 index 1b92b1c9bda5..000000000000 --- a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/os_profile.py +++ /dev/null @@ -1,49 +0,0 @@ -# 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 OSProfile(Model): - """Specifies the operating system settings for the HANA instance. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param computer_name: Specifies the host OS name of the HANA instance. - :type computer_name: str - :ivar os_type: This property allows you to specify the type of the OS. - :vartype os_type: str - :ivar version: Specifies version of operating system. - :vartype version: str - :param ssh_public_key: Specifies the SSH public key used to access the - operating system. - :type ssh_public_key: str - """ - - _validation = { - 'os_type': {'readonly': True}, - 'version': {'readonly': True}, - } - - _attribute_map = { - 'computer_name': {'key': 'computerName', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'version': {'key': 'version', 'type': 'str'}, - 'ssh_public_key': {'key': 'sshPublicKey', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OSProfile, self).__init__(**kwargs) - self.computer_name = kwargs.get('computer_name', None) - self.os_type = None - self.version = None - self.ssh_public_key = kwargs.get('ssh_public_key', None) diff --git a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/os_profile_py3.py b/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/os_profile_py3.py deleted file mode 100644 index 7fbee6edb690..000000000000 --- a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/os_profile_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# 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 OSProfile(Model): - """Specifies the operating system settings for the HANA instance. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param computer_name: Specifies the host OS name of the HANA instance. - :type computer_name: str - :ivar os_type: This property allows you to specify the type of the OS. - :vartype os_type: str - :ivar version: Specifies version of operating system. - :vartype version: str - :param ssh_public_key: Specifies the SSH public key used to access the - operating system. - :type ssh_public_key: str - """ - - _validation = { - 'os_type': {'readonly': True}, - 'version': {'readonly': True}, - } - - _attribute_map = { - 'computer_name': {'key': 'computerName', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'version': {'key': 'version', 'type': 'str'}, - 'ssh_public_key': {'key': 'sshPublicKey', 'type': 'str'}, - } - - def __init__(self, *, computer_name: str=None, ssh_public_key: str=None, **kwargs) -> None: - super(OSProfile, self).__init__(**kwargs) - self.computer_name = computer_name - self.os_type = None - self.version = None - self.ssh_public_key = ssh_public_key diff --git a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/resource.py b/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/resource.py deleted file mode 100644 index 6b44bb4441c0..000000000000 --- a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/resource.py +++ /dev/null @@ -1,54 +0,0 @@ -# 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 Resource(Model): - """The resource model definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Resource location - :type location: str - :ivar tags: Resource tags - :vartype tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'tags': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = kwargs.get('location', None) - self.tags = None diff --git a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/resource_py3.py b/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/resource_py3.py deleted file mode 100644 index 2360d140daae..000000000000 --- a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/resource_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# 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 Resource(Model): - """The resource model definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - :param location: Resource location - :type location: str - :ivar tags: Resource tags - :vartype tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'tags': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, location: str=None, **kwargs) -> None: - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = location - self.tags = None diff --git a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/storage_profile.py b/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/storage_profile.py deleted file mode 100644 index d39fde22aab7..000000000000 --- a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/storage_profile.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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 StorageProfile(Model): - """Specifies the storage settings for the HANA instance disks. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar nfs_ip_address: IP Address to connect to storage. - :vartype nfs_ip_address: str - :param os_disks: Specifies information about the operating system disk - used by the hana instance. - :type os_disks: list[~azure.mgmt.hanaonazure.models.Disk] - """ - - _validation = { - 'nfs_ip_address': {'readonly': True}, - } - - _attribute_map = { - 'nfs_ip_address': {'key': 'nfsIpAddress', 'type': 'str'}, - 'os_disks': {'key': 'osDisks', 'type': '[Disk]'}, - } - - def __init__(self, **kwargs): - super(StorageProfile, self).__init__(**kwargs) - self.nfs_ip_address = None - self.os_disks = kwargs.get('os_disks', None) diff --git a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/storage_profile_py3.py b/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/storage_profile_py3.py deleted file mode 100644 index dae247db8738..000000000000 --- a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/storage_profile_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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 StorageProfile(Model): - """Specifies the storage settings for the HANA instance disks. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar nfs_ip_address: IP Address to connect to storage. - :vartype nfs_ip_address: str - :param os_disks: Specifies information about the operating system disk - used by the hana instance. - :type os_disks: list[~azure.mgmt.hanaonazure.models.Disk] - """ - - _validation = { - 'nfs_ip_address': {'readonly': True}, - } - - _attribute_map = { - 'nfs_ip_address': {'key': 'nfsIpAddress', 'type': 'str'}, - 'os_disks': {'key': 'osDisks', 'type': '[Disk]'}, - } - - def __init__(self, *, os_disks=None, **kwargs) -> None: - super(StorageProfile, self).__init__(**kwargs) - self.nfs_ip_address = None - self.os_disks = os_disks diff --git a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/tags.py b/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/tags.py deleted file mode 100644 index 8ba09d9de11b..000000000000 --- a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/tags.py +++ /dev/null @@ -1,28 +0,0 @@ -# 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/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/tags_py3.py b/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/tags_py3.py deleted file mode 100644 index 669760aed216..000000000000 --- a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/tags_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# 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/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/operations/__init__.py b/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/operations/__init__.py index 8bc12830472c..03aed444efe9 100644 --- a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/operations/__init__.py +++ b/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/operations/__init__.py @@ -9,10 +9,12 @@ # regenerated. # -------------------------------------------------------------------------- -from .operations import Operations -from .hana_instances_operations import HanaInstancesOperations +from ._operations import Operations +from ._hana_instances_operations import HanaInstancesOperations +from ._sap_monitors_operations import SapMonitorsOperations __all__ = [ 'Operations', 'HanaInstancesOperations', + 'SapMonitorsOperations', ] diff --git a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/operations/hana_instances_operations.py b/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/operations/_hana_instances_operations.py similarity index 78% rename from sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/operations/hana_instances_operations.py rename to sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/operations/_hana_instances_operations.py index 83ac00b821d7..b4932fa45b64 100644 --- a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/operations/hana_instances_operations.py +++ b/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/operations/_hana_instances_operations.py @@ -21,6 +21,8 @@ class HanaInstancesOperations(object): """HanaInstancesOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -58,8 +60,7 @@ def list( :raises: :class:`ErrorResponseException` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -88,6 +89,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -96,12 +102,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.HanaInstancePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.HanaInstancePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.HanaInstancePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.HanaOnAzure/hanaInstances'} @@ -128,8 +132,7 @@ def list_by_resource_group( :raises: :class:`ErrorResponseException` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_resource_group.metadata['url'] @@ -159,6 +162,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -167,12 +175,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.HanaInstancePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.HanaInstancePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.HanaInstancePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HanaOnAzure/hanaInstances'} @@ -230,7 +236,6 @@ def get( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('HanaInstance', response) @@ -489,7 +494,6 @@ def update( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('HanaInstance', response) @@ -530,9 +534,7 @@ def _restart_initial( 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 + raise models.ErrorResponseException(self._deserialize, response) if raw: client_raw_response = ClientRawResponse(None, response) @@ -555,7 +557,8 @@ def restart( ClientRawResponse if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` + :raises: + :class:`ErrorResponseException` """ raw_result = self._restart_initial( resource_group_name=resource_group_name, @@ -580,6 +583,162 @@ def get_long_running_output(response): restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HanaOnAzure/hanaInstances/{hanaInstanceName}/restart'} + def _start_initial( + self, resource_group_name, hana_instance_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.start.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 = {} + 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 and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def start( + self, resource_group_name, hana_instance_name, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to start a 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 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 if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`ErrorResponseException` + """ + raw_result = self._start_initial( + resource_group_name=resource_group_name, + hana_instance_name=hana_instance_name, + 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) + start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HanaOnAzure/hanaInstances/{hanaInstanceName}/start'} + + + def _shutdown_initial( + self, resource_group_name, hana_instance_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.shutdown.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 = {} + 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 and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def shutdown( + self, resource_group_name, hana_instance_name, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to shutdown a 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 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 if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`ErrorResponseException` + """ + raw_result = self._shutdown_initial( + resource_group_name=resource_group_name, + hana_instance_name=hana_instance_name, + 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) + 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 diff --git a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/operations/operations.py b/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/operations/_operations.py similarity index 90% rename from sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/operations/operations.py rename to sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/operations/_operations.py index 6cf82ecc3229..75c81a3d2b75 100644 --- a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/operations/operations.py +++ b/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/operations/_operations.py @@ -18,6 +18,8 @@ class Operations(object): """Operations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -51,8 +53,7 @@ def list( :raises: :class:`ErrorResponseException` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -77,6 +78,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -85,12 +91,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/providers/Microsoft.HanaOnAzure/operations'} diff --git a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/operations/_sap_monitors_operations.py b/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/operations/_sap_monitors_operations.py new file mode 100644 index 000000000000..9f7b87beddb9 --- /dev/null +++ b/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/operations/_sap_monitors_operations.py @@ -0,0 +1,428 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class SapMonitorsOperations(object): + """SapMonitorsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client API version. Constant value: "2017-11-03-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-11-03-preview" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Gets a list of SAP monitors in the specified subscription. + + Gets a list of SAP monitors in the specified subscription. The + operations returns various properties of each SAP monitor. + + :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: An iterator like instance of SapMonitor + :rtype: + ~azure.mgmt.hanaonazure.models.SapMonitorPaged[~azure.mgmt.hanaonazure.models.SapMonitor] + :raises: + :class:`ErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, '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') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + 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 and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SapMonitorPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.HanaOnAzure/sapMonitors'} + + def get( + self, resource_group_name, sap_monitor_name, custom_headers=None, raw=False, **operation_config): + """Gets properties of a SAP monitor. + + Gets properties of a SAP monitor for the specified subscription, + resource group, and resource name. + + :param resource_group_name: Name of the resource group. + :type resource_group_name: str + :param sap_monitor_name: Name of the SAP monitor resource. + :type sap_monitor_name: 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: SapMonitor or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.hanaonazure.models.SapMonitor or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get.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'), + 'sapMonitorName': self._serialize.url("sap_monitor_name", sap_monitor_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' + 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 and send request + request = self._client.get(url, query_parameters, header_parameters) + 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('SapMonitor', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HanaOnAzure/sapMonitors/{sapMonitorName}'} + + + def _create_initial( + self, resource_group_name, sap_monitor_name, sap_monitor_parameter, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create.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'), + 'sapMonitorName': self._serialize.url("sap_monitor_name", sap_monitor_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(sap_monitor_parameter, 'SapMonitor') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('SapMonitor', response) + if response.status_code == 201: + deserialized = self._deserialize('SapMonitor', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create( + self, resource_group_name, sap_monitor_name, sap_monitor_parameter, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates a SAP monitor. + + Creates a SAP monitor for the specified subscription, resource group, + and resource name. + + :param resource_group_name: Name of the resource group. + :type resource_group_name: str + :param sap_monitor_name: Name of the SAP monitor resource. + :type sap_monitor_name: str + :param sap_monitor_parameter: Request body representing a SAP Monitor + :type sap_monitor_parameter: ~azure.mgmt.hanaonazure.models.SapMonitor + :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 SapMonitor or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.hanaonazure.models.SapMonitor] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.hanaonazure.models.SapMonitor]] + :raises: + :class:`ErrorResponseException` + """ + raw_result = self._create_initial( + resource_group_name=resource_group_name, + sap_monitor_name=sap_monitor_name, + sap_monitor_parameter=sap_monitor_parameter, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('SapMonitor', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + 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) + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HanaOnAzure/sapMonitors/{sapMonitorName}'} + + + def _delete_initial( + self, resource_group_name, sap_monitor_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.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'), + 'sapMonitorName': self._serialize.url("sap_monitor_name", sap_monitor_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 = {} + 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 and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, sap_monitor_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes a SAP monitor. + + Deletes a SAP monitor with the specified subscription, resource group, + and monitor name. + + :param resource_group_name: Name of the resource group. + :type resource_group_name: str + :param sap_monitor_name: Name of the SAP monitor resource. + :type sap_monitor_name: str + :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 if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`ErrorResponseException` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + sap_monitor_name=sap_monitor_name, + 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) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HanaOnAzure/sapMonitors/{sapMonitorName}'} + + def update( + self, resource_group_name, sap_monitor_name, tags=None, custom_headers=None, raw=False, **operation_config): + """Patches the Tags field of a SAP monitor. + + Patches the Tags field of a SAP monitor for the specified subscription, + resource group, and monitor name. + + :param resource_group_name: Name of the resource group. + :type resource_group_name: str + :param sap_monitor_name: Name of the SAP monitor resource. + :type sap_monitor_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: SapMonitor or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.hanaonazure.models.SapMonitor 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'), + 'sapMonitorName': self._serialize.url("sap_monitor_name", sap_monitor_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('SapMonitor', 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/sapMonitors/{sapMonitorName}'} diff --git a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/version.py b/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/version.py index d473b389a956..e4f3d5055303 100644 --- a/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/version.py +++ b/sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "0.7.1" +VERSION = "0.8.0"