From a8b99f41bab3e2fd286c67bac159eb5b4d9c5c3f Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Tue, 4 Dec 2018 17:38:00 +0000 Subject: [PATCH 1/2] Generated from 164da1fe5b4cdf8db0afd9f55a08ab523e1c3f0e Merge pull request #4 from leonardbf/netapp-api-update-public NFSAAS-1505 resource and property changes --- .../azure/mgmt/netapp/models/__init__.py | 3 + ...e_net_app_files_management_client_enums.py | 2 +- .../azure/mgmt/netapp/models/capacity_pool.py | 25 +-- .../mgmt/netapp/models/capacity_pool_py3.py | 23 +-- .../azure/mgmt/netapp/models/mount_target.py | 5 - .../mgmt/netapp/models/mount_target_py3.py | 5 - .../mgmt/netapp/models/net_app_account.py | 5 - .../mgmt/netapp/models/net_app_account_py3.py | 5 - .../azure/mgmt/netapp/models/snapshot.py | 10 +- .../mgmt/netapp/models/snapshot_patch.py | 28 +++ .../mgmt/netapp/models/snapshot_patch_py3.py | 28 +++ .../azure/mgmt/netapp/models/snapshot_py3.py | 10 +- .../azure/mgmt/netapp/models/volume.py | 19 +- .../azure/mgmt/netapp/models/volume_patch.py | 19 +- .../mgmt/netapp/models/volume_patch_py3.py | 17 +- .../azure/mgmt/netapp/models/volume_py3.py | 17 +- .../netapp/operations/accounts_operations.py | 14 +- .../operations/mount_targets_operations.py | 4 +- .../netapp/operations/pools_operations.py | 14 +- .../netapp/operations/snapshots_operations.py | 195 +++++++++++++++++- .../netapp/operations/volumes_operations.py | 10 +- 21 files changed, 332 insertions(+), 126 deletions(-) create mode 100644 azure-mgmt-netapp/azure/mgmt/netapp/models/snapshot_patch.py create mode 100644 azure-mgmt-netapp/azure/mgmt/netapp/models/snapshot_patch_py3.py diff --git a/azure-mgmt-netapp/azure/mgmt/netapp/models/__init__.py b/azure-mgmt-netapp/azure/mgmt/netapp/models/__init__.py index be2af98b41a5..169f7b0f0f3f 100644 --- a/azure-mgmt-netapp/azure/mgmt/netapp/models/__init__.py +++ b/azure-mgmt-netapp/azure/mgmt/netapp/models/__init__.py @@ -23,6 +23,7 @@ from .volume_patch_py3 import VolumePatch from .mount_target_py3 import MountTarget from .snapshot_py3 import Snapshot + from .snapshot_patch_py3 import SnapshotPatch from .error_py3 import Error, ErrorException except (SyntaxError, ImportError): from .operation_display import OperationDisplay @@ -38,6 +39,7 @@ from .volume_patch import VolumePatch from .mount_target import MountTarget from .snapshot import Snapshot + from .snapshot_patch import SnapshotPatch from .error import Error, ErrorException from .operation_paged import OperationPaged from .net_app_account_paged import NetAppAccountPaged @@ -63,6 +65,7 @@ 'VolumePatch', 'MountTarget', 'Snapshot', + 'SnapshotPatch', 'Error', 'ErrorException', 'OperationPaged', 'NetAppAccountPaged', diff --git a/azure-mgmt-netapp/azure/mgmt/netapp/models/azure_net_app_files_management_client_enums.py b/azure-mgmt-netapp/azure/mgmt/netapp/models/azure_net_app_files_management_client_enums.py index 7caf3b703991..70fe875ab01e 100644 --- a/azure-mgmt-netapp/azure/mgmt/netapp/models/azure_net_app_files_management_client_enums.py +++ b/azure-mgmt-netapp/azure/mgmt/netapp/models/azure_net_app_files_management_client_enums.py @@ -14,6 +14,6 @@ class ServiceLevel(str, Enum): - basic = "Basic" #: Basic service level standard = "Standard" #: Standard service level premium = "Premium" #: Premium service level + extreme = "Extreme" #: Extreme service level diff --git a/azure-mgmt-netapp/azure/mgmt/netapp/models/capacity_pool.py b/azure-mgmt-netapp/azure/mgmt/netapp/models/capacity_pool.py index 5e5b0d69f334..3dced303adca 100644 --- a/azure-mgmt-netapp/azure/mgmt/netapp/models/capacity_pool.py +++ b/azure-mgmt-netapp/azure/mgmt/netapp/models/capacity_pool.py @@ -30,17 +30,15 @@ class CapacityPool(Model): :vartype type: str :param tags: Resource tags :type tags: object - :param account_id: Required. accountId. UUID v4 used to identify the - Account - :type account_id: str :ivar pool_id: poolId. UUID v4 used to identify the Pool :vartype pool_id: str - :param size: size. Provisioned size of the pool (in GB). Default value: - 4096 . - :type size: int + :param size: size. Provisioned size of the pool (in bytes). Allowed values + are in 4TiB chunks (value must be multiply of 4398046511104). Default + value: 4398046511104 . + :type size: long :param service_level: serviceLevel. The service level of the file system. - Possible values include: 'Basic', 'Standard', 'Premium'. Default value: - "Standard" . + Possible values include: 'Standard', 'Premium', 'Extreme'. Default value: + "Premium" . :type service_level: str or ~azure.mgmt.netapp.models.ServiceLevel :ivar provisioning_state: Azure lifecycle management :vartype provisioning_state: str @@ -51,9 +49,8 @@ class CapacityPool(Model): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'account_id': {'required': True, 'max_length': 36, 'min_length': 36, 'pattern': r'^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$'}, 'pool_id': {'readonly': True, 'max_length': 36, 'min_length': 36, 'pattern': r'^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$'}, - 'size': {'minimum': 4096}, + 'size': {'maximum': 549755813888000, 'minimum': 4398046511104}, 'provisioning_state': {'readonly': True}, } @@ -63,9 +60,8 @@ class CapacityPool(Model): 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'tags': {'key': 'tags', 'type': 'object'}, - 'account_id': {'key': 'properties.accountId', 'type': 'str'}, 'pool_id': {'key': 'properties.poolId', 'type': 'str'}, - 'size': {'key': 'properties.size', 'type': 'int'}, + 'size': {'key': 'properties.size', 'type': 'long'}, 'service_level': {'key': 'properties.serviceLevel', 'type': 'str'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, } @@ -77,8 +73,7 @@ def __init__(self, **kwargs): self.name = None self.type = None self.tags = kwargs.get('tags', None) - self.account_id = kwargs.get('account_id', None) self.pool_id = None - self.size = kwargs.get('size', 4096) - self.service_level = kwargs.get('service_level', "Standard") + self.size = kwargs.get('size', 4398046511104) + self.service_level = kwargs.get('service_level', "Premium") self.provisioning_state = None diff --git a/azure-mgmt-netapp/azure/mgmt/netapp/models/capacity_pool_py3.py b/azure-mgmt-netapp/azure/mgmt/netapp/models/capacity_pool_py3.py index f40cb61a08d0..c2ad853f9f16 100644 --- a/azure-mgmt-netapp/azure/mgmt/netapp/models/capacity_pool_py3.py +++ b/azure-mgmt-netapp/azure/mgmt/netapp/models/capacity_pool_py3.py @@ -30,17 +30,15 @@ class CapacityPool(Model): :vartype type: str :param tags: Resource tags :type tags: object - :param account_id: Required. accountId. UUID v4 used to identify the - Account - :type account_id: str :ivar pool_id: poolId. UUID v4 used to identify the Pool :vartype pool_id: str - :param size: size. Provisioned size of the pool (in GB). Default value: - 4096 . - :type size: int + :param size: size. Provisioned size of the pool (in bytes). Allowed values + are in 4TiB chunks (value must be multiply of 4398046511104). Default + value: 4398046511104 . + :type size: long :param service_level: serviceLevel. The service level of the file system. - Possible values include: 'Basic', 'Standard', 'Premium'. Default value: - "Standard" . + Possible values include: 'Standard', 'Premium', 'Extreme'. Default value: + "Premium" . :type service_level: str or ~azure.mgmt.netapp.models.ServiceLevel :ivar provisioning_state: Azure lifecycle management :vartype provisioning_state: str @@ -51,9 +49,8 @@ class CapacityPool(Model): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'account_id': {'required': True, 'max_length': 36, 'min_length': 36, 'pattern': r'^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$'}, 'pool_id': {'readonly': True, 'max_length': 36, 'min_length': 36, 'pattern': r'^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$'}, - 'size': {'minimum': 4096}, + 'size': {'maximum': 549755813888000, 'minimum': 4398046511104}, 'provisioning_state': {'readonly': True}, } @@ -63,21 +60,19 @@ class CapacityPool(Model): 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'tags': {'key': 'tags', 'type': 'object'}, - 'account_id': {'key': 'properties.accountId', 'type': 'str'}, 'pool_id': {'key': 'properties.poolId', 'type': 'str'}, - 'size': {'key': 'properties.size', 'type': 'int'}, + 'size': {'key': 'properties.size', 'type': 'long'}, 'service_level': {'key': 'properties.serviceLevel', 'type': 'str'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, } - def __init__(self, *, location: str, account_id: str, tags=None, size: int=4096, service_level="Standard", **kwargs) -> None: + def __init__(self, *, location: str, tags=None, size: int=4398046511104, service_level="Premium", **kwargs) -> None: super(CapacityPool, self).__init__(**kwargs) self.location = location self.id = None self.name = None self.type = None self.tags = tags - self.account_id = account_id self.pool_id = None self.size = size self.service_level = service_level diff --git a/azure-mgmt-netapp/azure/mgmt/netapp/models/mount_target.py b/azure-mgmt-netapp/azure/mgmt/netapp/models/mount_target.py index 0434cf874c83..e118f00da392 100644 --- a/azure-mgmt-netapp/azure/mgmt/netapp/models/mount_target.py +++ b/azure-mgmt-netapp/azure/mgmt/netapp/models/mount_target.py @@ -36,8 +36,6 @@ class MountTarget(Model): :type file_system_id: str :ivar ip_address: ipAddress. The mount target's IPv4 address :vartype ip_address: str - :ivar name1: name. The name of the mount target - :vartype name1: str :param vlan_id: vlanid. Vlan Id :type vlan_id: int :param start_ip: startIp. The start of IPv4 address range to use when @@ -63,7 +61,6 @@ class MountTarget(Model): 'mount_target_id': {'readonly': True, 'max_length': 36, 'min_length': 36, 'pattern': r'^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$'}, 'file_system_id': {'required': True, 'max_length': 36, 'min_length': 36, 'pattern': r'^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$'}, 'ip_address': {'readonly': True}, - 'name1': {'readonly': True}, 'provisioning_state': {'readonly': True}, } @@ -75,7 +72,6 @@ class MountTarget(Model): 'mount_target_id': {'key': 'properties.mountTargetId', 'type': 'str'}, 'file_system_id': {'key': 'properties.fileSystemId', 'type': 'str'}, 'ip_address': {'key': 'properties.ipAddress', 'type': 'str'}, - 'name1': {'key': 'properties.name', 'type': 'str'}, 'vlan_id': {'key': 'properties.vlanId', 'type': 'int'}, 'start_ip': {'key': 'properties.startIp', 'type': 'str'}, 'end_ip': {'key': 'properties.endIp', 'type': 'str'}, @@ -93,7 +89,6 @@ def __init__(self, **kwargs): self.mount_target_id = None self.file_system_id = kwargs.get('file_system_id', None) self.ip_address = None - self.name1 = None self.vlan_id = kwargs.get('vlan_id', None) self.start_ip = kwargs.get('start_ip', None) self.end_ip = kwargs.get('end_ip', None) diff --git a/azure-mgmt-netapp/azure/mgmt/netapp/models/mount_target_py3.py b/azure-mgmt-netapp/azure/mgmt/netapp/models/mount_target_py3.py index cb17cb63d9c6..b4191609e626 100644 --- a/azure-mgmt-netapp/azure/mgmt/netapp/models/mount_target_py3.py +++ b/azure-mgmt-netapp/azure/mgmt/netapp/models/mount_target_py3.py @@ -36,8 +36,6 @@ class MountTarget(Model): :type file_system_id: str :ivar ip_address: ipAddress. The mount target's IPv4 address :vartype ip_address: str - :ivar name1: name. The name of the mount target - :vartype name1: str :param vlan_id: vlanid. Vlan Id :type vlan_id: int :param start_ip: startIp. The start of IPv4 address range to use when @@ -63,7 +61,6 @@ class MountTarget(Model): 'mount_target_id': {'readonly': True, 'max_length': 36, 'min_length': 36, 'pattern': r'^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$'}, 'file_system_id': {'required': True, 'max_length': 36, 'min_length': 36, 'pattern': r'^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$'}, 'ip_address': {'readonly': True}, - 'name1': {'readonly': True}, 'provisioning_state': {'readonly': True}, } @@ -75,7 +72,6 @@ class MountTarget(Model): 'mount_target_id': {'key': 'properties.mountTargetId', 'type': 'str'}, 'file_system_id': {'key': 'properties.fileSystemId', 'type': 'str'}, 'ip_address': {'key': 'properties.ipAddress', 'type': 'str'}, - 'name1': {'key': 'properties.name', 'type': 'str'}, 'vlan_id': {'key': 'properties.vlanId', 'type': 'int'}, 'start_ip': {'key': 'properties.startIp', 'type': 'str'}, 'end_ip': {'key': 'properties.endIp', 'type': 'str'}, @@ -93,7 +89,6 @@ def __init__(self, *, location: str, file_system_id: str, tags=None, vlan_id: in self.mount_target_id = None self.file_system_id = file_system_id self.ip_address = None - self.name1 = None self.vlan_id = vlan_id self.start_ip = start_ip self.end_ip = end_ip diff --git a/azure-mgmt-netapp/azure/mgmt/netapp/models/net_app_account.py b/azure-mgmt-netapp/azure/mgmt/netapp/models/net_app_account.py index 00502b42fd93..3ec70dc97f92 100644 --- a/azure-mgmt-netapp/azure/mgmt/netapp/models/net_app_account.py +++ b/azure-mgmt-netapp/azure/mgmt/netapp/models/net_app_account.py @@ -30,8 +30,6 @@ class NetAppAccount(Model): :vartype type: str :param tags: Resource tags :type tags: object - :ivar account_id: accountId. UUID v4 used to identify the Account - :vartype account_id: str :ivar provisioning_state: Azure lifecycle management :vartype provisioning_state: str """ @@ -41,7 +39,6 @@ class NetAppAccount(Model): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'account_id': {'readonly': True, 'max_length': 36, 'min_length': 36, 'pattern': r'^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$'}, 'provisioning_state': {'readonly': True}, } @@ -51,7 +48,6 @@ class NetAppAccount(Model): 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'tags': {'key': 'tags', 'type': 'object'}, - 'account_id': {'key': 'properties.accountId', 'type': 'str'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, } @@ -62,5 +58,4 @@ def __init__(self, **kwargs): self.name = None self.type = None self.tags = kwargs.get('tags', None) - self.account_id = None self.provisioning_state = None diff --git a/azure-mgmt-netapp/azure/mgmt/netapp/models/net_app_account_py3.py b/azure-mgmt-netapp/azure/mgmt/netapp/models/net_app_account_py3.py index 94a66341a19f..a2d9c5c845a0 100644 --- a/azure-mgmt-netapp/azure/mgmt/netapp/models/net_app_account_py3.py +++ b/azure-mgmt-netapp/azure/mgmt/netapp/models/net_app_account_py3.py @@ -30,8 +30,6 @@ class NetAppAccount(Model): :vartype type: str :param tags: Resource tags :type tags: object - :ivar account_id: accountId. UUID v4 used to identify the Account - :vartype account_id: str :ivar provisioning_state: Azure lifecycle management :vartype provisioning_state: str """ @@ -41,7 +39,6 @@ class NetAppAccount(Model): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'account_id': {'readonly': True, 'max_length': 36, 'min_length': 36, 'pattern': r'^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$'}, 'provisioning_state': {'readonly': True}, } @@ -51,7 +48,6 @@ class NetAppAccount(Model): 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'tags': {'key': 'tags', 'type': 'object'}, - 'account_id': {'key': 'properties.accountId', 'type': 'str'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, } @@ -62,5 +58,4 @@ def __init__(self, *, location: str, tags=None, **kwargs) -> None: self.name = None self.type = None self.tags = tags - self.account_id = None self.provisioning_state = None diff --git a/azure-mgmt-netapp/azure/mgmt/netapp/models/snapshot.py b/azure-mgmt-netapp/azure/mgmt/netapp/models/snapshot.py index 13f58b4786a6..cb9b70ef4d1a 100644 --- a/azure-mgmt-netapp/azure/mgmt/netapp/models/snapshot.py +++ b/azure-mgmt-netapp/azure/mgmt/netapp/models/snapshot.py @@ -26,6 +26,8 @@ class Snapshot(Model): :vartype id: str :ivar name: Resource name :vartype name: str + :ivar type: Resource type + :vartype type: str :param tags: Resource tags :type tags: object :ivar snapshot_id: snapshotId. UUID v4 used to identify the Snapshot @@ -33,8 +35,6 @@ class Snapshot(Model): :param file_system_id: Required. fileSystemId. UUID v4 used to identify the FileSystem :type file_system_id: str - :ivar name1: name. The name of the snapshot - :vartype name1: str :ivar creation_date: name. The creation date of the snapshot :vartype creation_date: datetime :ivar provisioning_state: Azure lifecycle management @@ -45,9 +45,9 @@ class Snapshot(Model): 'location': {'required': True}, 'id': {'readonly': True}, 'name': {'readonly': True}, + 'type': {'readonly': True}, 'snapshot_id': {'readonly': True, 'max_length': 36, 'min_length': 36, 'pattern': r'^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$'}, 'file_system_id': {'required': True, 'max_length': 36, 'min_length': 36, 'pattern': r'^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$'}, - 'name1': {'readonly': True}, 'creation_date': {'readonly': True}, 'provisioning_state': {'readonly': True}, } @@ -56,10 +56,10 @@ class Snapshot(Model): 'location': {'key': 'location', 'type': 'str'}, 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, 'tags': {'key': 'tags', 'type': 'object'}, 'snapshot_id': {'key': 'properties.snapshotId', 'type': 'str'}, 'file_system_id': {'key': 'properties.fileSystemId', 'type': 'str'}, - 'name1': {'key': 'properties.name', 'type': 'str'}, 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, } @@ -69,9 +69,9 @@ def __init__(self, **kwargs): self.location = kwargs.get('location', None) self.id = None self.name = None + self.type = None self.tags = kwargs.get('tags', None) self.snapshot_id = None self.file_system_id = kwargs.get('file_system_id', None) - self.name1 = None self.creation_date = None self.provisioning_state = None diff --git a/azure-mgmt-netapp/azure/mgmt/netapp/models/snapshot_patch.py b/azure-mgmt-netapp/azure/mgmt/netapp/models/snapshot_patch.py new file mode 100644 index 000000000000..9ccd3602fab8 --- /dev/null +++ b/azure-mgmt-netapp/azure/mgmt/netapp/models/snapshot_patch.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SnapshotPatch(Model): + """Snapshot patch. + + :param tags: Resource tags + :type tags: object + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(SnapshotPatch, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) diff --git a/azure-mgmt-netapp/azure/mgmt/netapp/models/snapshot_patch_py3.py b/azure-mgmt-netapp/azure/mgmt/netapp/models/snapshot_patch_py3.py new file mode 100644 index 000000000000..61ba55fecf81 --- /dev/null +++ b/azure-mgmt-netapp/azure/mgmt/netapp/models/snapshot_patch_py3.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SnapshotPatch(Model): + """Snapshot patch. + + :param tags: Resource tags + :type tags: object + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': 'object'}, + } + + def __init__(self, *, tags=None, **kwargs) -> None: + super(SnapshotPatch, self).__init__(**kwargs) + self.tags = tags diff --git a/azure-mgmt-netapp/azure/mgmt/netapp/models/snapshot_py3.py b/azure-mgmt-netapp/azure/mgmt/netapp/models/snapshot_py3.py index 0e173d72628f..ac94c966980f 100644 --- a/azure-mgmt-netapp/azure/mgmt/netapp/models/snapshot_py3.py +++ b/azure-mgmt-netapp/azure/mgmt/netapp/models/snapshot_py3.py @@ -26,6 +26,8 @@ class Snapshot(Model): :vartype id: str :ivar name: Resource name :vartype name: str + :ivar type: Resource type + :vartype type: str :param tags: Resource tags :type tags: object :ivar snapshot_id: snapshotId. UUID v4 used to identify the Snapshot @@ -33,8 +35,6 @@ class Snapshot(Model): :param file_system_id: Required. fileSystemId. UUID v4 used to identify the FileSystem :type file_system_id: str - :ivar name1: name. The name of the snapshot - :vartype name1: str :ivar creation_date: name. The creation date of the snapshot :vartype creation_date: datetime :ivar provisioning_state: Azure lifecycle management @@ -45,9 +45,9 @@ class Snapshot(Model): 'location': {'required': True}, 'id': {'readonly': True}, 'name': {'readonly': True}, + 'type': {'readonly': True}, 'snapshot_id': {'readonly': True, 'max_length': 36, 'min_length': 36, 'pattern': r'^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$'}, 'file_system_id': {'required': True, 'max_length': 36, 'min_length': 36, 'pattern': r'^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$'}, - 'name1': {'readonly': True}, 'creation_date': {'readonly': True}, 'provisioning_state': {'readonly': True}, } @@ -56,10 +56,10 @@ class Snapshot(Model): 'location': {'key': 'location', 'type': 'str'}, 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, 'tags': {'key': 'tags', 'type': 'object'}, 'snapshot_id': {'key': 'properties.snapshotId', 'type': 'str'}, 'file_system_id': {'key': 'properties.fileSystemId', 'type': 'str'}, - 'name1': {'key': 'properties.name', 'type': 'str'}, 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, } @@ -69,9 +69,9 @@ def __init__(self, *, location: str, file_system_id: str, tags=None, **kwargs) - self.location = location self.id = None self.name = None + self.type = None self.tags = tags self.snapshot_id = None self.file_system_id = file_system_id - self.name1 = None self.creation_date = None self.provisioning_state = None diff --git a/azure-mgmt-netapp/azure/mgmt/netapp/models/volume.py b/azure-mgmt-netapp/azure/mgmt/netapp/models/volume.py index 0326cf38a2f2..2daa2c273f06 100644 --- a/azure-mgmt-netapp/azure/mgmt/netapp/models/volume.py +++ b/azure-mgmt-netapp/azure/mgmt/netapp/models/volume.py @@ -32,18 +32,17 @@ class Volume(Model): :type tags: object :ivar file_system_id: FileSystem ID. Unique FileSystem Identifier. :vartype file_system_id: str - :param name1: FileSystem name. FileSystem name - :type name1: str :param creation_token: Required. Creation Token or File Path. A unique file path for the volume. Used when creating mount targets :type creation_token: str :param service_level: Required. serviceLevel. The service level of the - file system. Possible values include: 'Basic', 'Standard', 'Premium'. - Default value: "Standard" . + file system. Possible values include: 'Standard', 'Premium', 'Extreme'. + Default value: "Premium" . :type service_level: str or ~azure.mgmt.netapp.models.ServiceLevel :param usage_threshold: usageThreshold. Maximum storage quota allowed for - a file system in bytes. This is a soft quota used for alerting only. Upper - limit is 100TB. Default value: 0 . + a file system in bytes. This is a soft quota used for alerting only. + Minimum size is 100 GiB. Upper limit is 100TiB. Default value: + 107374182400 . :type usage_threshold: long :ivar provisioning_state: Azure lifecycle management :vartype provisioning_state: str @@ -60,7 +59,7 @@ class Volume(Model): 'file_system_id': {'readonly': True, 'max_length': 36, 'min_length': 36, 'pattern': r'^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$'}, 'creation_token': {'required': True}, 'service_level': {'required': True}, - 'usage_threshold': {'maximum': 109951162777600, 'minimum': 0}, + 'usage_threshold': {'maximum': 109951162777600, 'minimum': 107374182400}, 'provisioning_state': {'readonly': True}, } @@ -71,7 +70,6 @@ class Volume(Model): 'type': {'key': 'type', 'type': 'str'}, 'tags': {'key': 'tags', 'type': 'object'}, 'file_system_id': {'key': 'properties.fileSystemId', 'type': 'str'}, - 'name1': {'key': 'properties.name', 'type': 'str'}, 'creation_token': {'key': 'properties.creationToken', 'type': 'str'}, 'service_level': {'key': 'properties.serviceLevel', 'type': 'str'}, 'usage_threshold': {'key': 'properties.usageThreshold', 'type': 'long'}, @@ -87,9 +85,8 @@ def __init__(self, **kwargs): self.type = None self.tags = kwargs.get('tags', None) self.file_system_id = None - self.name1 = kwargs.get('name1', None) self.creation_token = kwargs.get('creation_token', None) - self.service_level = kwargs.get('service_level', "Standard") - self.usage_threshold = kwargs.get('usage_threshold', 0) + self.service_level = kwargs.get('service_level', "Premium") + self.usage_threshold = kwargs.get('usage_threshold', 107374182400) self.provisioning_state = None self.subnet_id = kwargs.get('subnet_id', None) diff --git a/azure-mgmt-netapp/azure/mgmt/netapp/models/volume_patch.py b/azure-mgmt-netapp/azure/mgmt/netapp/models/volume_patch.py index 4b1f753cf88f..a3b5a30bc492 100644 --- a/azure-mgmt-netapp/azure/mgmt/netapp/models/volume_patch.py +++ b/azure-mgmt-netapp/azure/mgmt/netapp/models/volume_patch.py @@ -28,15 +28,14 @@ class VolumePatch(Model): :vartype type: str :param tags: Resource tags :type tags: object - :param name1: FileSystem name. FileSystem name - :type name1: str :param service_level: serviceLevel. The service level of the file system. - Possible values include: 'Basic', 'Standard', 'Premium'. Default value: - "Standard" . + Possible values include: 'Standard', 'Premium', 'Extreme'. Default value: + "Premium" . :type service_level: str or ~azure.mgmt.netapp.models.ServiceLevel :param usage_threshold: usageThreshold. Maximum storage quota allowed for - a file system in bytes. This is a soft quota used for alerting only. Upper - limit is 100TB. Default value: 0 . + a file system in bytes. This is a soft quota used for alerting only. + Minimum size is 100 GiB. Upper limit is 100TiB. Default value: + 107374182400 . :type usage_threshold: long """ @@ -44,7 +43,7 @@ class VolumePatch(Model): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'usage_threshold': {'maximum': 109951162777600, 'minimum': 0}, + 'usage_threshold': {'maximum': 109951162777600, 'minimum': 107374182400}, } _attribute_map = { @@ -53,7 +52,6 @@ class VolumePatch(Model): 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'tags': {'key': 'tags', 'type': 'object'}, - 'name1': {'key': 'properties.name', 'type': 'str'}, 'service_level': {'key': 'properties.serviceLevel', 'type': 'str'}, 'usage_threshold': {'key': 'properties.usageThreshold', 'type': 'long'}, } @@ -65,6 +63,5 @@ def __init__(self, **kwargs): self.name = None self.type = None self.tags = kwargs.get('tags', None) - self.name1 = kwargs.get('name1', None) - self.service_level = kwargs.get('service_level', "Standard") - self.usage_threshold = kwargs.get('usage_threshold', 0) + self.service_level = kwargs.get('service_level', "Premium") + self.usage_threshold = kwargs.get('usage_threshold', 107374182400) diff --git a/azure-mgmt-netapp/azure/mgmt/netapp/models/volume_patch_py3.py b/azure-mgmt-netapp/azure/mgmt/netapp/models/volume_patch_py3.py index b23fc94ecf43..7d1490e1ef01 100644 --- a/azure-mgmt-netapp/azure/mgmt/netapp/models/volume_patch_py3.py +++ b/azure-mgmt-netapp/azure/mgmt/netapp/models/volume_patch_py3.py @@ -28,15 +28,14 @@ class VolumePatch(Model): :vartype type: str :param tags: Resource tags :type tags: object - :param name1: FileSystem name. FileSystem name - :type name1: str :param service_level: serviceLevel. The service level of the file system. - Possible values include: 'Basic', 'Standard', 'Premium'. Default value: - "Standard" . + Possible values include: 'Standard', 'Premium', 'Extreme'. Default value: + "Premium" . :type service_level: str or ~azure.mgmt.netapp.models.ServiceLevel :param usage_threshold: usageThreshold. Maximum storage quota allowed for - a file system in bytes. This is a soft quota used for alerting only. Upper - limit is 100TB. Default value: 0 . + a file system in bytes. This is a soft quota used for alerting only. + Minimum size is 100 GiB. Upper limit is 100TiB. Default value: + 107374182400 . :type usage_threshold: long """ @@ -44,7 +43,7 @@ class VolumePatch(Model): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'usage_threshold': {'maximum': 109951162777600, 'minimum': 0}, + 'usage_threshold': {'maximum': 109951162777600, 'minimum': 107374182400}, } _attribute_map = { @@ -53,18 +52,16 @@ class VolumePatch(Model): 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'tags': {'key': 'tags', 'type': 'object'}, - 'name1': {'key': 'properties.name', 'type': 'str'}, 'service_level': {'key': 'properties.serviceLevel', 'type': 'str'}, 'usage_threshold': {'key': 'properties.usageThreshold', 'type': 'long'}, } - def __init__(self, *, location: str=None, tags=None, name1: str=None, service_level="Standard", usage_threshold: int=0, **kwargs) -> None: + def __init__(self, *, location: str=None, tags=None, service_level="Premium", usage_threshold: int=107374182400, **kwargs) -> None: super(VolumePatch, self).__init__(**kwargs) self.location = location self.id = None self.name = None self.type = None self.tags = tags - self.name1 = name1 self.service_level = service_level self.usage_threshold = usage_threshold diff --git a/azure-mgmt-netapp/azure/mgmt/netapp/models/volume_py3.py b/azure-mgmt-netapp/azure/mgmt/netapp/models/volume_py3.py index 6e629373d946..4a282416271f 100644 --- a/azure-mgmt-netapp/azure/mgmt/netapp/models/volume_py3.py +++ b/azure-mgmt-netapp/azure/mgmt/netapp/models/volume_py3.py @@ -32,18 +32,17 @@ class Volume(Model): :type tags: object :ivar file_system_id: FileSystem ID. Unique FileSystem Identifier. :vartype file_system_id: str - :param name1: FileSystem name. FileSystem name - :type name1: str :param creation_token: Required. Creation Token or File Path. A unique file path for the volume. Used when creating mount targets :type creation_token: str :param service_level: Required. serviceLevel. The service level of the - file system. Possible values include: 'Basic', 'Standard', 'Premium'. - Default value: "Standard" . + file system. Possible values include: 'Standard', 'Premium', 'Extreme'. + Default value: "Premium" . :type service_level: str or ~azure.mgmt.netapp.models.ServiceLevel :param usage_threshold: usageThreshold. Maximum storage quota allowed for - a file system in bytes. This is a soft quota used for alerting only. Upper - limit is 100TB. Default value: 0 . + a file system in bytes. This is a soft quota used for alerting only. + Minimum size is 100 GiB. Upper limit is 100TiB. Default value: + 107374182400 . :type usage_threshold: long :ivar provisioning_state: Azure lifecycle management :vartype provisioning_state: str @@ -60,7 +59,7 @@ class Volume(Model): 'file_system_id': {'readonly': True, 'max_length': 36, 'min_length': 36, 'pattern': r'^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$'}, 'creation_token': {'required': True}, 'service_level': {'required': True}, - 'usage_threshold': {'maximum': 109951162777600, 'minimum': 0}, + 'usage_threshold': {'maximum': 109951162777600, 'minimum': 107374182400}, 'provisioning_state': {'readonly': True}, } @@ -71,7 +70,6 @@ class Volume(Model): 'type': {'key': 'type', 'type': 'str'}, 'tags': {'key': 'tags', 'type': 'object'}, 'file_system_id': {'key': 'properties.fileSystemId', 'type': 'str'}, - 'name1': {'key': 'properties.name', 'type': 'str'}, 'creation_token': {'key': 'properties.creationToken', 'type': 'str'}, 'service_level': {'key': 'properties.serviceLevel', 'type': 'str'}, 'usage_threshold': {'key': 'properties.usageThreshold', 'type': 'long'}, @@ -79,7 +77,7 @@ class Volume(Model): 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, } - def __init__(self, *, location: str, creation_token: str, tags=None, name1: str=None, service_level="Standard", usage_threshold: int=0, subnet_id: str=None, **kwargs) -> None: + def __init__(self, *, location: str, creation_token: str, tags=None, service_level="Premium", usage_threshold: int=107374182400, subnet_id: str=None, **kwargs) -> None: super(Volume, self).__init__(**kwargs) self.location = location self.id = None @@ -87,7 +85,6 @@ def __init__(self, *, location: str, creation_token: str, tags=None, name1: str= self.type = None self.tags = tags self.file_system_id = None - self.name1 = name1 self.creation_token = creation_token self.service_level = service_level self.usage_threshold = usage_threshold diff --git a/azure-mgmt-netapp/azure/mgmt/netapp/operations/accounts_operations.py b/azure-mgmt-netapp/azure/mgmt/netapp/operations/accounts_operations.py index 0e1dfd2f3376..19addfef5dfe 100644 --- a/azure-mgmt-netapp/azure/mgmt/netapp/operations/accounts_operations.py +++ b/azure-mgmt-netapp/azure/mgmt/netapp/operations/accounts_operations.py @@ -102,7 +102,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroup/{resourceGroup}/providers/Microsoft.NetApp/netAppAccounts'} + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.NetApp/netAppAccounts'} def get( self, resource_group, account_name, custom_headers=None, raw=False, **operation_config): @@ -163,7 +163,7 @@ def get( return client_raw_response return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroup/{resourceGroup}/providers/Microsoft.NetApp/netAppAccounts/{accountName}'} + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.NetApp/netAppAccounts/{accountName}'} def _create_or_update_initial( @@ -201,12 +201,12 @@ def _create_or_update_initial( 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, 202]: + if response.status_code not in [201, 202]: raise models.ErrorException(self._deserialize, response) deserialized = None - if response.status_code == 200: + if response.status_code == 201: deserialized = self._deserialize('NetAppAccount', response) if raw: @@ -267,7 +267,7 @@ def get_long_running_output(response): elif polling is False: polling_method = NoPolling() else: polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroup/{resourceGroup}/providers/Microsoft.NetApp/netAppAccounts/{accountName}'} + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.NetApp/netAppAccounts/{accountName}'} def _delete_initial( @@ -345,7 +345,7 @@ def get_long_running_output(response): 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}/resourceGroup/{resourceGroup}/providers/Microsoft.NetApp/netAppAccounts/{accountName}'} + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.NetApp/netAppAccounts/{accountName}'} def update( self, resource_group, account_name, tags=None, custom_headers=None, raw=False, **operation_config): @@ -414,4 +414,4 @@ def update( return client_raw_response return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroup/{resourceGroup}/providers/Microsoft.NetApp/netAppAccounts/{accountName}'} + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.NetApp/netAppAccounts/{accountName}'} diff --git a/azure-mgmt-netapp/azure/mgmt/netapp/operations/mount_targets_operations.py b/azure-mgmt-netapp/azure/mgmt/netapp/operations/mount_targets_operations.py index fb1950a35bc2..dd751b4718b7 100644 --- a/azure-mgmt-netapp/azure/mgmt/netapp/operations/mount_targets_operations.py +++ b/azure-mgmt-netapp/azure/mgmt/netapp/operations/mount_targets_operations.py @@ -109,7 +109,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/pools/{poolName}/volumes/{volumeName}/mountTargets'} + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/mountTargets'} def get( self, resource_group, account_name, pool_name, volume_name, mount_target_name, custom_headers=None, raw=False, **operation_config): @@ -179,4 +179,4 @@ def get( return client_raw_response return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/pools/{poolName}/volumes/{volumeName}/mountTargets/{mountTargetName}'} + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/mountTargets/{mountTargetName}'} diff --git a/azure-mgmt-netapp/azure/mgmt/netapp/operations/pools_operations.py b/azure-mgmt-netapp/azure/mgmt/netapp/operations/pools_operations.py index 431be201a4be..a3d8b3f8556f 100644 --- a/azure-mgmt-netapp/azure/mgmt/netapp/operations/pools_operations.py +++ b/azure-mgmt-netapp/azure/mgmt/netapp/operations/pools_operations.py @@ -105,7 +105,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroup/{resourceGroup}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/pools'} + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools'} def get( self, resource_group, account_name, pool_name, custom_headers=None, raw=False, **operation_config): @@ -169,7 +169,7 @@ def get( return client_raw_response return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroup/{resourceGroup}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/pools/{poolName}'} + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}'} def _create_or_update_initial( @@ -206,12 +206,12 @@ def _create_or_update_initial( 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, 202]: + if response.status_code not in [201, 202]: raise models.ErrorException(self._deserialize, response) deserialized = None - if response.status_code == 200: + if response.status_code == 201: deserialized = self._deserialize('CapacityPool', response) if raw: @@ -273,7 +273,7 @@ def get_long_running_output(response): elif polling is False: polling_method = NoPolling() else: polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroup/{resourceGroup}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/pools/{poolName}'} + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}'} def update( self, resource_group, account_name, pool_name, tags=None, custom_headers=None, raw=False, **operation_config): @@ -345,7 +345,7 @@ def update( return client_raw_response return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroup/{resourceGroup}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/pools/{poolName}'} + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}'} def _delete_initial( @@ -427,4 +427,4 @@ def get_long_running_output(response): 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}/resourceGroup/{resourceGroup}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/pools/{poolName}'} + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}'} diff --git a/azure-mgmt-netapp/azure/mgmt/netapp/operations/snapshots_operations.py b/azure-mgmt-netapp/azure/mgmt/netapp/operations/snapshots_operations.py index 41b6dfea9e52..703c6c82f7e1 100644 --- a/azure-mgmt-netapp/azure/mgmt/netapp/operations/snapshots_operations.py +++ b/azure-mgmt-netapp/azure/mgmt/netapp/operations/snapshots_operations.py @@ -111,7 +111,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/pools/{poolName}/volumes/{volumeName}/snapshots'} + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/snapshots'} def get( self, resource_group, account_name, pool_name, volume_name, snapshot_name, custom_headers=None, raw=False, **operation_config): @@ -181,7 +181,196 @@ def get( return client_raw_response return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/pools/{poolName}/volumes/{volumeName}/snapshots/{snapshotName}'} + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/snapshots/{snapshotName}'} + + + def _create_initial( + self, body, resource_group, account_name, pool_name, volume_name, snapshot_name, 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'), + 'resourceGroup': self._serialize.url("resource_group", resource_group, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'poolName': self._serialize.url("pool_name", pool_name, 'str'), + 'volumeName': self._serialize.url("volume_name", volume_name, 'str'), + 'snapshotName': self._serialize.url("snapshot_name", snapshot_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(body, 'Snapshot') + + # 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, 202]: + raise models.ErrorException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Snapshot', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create( + self, body, resource_group, account_name, pool_name, volume_name, snapshot_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Create a snapshot. + + :param body: Snapshot object supplied in the body of the operation. + :type body: ~azure.mgmt.netapp.models.Snapshot + :param resource_group: The name of the resource group. + :type resource_group: str + :param account_name: The name of the NetApp account + :type account_name: str + :param pool_name: The name of the capacity pool + :type pool_name: str + :param volume_name: The name of the volume + :type volume_name: str + :param snapshot_name: The name of the mount target + :type snapshot_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 Snapshot or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.netapp.models.Snapshot] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.netapp.models.Snapshot]] + :raises: + :class:`ErrorException` + """ + raw_result = self._create_initial( + body=body, + resource_group=resource_group, + account_name=account_name, + pool_name=pool_name, + volume_name=volume_name, + snapshot_name=snapshot_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('Snapshot', 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/{resourceGroup}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/snapshots/{snapshotName}'} + + def update( + self, resource_group, account_name, pool_name, volume_name, snapshot_name, tags=None, custom_headers=None, raw=False, **operation_config): + """Patch a snapshot. + + :param resource_group: The name of the resource group. + :type resource_group: str + :param account_name: The name of the NetApp account + :type account_name: str + :param pool_name: The name of the capacity pool + :type pool_name: str + :param volume_name: The name of the volume + :type volume_name: str + :param snapshot_name: The name of the mount target + :type snapshot_name: str + :param tags: Resource tags + :type tags: object + :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: Snapshot or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.netapp.models.Snapshot or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorException` + """ + body = models.SnapshotPatch(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'), + 'resourceGroup': self._serialize.url("resource_group", resource_group, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'poolName': self._serialize.url("pool_name", pool_name, 'str'), + 'volumeName': self._serialize.url("volume_name", volume_name, 'str'), + 'snapshotName': self._serialize.url("snapshot_name", snapshot_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(body, 'SnapshotPatch') + + # 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.ErrorException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Snapshot', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/snapshots/{snapshotName}'} def _delete_initial( @@ -271,4 +460,4 @@ def get_long_running_output(response): 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/{resourceGroup}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/pools/{poolName}/volumes/{volumeName}/snapshots/{snapshotName}'} + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/snapshots/{snapshotName}'} diff --git a/azure-mgmt-netapp/azure/mgmt/netapp/operations/volumes_operations.py b/azure-mgmt-netapp/azure/mgmt/netapp/operations/volumes_operations.py index 38db59f3cd2b..2ff383e26f84 100644 --- a/azure-mgmt-netapp/azure/mgmt/netapp/operations/volumes_operations.py +++ b/azure-mgmt-netapp/azure/mgmt/netapp/operations/volumes_operations.py @@ -108,7 +108,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/pools/{poolName}/volumes'} + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes'} def get( self, resource_group, account_name, pool_name, volume_name, custom_headers=None, raw=False, **operation_config): @@ -175,7 +175,7 @@ def get( return client_raw_response return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/pools/{poolName}/volumes/{volumeName}'} + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}'} def _create_or_update_initial( @@ -282,7 +282,7 @@ def get_long_running_output(response): elif polling is False: polling_method = NoPolling() else: polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/pools/{poolName}/volumes/{volumeName}'} + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}'} def update( self, body, resource_group, account_name, pool_name, volume_name, custom_headers=None, raw=False, **operation_config): @@ -355,7 +355,7 @@ def update( return client_raw_response return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/pools/{poolName}/volumes/{volumeName}'} + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}'} def _delete_initial( @@ -441,4 +441,4 @@ def get_long_running_output(response): 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/{resourceGroup}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/pools/{poolName}/volumes/{volumeName}'} + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}'} From e62a9479eeabf0385f83964c3aa71a551a8c3836 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Tue, 4 Dec 2018 21:51:24 +0000 Subject: [PATCH 2/2] Generated from 5892e13494715eb9a24653407544e23ddb00efc4 Merge pull request #5 from leonardbf/netapp-api-update-public NFSAAS-1505 status codes --- .../azure/mgmt/netapp/operations/snapshots_operations.py | 4 ++-- .../azure/mgmt/netapp/operations/volumes_operations.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/azure-mgmt-netapp/azure/mgmt/netapp/operations/snapshots_operations.py b/azure-mgmt-netapp/azure/mgmt/netapp/operations/snapshots_operations.py index 703c6c82f7e1..9216a465f1b4 100644 --- a/azure-mgmt-netapp/azure/mgmt/netapp/operations/snapshots_operations.py +++ b/azure-mgmt-netapp/azure/mgmt/netapp/operations/snapshots_operations.py @@ -220,12 +220,12 @@ def _create_initial( 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, 202]: + if response.status_code not in [201, 202]: raise models.ErrorException(self._deserialize, response) deserialized = None - if response.status_code == 200: + if response.status_code == 201: deserialized = self._deserialize('Snapshot', response) if raw: diff --git a/azure-mgmt-netapp/azure/mgmt/netapp/operations/volumes_operations.py b/azure-mgmt-netapp/azure/mgmt/netapp/operations/volumes_operations.py index 2ff383e26f84..ef9fffd38c81 100644 --- a/azure-mgmt-netapp/azure/mgmt/netapp/operations/volumes_operations.py +++ b/azure-mgmt-netapp/azure/mgmt/netapp/operations/volumes_operations.py @@ -213,12 +213,12 @@ def _create_or_update_initial( 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, 202]: + if response.status_code not in [201, 202]: raise models.ErrorException(self._deserialize, response) deserialized = None - if response.status_code == 200: + if response.status_code == 201: deserialized = self._deserialize('Volume', response) if raw: