From acd5077b56b35e2793ab50a0d152e2b3dfe29150 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Thu, 2 Aug 2018 20:40:16 +0000 Subject: [PATCH 1/3] Generated from 49201e1122012eafd505ebcf228a908f85c9146f Added power state to Hana Instance --- .../hanaonazure/hana_management_client.py | 6 +- .../azure/mgmt/hanaonazure/models/__init__.py | 35 +++++--- .../azure/mgmt/hanaonazure/models/disk.py | 8 +- .../azure/mgmt/hanaonazure/models/disk_py3.py | 46 +++++++++++ .../azure/mgmt/hanaonazure/models/display.py | 6 +- .../mgmt/hanaonazure/models/display_py3.py | 67 ++++++++++++++++ .../mgmt/hanaonazure/models/error_response.py | 8 +- .../hanaonazure/models/error_response_py3.py | 45 +++++++++++ .../mgmt/hanaonazure/models/hana_instance.py | 16 ++-- .../hanaonazure/models/hana_instance_py3.py | 79 +++++++++++++++++++ .../models/hana_management_client_enums.py | 4 +- .../hanaonazure/models/hardware_profile.py | 4 +- .../models/hardware_profile_py3.py | 46 +++++++++++ .../mgmt/hanaonazure/models/ip_address.py | 4 +- .../mgmt/hanaonazure/models/ip_address_py3.py | 35 ++++++++ .../hanaonazure/models/network_profile.py | 6 +- .../hanaonazure/models/network_profile_py3.py | 41 ++++++++++ .../mgmt/hanaonazure/models/operation.py | 6 +- .../mgmt/hanaonazure/models/operation_py3.py | 41 ++++++++++ .../mgmt/hanaonazure/models/os_profile.py | 4 +- .../mgmt/hanaonazure/models/os_profile_py3.py | 45 +++++++++++ .../azure/mgmt/hanaonazure/models/resource.py | 9 ++- .../mgmt/hanaonazure/models/resource_py3.py | 60 ++++++++++++++ .../hanaonazure/models/storage_profile.py | 6 +- .../hanaonazure/models/storage_profile_py3.py | 40 ++++++++++ .../operations/hana_instances_operations.py | 20 +++-- .../mgmt/hanaonazure/operations/operations.py | 7 +- .../azure/mgmt/hanaonazure/version.py | 2 +- 28 files changed, 630 insertions(+), 66 deletions(-) create mode 100644 azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/disk_py3.py create mode 100644 azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/display_py3.py create mode 100644 azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/error_response_py3.py create mode 100644 azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/hana_instance_py3.py create mode 100644 azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/hardware_profile_py3.py create mode 100644 azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/ip_address_py3.py create mode 100644 azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/network_profile_py3.py create mode 100644 azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/operation_py3.py create mode 100644 azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/os_profile_py3.py create mode 100644 azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/resource_py3.py create mode 100644 azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/storage_profile_py3.py diff --git a/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/hana_management_client.py b/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/hana_management_client.py index 4ae425fe40a4..8b660e12b291 100644 --- a/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/hana_management_client.py +++ b/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/hana_management_client.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from msrest.service_client import ServiceClient +from msrest.service_client import SDKClient from msrest import Serializer, Deserializer from msrestazure import AzureConfiguration from .version import VERSION @@ -52,7 +52,7 @@ def __init__( self.subscription_id = subscription_id -class HanaManagementClient(object): +class HanaManagementClient(SDKClient): """HANA on Azure Client :ivar config: Configuration for client. @@ -77,7 +77,7 @@ def __init__( self, credentials, subscription_id, base_url=None): self.config = HanaManagementClientConfiguration(credentials, subscription_id, base_url) - self._client = ServiceClient(self.config.credentials, self.config) + super(HanaManagementClient, self).__init__(self.config.credentials, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} self.api_version = '2017-11-03-preview' diff --git a/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/__init__.py b/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/__init__.py index 97f5996fb578..a8d0dd14a709 100644 --- a/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/__init__.py +++ b/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/__init__.py @@ -9,17 +9,30 @@ # regenerated. # -------------------------------------------------------------------------- -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 +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 +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 .operation_paged import OperationPaged from .hana_instance_paged import HanaInstancePaged from .hana_management_client_enums import ( diff --git a/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/disk.py b/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/disk.py index 3f532722b1c9..9f1a2df57b27 100644 --- a/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/disk.py +++ b/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/disk.py @@ -39,8 +39,8 @@ class Disk(Model): 'lun': {'key': 'lun', 'type': 'int'}, } - def __init__(self, name=None, disk_size_gb=None): - super(Disk, self).__init__() - self.name = name - self.disk_size_gb = disk_size_gb + 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/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/disk_py3.py b/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/disk_py3.py new file mode 100644 index 000000000000..aa72032ca814 --- /dev/null +++ b/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/disk_py3.py @@ -0,0 +1,46 @@ +# 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/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/display.py b/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/display.py index 417c784cf736..25baa3464325 100644 --- a/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/display.py +++ b/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/display.py @@ -20,7 +20,7 @@ class Display(Model): :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. + 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 @@ -58,8 +58,8 @@ class Display(Model): 'origin': {'key': 'origin', 'type': 'str'}, } - def __init__(self): - super(Display, self).__init__() + def __init__(self, **kwargs): + super(Display, self).__init__(**kwargs) self.provider = None self.resource = None self.operation = None diff --git a/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/display_py3.py b/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/display_py3.py new file mode 100644 index 000000000000..311420d15b7e --- /dev/null +++ b/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/display_py3.py @@ -0,0 +1,67 @@ +# 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/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/error_response.py b/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/error_response.py index 1a399569811b..b3d490a49503 100644 --- a/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/error_response.py +++ b/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/error_response.py @@ -27,10 +27,10 @@ class ErrorResponse(Model): 'message': {'key': 'message', 'type': 'str'}, } - def __init__(self, code=None, message=None): - super(ErrorResponse, self).__init__() - self.code = code - self.message = message + def __init__(self, **kwargs): + super(ErrorResponse, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) class ErrorResponseException(HttpOperationError): diff --git a/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/error_response_py3.py b/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/error_response_py3.py new file mode 100644 index 000000000000..5504940d6873 --- /dev/null +++ b/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/error_response_py3.py @@ -0,0 +1,45 @@ +# 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/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/hana_instance.py b/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/hana_instance.py index e6f634ef83c6..3639d421cdf8 100644 --- a/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/hana_instance.py +++ b/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/hana_instance.py @@ -26,6 +26,8 @@ class HanaInstance(Resource): :vartype type: str :ivar location: Resource location :vartype location: str + :ivar power_state: Resource power state + :vartype power_state: str :ivar tags: Resource tags :vartype tags: dict[str, str] :param hardware_profile: Specifies the hardware settings for the HANA @@ -49,6 +51,7 @@ class HanaInstance(Resource): 'name': {'readonly': True}, 'type': {'readonly': True}, 'location': {'readonly': True}, + 'power_state': {'readonly': True}, 'tags': {'readonly': True}, 'hana_instance_id': {'readonly': True}, } @@ -58,6 +61,7 @@ class HanaInstance(Resource): 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, + 'power_state': {'key': 'powerState', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, @@ -66,10 +70,10 @@ class HanaInstance(Resource): 'hana_instance_id': {'key': 'properties.hanaInstanceId', 'type': 'str'}, } - def __init__(self, hardware_profile=None, storage_profile=None, os_profile=None, network_profile=None): - super(HanaInstance, self).__init__() - self.hardware_profile = hardware_profile - self.storage_profile = storage_profile - self.os_profile = os_profile - self.network_profile = network_profile + 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 diff --git a/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/hana_instance_py3.py b/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/hana_instance_py3.py new file mode 100644 index 000000000000..4cffb6e3e16c --- /dev/null +++ b/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/hana_instance_py3.py @@ -0,0 +1,79 @@ +# 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 + :ivar location: Resource location + :vartype location: str + :ivar power_state: Resource power state + :vartype power_state: 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 + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'power_state': {'readonly': True}, + 'tags': {'readonly': True}, + 'hana_instance_id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'power_state': {'key': 'powerState', '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'}, + } + + def __init__(self, *, hardware_profile=None, storage_profile=None, os_profile=None, network_profile=None, **kwargs) -> None: + super(HanaInstance, self).__init__(**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 diff --git a/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/hana_management_client_enums.py b/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/hana_management_client_enums.py index bff5c84bf32f..fb8339c03073 100644 --- a/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/hana_management_client_enums.py +++ b/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/hana_management_client_enums.py @@ -12,13 +12,13 @@ from enum import Enum -class HanaHardwareTypeNamesEnum(Enum): +class HanaHardwareTypeNamesEnum(str, Enum): cisco_ucs = "Cisco_UCS" hpe = "HPE" -class HanaInstanceSizeNamesEnum(Enum): +class HanaInstanceSizeNamesEnum(str, Enum): s72m = "S72m" s144m = "S144m" diff --git a/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/hardware_profile.py b/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/hardware_profile.py index 05d162766fc5..ed283992ccfa 100644 --- a/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/hardware_profile.py +++ b/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/hardware_profile.py @@ -40,7 +40,7 @@ class HardwareProfile(Model): 'hana_instance_size': {'key': 'hanaInstanceSize', 'type': 'str'}, } - def __init__(self): - super(HardwareProfile, self).__init__() + def __init__(self, **kwargs): + super(HardwareProfile, self).__init__(**kwargs) self.hardware_type = None self.hana_instance_size = None diff --git a/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/hardware_profile_py3.py b/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/hardware_profile_py3.py new file mode 100644 index 000000000000..09adb7de1e60 --- /dev/null +++ b/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/hardware_profile_py3.py @@ -0,0 +1,46 @@ +# 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', + 'S384', 'S384m', 'S384xm', 'S384xxm', 'S576m', 'S576xm', 'S768', 'S768m', + 'S768xm', 'S960m' + :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/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/ip_address.py b/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/ip_address.py index a69655326ef0..a0d1cb8961ed 100644 --- a/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/ip_address.py +++ b/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/ip_address.py @@ -30,6 +30,6 @@ class IpAddress(Model): 'ip_address': {'key': 'ipAddress', 'type': 'str'}, } - def __init__(self): - super(IpAddress, self).__init__() + def __init__(self, **kwargs): + super(IpAddress, self).__init__(**kwargs) self.ip_address = None diff --git a/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/ip_address_py3.py b/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/ip_address_py3.py new file mode 100644 index 000000000000..92c31926f971 --- /dev/null +++ b/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/ip_address_py3.py @@ -0,0 +1,35 @@ +# 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 interaface. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar ip_address: Specifies the IP address of the network interface. + :vartype ip_address: str + """ + + _validation = { + 'ip_address': {'readonly': True}, + } + + _attribute_map = { + 'ip_address': {'key': 'ipAddress', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(IpAddress, self).__init__(**kwargs) + self.ip_address = None diff --git a/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/network_profile.py b/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/network_profile.py index b0efb56d7d5a..ba74ee635792 100644 --- a/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/network_profile.py +++ b/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/network_profile.py @@ -35,7 +35,7 @@ class NetworkProfile(Model): 'circuit_id': {'key': 'circuitId', 'type': 'str'}, } - def __init__(self, network_interfaces=None): - super(NetworkProfile, self).__init__() - self.network_interfaces = network_interfaces + def __init__(self, **kwargs): + super(NetworkProfile, self).__init__(**kwargs) + self.network_interfaces = kwargs.get('network_interfaces', None) self.circuit_id = None diff --git a/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/network_profile_py3.py b/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/network_profile_py3.py new file mode 100644 index 000000000000..42eeddf025c7 --- /dev/null +++ b/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/network_profile_py3.py @@ -0,0 +1,41 @@ +# 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/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/operation.py b/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/operation.py index 624602063c98..0c18726636c4 100644 --- a/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/operation.py +++ b/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/operation.py @@ -35,7 +35,7 @@ class Operation(Model): 'display': {'key': 'display', 'type': 'Display'}, } - def __init__(self, display=None): - super(Operation, self).__init__() + def __init__(self, **kwargs): + super(Operation, self).__init__(**kwargs) self.name = None - self.display = display + self.display = kwargs.get('display', None) diff --git a/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/operation_py3.py b/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/operation_py3.py new file mode 100644 index 000000000000..a95d21640f4e --- /dev/null +++ b/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/operation_py3.py @@ -0,0 +1,41 @@ +# 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/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/os_profile.py b/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/os_profile.py index 5fe9e3911c0f..775aa4320575 100644 --- a/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/os_profile.py +++ b/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/os_profile.py @@ -38,8 +38,8 @@ class OSProfile(Model): 'version': {'key': 'version', 'type': 'str'}, } - def __init__(self): - super(OSProfile, self).__init__() + def __init__(self, **kwargs): + super(OSProfile, self).__init__(**kwargs) self.computer_name = None self.os_type = None self.version = None diff --git a/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/os_profile_py3.py b/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/os_profile_py3.py new file mode 100644 index 000000000000..17fbeff93e45 --- /dev/null +++ b/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/os_profile_py3.py @@ -0,0 +1,45 @@ +# 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. + + :ivar computer_name: Specifies the host OS name of the HANA instance. + :vartype 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 + """ + + _validation = { + 'computer_name': {'readonly': True}, + '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'}, + } + + def __init__(self, **kwargs) -> None: + super(OSProfile, self).__init__(**kwargs) + self.computer_name = None + self.os_type = None + self.version = None diff --git a/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/resource.py b/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/resource.py index 10f2b7aef9d4..349cc34093bf 100644 --- a/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/resource.py +++ b/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/resource.py @@ -26,6 +26,8 @@ class Resource(Model): :vartype type: str :ivar location: Resource location :vartype location: str + :ivar power_state: Resource power state + :vartype power_state: str :ivar tags: Resource tags :vartype tags: dict[str, str] """ @@ -35,6 +37,7 @@ class Resource(Model): 'name': {'readonly': True}, 'type': {'readonly': True}, 'location': {'readonly': True}, + 'power_state': {'readonly': True}, 'tags': {'readonly': True}, } @@ -43,13 +46,15 @@ class Resource(Model): 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, + 'power_state': {'key': 'powerState', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, } - def __init__(self): - super(Resource, self).__init__() + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) self.id = None self.name = None self.type = None self.location = None + self.power_state = None self.tags = None diff --git a/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/resource_py3.py b/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/resource_py3.py new file mode 100644 index 000000000000..bd6de5111d90 --- /dev/null +++ b/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/resource_py3.py @@ -0,0 +1,60 @@ +# 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 + :ivar location: Resource location + :vartype location: str + :ivar power_state: Resource power state + :vartype power_state: str + :ivar tags: Resource tags + :vartype tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'power_state': {'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'}, + 'power_state': {'key': 'powerState', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = None + self.power_state = None + self.tags = None diff --git a/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/storage_profile.py b/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/storage_profile.py index 037455f5b716..d39fde22aab7 100644 --- a/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/storage_profile.py +++ b/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/storage_profile.py @@ -34,7 +34,7 @@ class StorageProfile(Model): 'os_disks': {'key': 'osDisks', 'type': '[Disk]'}, } - def __init__(self, os_disks=None): - super(StorageProfile, self).__init__() + def __init__(self, **kwargs): + super(StorageProfile, self).__init__(**kwargs) self.nfs_ip_address = None - self.os_disks = os_disks + self.os_disks = kwargs.get('os_disks', None) diff --git a/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/storage_profile_py3.py b/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/storage_profile_py3.py new file mode 100644 index 000000000000..dae247db8738 --- /dev/null +++ b/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/storage_profile_py3.py @@ -0,0 +1,40 @@ +# 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/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/operations/hana_instances_operations.py b/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/operations/hana_instances_operations.py index 90b217293975..0ee39e68ed77 100644 --- a/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/operations/hana_instances_operations.py +++ b/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/operations/hana_instances_operations.py @@ -75,7 +75,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -84,9 +84,8 @@ def internal_paging(next_link=None, raw=False): 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) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + 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) @@ -147,7 +146,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -156,9 +155,8 @@ def internal_paging(next_link=None, raw=False): 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) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + 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) @@ -213,7 +211,7 @@ def get( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -222,8 +220,8 @@ def get( 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) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + 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) diff --git a/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/operations/operations.py b/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/operations/operations.py index 3d9de7845b23..6cf82ecc3229 100644 --- a/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/operations/operations.py +++ b/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/operations/operations.py @@ -67,7 +67,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -76,9 +76,8 @@ def internal_paging(next_link=None, raw=False): 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) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + 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) diff --git a/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/version.py b/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/version.py index e7efe25ea7e0..e0ec669828cb 100644 --- a/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/version.py +++ b/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "0.1.1" +VERSION = "0.1.0" From 07144605787e87ec95fcec0ca1acc3f4dd8a083b Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Thu, 2 Aug 2018 20:50:31 +0000 Subject: [PATCH 2/3] Generated from b9bb485143557a4cd2d295adde6dcfdd74b741da moved power state under properties --- .../azure/mgmt/hanaonazure/models/hana_instance.py | 9 +++++---- .../azure/mgmt/hanaonazure/models/hana_instance_py3.py | 9 +++++---- .../azure/mgmt/hanaonazure/models/resource.py | 5 ----- .../azure/mgmt/hanaonazure/models/resource_py3.py | 5 ----- 4 files changed, 10 insertions(+), 18 deletions(-) diff --git a/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/hana_instance.py b/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/hana_instance.py index 3639d421cdf8..002e0bb162f0 100644 --- a/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/hana_instance.py +++ b/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/hana_instance.py @@ -26,8 +26,6 @@ class HanaInstance(Resource): :vartype type: str :ivar location: Resource location :vartype location: str - :ivar power_state: Resource power state - :vartype power_state: str :ivar tags: Resource tags :vartype tags: dict[str, str] :param hardware_profile: Specifies the hardware settings for the HANA @@ -44,6 +42,8 @@ class HanaInstance(Resource): :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 + :vartype power_state: str """ _validation = { @@ -51,9 +51,9 @@ class HanaInstance(Resource): 'name': {'readonly': True}, 'type': {'readonly': True}, 'location': {'readonly': True}, - 'power_state': {'readonly': True}, 'tags': {'readonly': True}, 'hana_instance_id': {'readonly': True}, + 'power_state': {'readonly': True}, } _attribute_map = { @@ -61,13 +61,13 @@ class HanaInstance(Resource): 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, - 'power_state': {'key': 'powerState', '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'}, } def __init__(self, **kwargs): @@ -77,3 +77,4 @@ def __init__(self, **kwargs): 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 diff --git a/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/hana_instance_py3.py b/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/hana_instance_py3.py index 4cffb6e3e16c..9edfbc8f4a2c 100644 --- a/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/hana_instance_py3.py +++ b/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/hana_instance_py3.py @@ -26,8 +26,6 @@ class HanaInstance(Resource): :vartype type: str :ivar location: Resource location :vartype location: str - :ivar power_state: Resource power state - :vartype power_state: str :ivar tags: Resource tags :vartype tags: dict[str, str] :param hardware_profile: Specifies the hardware settings for the HANA @@ -44,6 +42,8 @@ class HanaInstance(Resource): :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 + :vartype power_state: str """ _validation = { @@ -51,9 +51,9 @@ class HanaInstance(Resource): 'name': {'readonly': True}, 'type': {'readonly': True}, 'location': {'readonly': True}, - 'power_state': {'readonly': True}, 'tags': {'readonly': True}, 'hana_instance_id': {'readonly': True}, + 'power_state': {'readonly': True}, } _attribute_map = { @@ -61,13 +61,13 @@ class HanaInstance(Resource): 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, - 'power_state': {'key': 'powerState', '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'}, } def __init__(self, *, hardware_profile=None, storage_profile=None, os_profile=None, network_profile=None, **kwargs) -> None: @@ -77,3 +77,4 @@ def __init__(self, *, hardware_profile=None, storage_profile=None, os_profile=No self.os_profile = os_profile self.network_profile = network_profile self.hana_instance_id = None + self.power_state = None diff --git a/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/resource.py b/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/resource.py index 349cc34093bf..99b32af0d9fe 100644 --- a/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/resource.py +++ b/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/resource.py @@ -26,8 +26,6 @@ class Resource(Model): :vartype type: str :ivar location: Resource location :vartype location: str - :ivar power_state: Resource power state - :vartype power_state: str :ivar tags: Resource tags :vartype tags: dict[str, str] """ @@ -37,7 +35,6 @@ class Resource(Model): 'name': {'readonly': True}, 'type': {'readonly': True}, 'location': {'readonly': True}, - 'power_state': {'readonly': True}, 'tags': {'readonly': True}, } @@ -46,7 +43,6 @@ class Resource(Model): 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, - 'power_state': {'key': 'powerState', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, } @@ -56,5 +52,4 @@ def __init__(self, **kwargs): self.name = None self.type = None self.location = None - self.power_state = None self.tags = None diff --git a/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/resource_py3.py b/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/resource_py3.py index bd6de5111d90..0696665423e1 100644 --- a/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/resource_py3.py +++ b/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/resource_py3.py @@ -26,8 +26,6 @@ class Resource(Model): :vartype type: str :ivar location: Resource location :vartype location: str - :ivar power_state: Resource power state - :vartype power_state: str :ivar tags: Resource tags :vartype tags: dict[str, str] """ @@ -37,7 +35,6 @@ class Resource(Model): 'name': {'readonly': True}, 'type': {'readonly': True}, 'location': {'readonly': True}, - 'power_state': {'readonly': True}, 'tags': {'readonly': True}, } @@ -46,7 +43,6 @@ class Resource(Model): 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, - 'power_state': {'key': 'powerState', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, } @@ -56,5 +52,4 @@ def __init__(self, **kwargs) -> None: self.name = None self.type = None self.location = None - self.power_state = None self.tags = None From 1db5571a667a5b226665cd4d7278e50df5b0a6ff Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Thu, 2 Aug 2018 21:32:57 +0000 Subject: [PATCH 3/3] Generated from cd61ee2c6bc8da6444de839e4c5715c815031587 added power state enum --- .../azure/mgmt/hanaonazure/models/__init__.py | 2 ++ .../azure/mgmt/hanaonazure/models/hana_instance.py | 6 ++++-- .../azure/mgmt/hanaonazure/models/hana_instance_py3.py | 6 ++++-- .../hanaonazure/models/hana_management_client_enums.py | 10 ++++++++++ 4 files changed, 20 insertions(+), 4 deletions(-) diff --git a/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/__init__.py b/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/__init__.py index a8d0dd14a709..92a1fb68367c 100644 --- a/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/__init__.py +++ b/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/__init__.py @@ -38,6 +38,7 @@ from .hana_management_client_enums import ( HanaHardwareTypeNamesEnum, HanaInstanceSizeNamesEnum, + HanaInstancePowerStateEnum, ) __all__ = [ @@ -56,4 +57,5 @@ 'HanaInstancePaged', 'HanaHardwareTypeNamesEnum', 'HanaInstanceSizeNamesEnum', + 'HanaInstancePowerStateEnum', ] diff --git a/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/hana_instance.py b/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/hana_instance.py index 002e0bb162f0..c5e5d27c6bfc 100644 --- a/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/hana_instance.py +++ b/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/hana_instance.py @@ -42,8 +42,10 @@ class HanaInstance(Resource): :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 - :vartype power_state: 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 """ _validation = { diff --git a/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/hana_instance_py3.py b/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/hana_instance_py3.py index 9edfbc8f4a2c..665d12f92664 100644 --- a/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/hana_instance_py3.py +++ b/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/hana_instance_py3.py @@ -42,8 +42,10 @@ class HanaInstance(Resource): :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 - :vartype power_state: 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 """ _validation = { diff --git a/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/hana_management_client_enums.py b/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/hana_management_client_enums.py index fb8339c03073..14c2d7027d1a 100644 --- a/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/hana_management_client_enums.py +++ b/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/models/hana_management_client_enums.py @@ -37,3 +37,13 @@ class HanaInstanceSizeNamesEnum(str, Enum): s768m = "S768m" s768xm = "S768xm" s960m = "S960m" + + +class HanaInstancePowerStateEnum(str, Enum): + + starting = "starting" + started = "started" + stopping = "stopping" + stopped = "stopped" + restarting = "restarting" + unknown = "unknown"