diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_azure_net_app_files_management_client.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_azure_net_app_files_management_client.py index b8bfda44cc72..5bd1017fb270 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_azure_net_app_files_management_client.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_azure_net_app_files_management_client.py @@ -61,7 +61,7 @@ def __init__( super(AzureNetAppFilesManagementClient, 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 = '2019-08-01' + self.api_version = '2019-10-01' self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/__init__.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/__init__.py index d1b2b67d8a4d..2d8750a79e65 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/__init__.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/__init__.py @@ -11,6 +11,7 @@ try: from ._models_py3 import ActiveDirectory + from ._models_py3 import AuthorizeRequest from ._models_py3 import CapacityPool from ._models_py3 import CapacityPoolPatch from ._models_py3 import Dimension @@ -22,6 +23,7 @@ from ._models_py3 import Operation from ._models_py3 import OperationDisplay from ._models_py3 import ReplicationObject + from ._models_py3 import ReplicationStatus from ._models_py3 import ResourceNameAvailability from ._models_py3 import ResourceNameAvailabilityRequest from ._models_py3 import ServiceSpecification @@ -34,6 +36,7 @@ from ._models_py3 import VolumePropertiesExportPolicy except (SyntaxError, ImportError): from ._models import ActiveDirectory + from ._models import AuthorizeRequest from ._models import CapacityPool from ._models import CapacityPoolPatch from ._models import Dimension @@ -45,6 +48,7 @@ from ._models import Operation from ._models import OperationDisplay from ._models import ReplicationObject + from ._models import ReplicationStatus from ._models import ResourceNameAvailability from ._models import ResourceNameAvailabilityRequest from ._models import ServiceSpecification @@ -65,10 +69,15 @@ InAvailabilityReasonType, CheckNameResourceTypes, ServiceLevel, + EndpointType, + ReplicationSchedule, + RelationshipStatus, + MirrorState, ) __all__ = [ 'ActiveDirectory', + 'AuthorizeRequest', 'CapacityPool', 'CapacityPoolPatch', 'Dimension', @@ -80,6 +89,7 @@ 'Operation', 'OperationDisplay', 'ReplicationObject', + 'ReplicationStatus', 'ResourceNameAvailability', 'ResourceNameAvailabilityRequest', 'ServiceSpecification', @@ -99,4 +109,8 @@ 'InAvailabilityReasonType', 'CheckNameResourceTypes', 'ServiceLevel', + 'EndpointType', + 'ReplicationSchedule', + 'RelationshipStatus', + 'MirrorState', ] diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/_azure_net_app_files_management_client_enums.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/_azure_net_app_files_management_client_enums.py index 9d12c1de8195..9fe3cca234e5 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/_azure_net_app_files_management_client_enums.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/_azure_net_app_files_management_client_enums.py @@ -31,3 +31,31 @@ class ServiceLevel(str, Enum): standard = "Standard" #: Standard service level premium = "Premium" #: Premium service level ultra = "Ultra" #: Ultra service level + + +class EndpointType(str, Enum): + + src = "src" + dst = "dst" + + +class ReplicationSchedule(str, Enum): + + _10minutely = "_10minutely" + hourly = "hourly" + daily = "daily" + weekly = "weekly" + monthly = "monthly" + + +class RelationshipStatus(str, Enum): + + idle = "Idle" + transferring = "Transferring" + + +class MirrorState(str, Enum): + + uninitialized = "Uninitialized" + mirrored = "Mirrored" + broken = "Broken" diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/_models.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/_models.py index 9edd349d23c2..87676c4ab501 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/_models.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/_models.py @@ -60,6 +60,22 @@ def __init__(self, **kwargs): self.organizational_unit = kwargs.get('organizational_unit', None) +class AuthorizeRequest(Model): + """Authorize request. + + :param remote_volume_resource_id: Resource id + :type remote_volume_resource_id: str + """ + + _attribute_map = { + 'remote_volume_resource_id': {'key': 'remoteVolumeResourceId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AuthorizeRequest, self).__init__(**kwargs) + self.remote_volume_resource_id = kwargs.get('remote_volume_resource_id', None) + + class CapacityPool(Model): """Capacity pool resource. @@ -563,20 +579,25 @@ class ReplicationObject(Model): All required parameters must be populated in order to send to Azure. - :param replication_id: replicationId. Id + :param replication_id: Id :type replication_id: str - :param endpoint_type: Required. endpointType. Indicates whether the local - volume is the source or destination for the Volume Replication - :type endpoint_type: str - :param replication_schedule: Required. replicationSchedule. Schedule - :type replication_schedule: str - :param remote_volume_resource_id: Required. remoteVolumeResourceId. The - resource ID of the remote volume. + :param endpoint_type: Indicates whether the local volume is the source or + destination for the Volume Replication. Possible values include: 'src', + 'dst' + :type endpoint_type: str or ~azure.mgmt.netapp.models.EndpointType + :param replication_schedule: Required. Schedule. Possible values include: + '_10minutely', 'hourly', 'daily', 'weekly', 'monthly' + :type replication_schedule: str or + ~azure.mgmt.netapp.models.ReplicationSchedule + :param remote_volume_resource_id: Required. The resource ID of the remote + volume. :type remote_volume_resource_id: str + :param remote_volume_region: The remote region for the other end of the + Volume Replication. + :type remote_volume_region: str """ _validation = { - 'endpoint_type': {'required': True}, 'replication_schedule': {'required': True}, 'remote_volume_resource_id': {'required': True}, } @@ -586,6 +607,7 @@ class ReplicationObject(Model): 'endpoint_type': {'key': 'endpointType', 'type': 'str'}, 'replication_schedule': {'key': 'replicationSchedule', 'type': 'str'}, 'remote_volume_resource_id': {'key': 'remoteVolumeResourceId', 'type': 'str'}, + 'remote_volume_region': {'key': 'remoteVolumeRegion', 'type': 'str'}, } def __init__(self, **kwargs): @@ -594,6 +616,43 @@ def __init__(self, **kwargs): self.endpoint_type = kwargs.get('endpoint_type', None) self.replication_schedule = kwargs.get('replication_schedule', None) self.remote_volume_resource_id = kwargs.get('remote_volume_resource_id', None) + self.remote_volume_region = kwargs.get('remote_volume_region', None) + + +class ReplicationStatus(Model): + """Replication status. + + :param healthy: Replication health check + :type healthy: bool + :param relationship_status: Status of the mirror relationship. Possible + values include: 'Idle', 'Transferring' + :type relationship_status: str or + ~azure.mgmt.netapp.models.RelationshipStatus + :param mirror_state: The status of the replication. Possible values + include: 'Uninitialized', 'Mirrored', 'Broken' + :type mirror_state: str or ~azure.mgmt.netapp.models.MirrorState + :param total_progress: The progress of the replication + :type total_progress: str + :param error_message: Displays error message if the replication is in an + error state + :type error_message: str + """ + + _attribute_map = { + 'healthy': {'key': 'healthy', 'type': 'bool'}, + 'relationship_status': {'key': 'relationshipStatus', 'type': 'str'}, + 'mirror_state': {'key': 'mirrorState', 'type': 'str'}, + 'total_progress': {'key': 'totalProgress', 'type': 'str'}, + 'error_message': {'key': 'errorMessage', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ReplicationStatus, self).__init__(**kwargs) + self.healthy = kwargs.get('healthy', None) + self.relationship_status = kwargs.get('relationship_status', None) + self.mirror_state = kwargs.get('mirror_state', None) + self.total_progress = kwargs.get('total_progress', None) + self.error_message = kwargs.get('error_message', None) class ResourceNameAvailability(Model): @@ -815,10 +874,12 @@ class Volume(Model): :type mount_targets: object :param volume_type: What type of volume is this :type volume_type: str - :param data_protection: DataProtection. DataProtection volume, can have a - replication object + :param data_protection: DataProtection. DataProtection type volumes + include an object containing details of the replication :type data_protection: ~azure.mgmt.netapp.models.VolumePropertiesDataProtection + :param is_restoring: Restoring + :type is_restoring: bool """ _validation = { @@ -854,6 +915,7 @@ class Volume(Model): 'mount_targets': {'key': 'properties.mountTargets', 'type': 'object'}, 'volume_type': {'key': 'properties.volumeType', 'type': 'str'}, 'data_protection': {'key': 'properties.dataProtection', 'type': 'VolumePropertiesDataProtection'}, + 'is_restoring': {'key': 'properties.isRestoring', 'type': 'bool'}, } def __init__(self, **kwargs): @@ -876,6 +938,7 @@ def __init__(self, **kwargs): self.mount_targets = kwargs.get('mount_targets', None) self.volume_type = kwargs.get('volume_type', None) self.data_protection = kwargs.get('data_protection', None) + self.is_restoring = kwargs.get('is_restoring', None) class VolumePatch(Model): @@ -959,7 +1022,8 @@ def __init__(self, **kwargs): class VolumePropertiesDataProtection(Model): """DataProtection. - DataProtection volume, can have a replication object. + DataProtection type volumes include an object containing details of the + replication. :param replication: Replication. Replication properties :type replication: ~azure.mgmt.netapp.models.ReplicationObject diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/_models_py3.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/_models_py3.py index dfd40377645d..42d1ca3cb655 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/_models_py3.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/_models_py3.py @@ -60,6 +60,22 @@ def __init__(self, *, active_directory_id: str=None, username: str=None, passwor self.organizational_unit = organizational_unit +class AuthorizeRequest(Model): + """Authorize request. + + :param remote_volume_resource_id: Resource id + :type remote_volume_resource_id: str + """ + + _attribute_map = { + 'remote_volume_resource_id': {'key': 'remoteVolumeResourceId', 'type': 'str'}, + } + + def __init__(self, *, remote_volume_resource_id: str=None, **kwargs) -> None: + super(AuthorizeRequest, self).__init__(**kwargs) + self.remote_volume_resource_id = remote_volume_resource_id + + class CapacityPool(Model): """Capacity pool resource. @@ -563,20 +579,25 @@ class ReplicationObject(Model): All required parameters must be populated in order to send to Azure. - :param replication_id: replicationId. Id + :param replication_id: Id :type replication_id: str - :param endpoint_type: Required. endpointType. Indicates whether the local - volume is the source or destination for the Volume Replication - :type endpoint_type: str - :param replication_schedule: Required. replicationSchedule. Schedule - :type replication_schedule: str - :param remote_volume_resource_id: Required. remoteVolumeResourceId. The - resource ID of the remote volume. + :param endpoint_type: Indicates whether the local volume is the source or + destination for the Volume Replication. Possible values include: 'src', + 'dst' + :type endpoint_type: str or ~azure.mgmt.netapp.models.EndpointType + :param replication_schedule: Required. Schedule. Possible values include: + '_10minutely', 'hourly', 'daily', 'weekly', 'monthly' + :type replication_schedule: str or + ~azure.mgmt.netapp.models.ReplicationSchedule + :param remote_volume_resource_id: Required. The resource ID of the remote + volume. :type remote_volume_resource_id: str + :param remote_volume_region: The remote region for the other end of the + Volume Replication. + :type remote_volume_region: str """ _validation = { - 'endpoint_type': {'required': True}, 'replication_schedule': {'required': True}, 'remote_volume_resource_id': {'required': True}, } @@ -586,14 +607,52 @@ class ReplicationObject(Model): 'endpoint_type': {'key': 'endpointType', 'type': 'str'}, 'replication_schedule': {'key': 'replicationSchedule', 'type': 'str'}, 'remote_volume_resource_id': {'key': 'remoteVolumeResourceId', 'type': 'str'}, + 'remote_volume_region': {'key': 'remoteVolumeRegion', 'type': 'str'}, } - def __init__(self, *, endpoint_type: str, replication_schedule: str, remote_volume_resource_id: str, replication_id: str=None, **kwargs) -> None: + def __init__(self, *, replication_schedule, remote_volume_resource_id: str, replication_id: str=None, endpoint_type=None, remote_volume_region: str=None, **kwargs) -> None: super(ReplicationObject, self).__init__(**kwargs) self.replication_id = replication_id self.endpoint_type = endpoint_type self.replication_schedule = replication_schedule self.remote_volume_resource_id = remote_volume_resource_id + self.remote_volume_region = remote_volume_region + + +class ReplicationStatus(Model): + """Replication status. + + :param healthy: Replication health check + :type healthy: bool + :param relationship_status: Status of the mirror relationship. Possible + values include: 'Idle', 'Transferring' + :type relationship_status: str or + ~azure.mgmt.netapp.models.RelationshipStatus + :param mirror_state: The status of the replication. Possible values + include: 'Uninitialized', 'Mirrored', 'Broken' + :type mirror_state: str or ~azure.mgmt.netapp.models.MirrorState + :param total_progress: The progress of the replication + :type total_progress: str + :param error_message: Displays error message if the replication is in an + error state + :type error_message: str + """ + + _attribute_map = { + 'healthy': {'key': 'healthy', 'type': 'bool'}, + 'relationship_status': {'key': 'relationshipStatus', 'type': 'str'}, + 'mirror_state': {'key': 'mirrorState', 'type': 'str'}, + 'total_progress': {'key': 'totalProgress', 'type': 'str'}, + 'error_message': {'key': 'errorMessage', 'type': 'str'}, + } + + def __init__(self, *, healthy: bool=None, relationship_status=None, mirror_state=None, total_progress: str=None, error_message: str=None, **kwargs) -> None: + super(ReplicationStatus, self).__init__(**kwargs) + self.healthy = healthy + self.relationship_status = relationship_status + self.mirror_state = mirror_state + self.total_progress = total_progress + self.error_message = error_message class ResourceNameAvailability(Model): @@ -815,10 +874,12 @@ class Volume(Model): :type mount_targets: object :param volume_type: What type of volume is this :type volume_type: str - :param data_protection: DataProtection. DataProtection volume, can have a - replication object + :param data_protection: DataProtection. DataProtection type volumes + include an object containing details of the replication :type data_protection: ~azure.mgmt.netapp.models.VolumePropertiesDataProtection + :param is_restoring: Restoring + :type is_restoring: bool """ _validation = { @@ -854,9 +915,10 @@ class Volume(Model): 'mount_targets': {'key': 'properties.mountTargets', 'type': 'object'}, 'volume_type': {'key': 'properties.volumeType', 'type': 'str'}, 'data_protection': {'key': 'properties.dataProtection', 'type': 'VolumePropertiesDataProtection'}, + 'is_restoring': {'key': 'properties.isRestoring', 'type': 'bool'}, } - def __init__(self, *, location: str, creation_token: str, subnet_id: str, tags=None, service_level="Premium", usage_threshold: int=107374182400, export_policy=None, protocol_types=None, snapshot_id: str=None, mount_targets=None, volume_type: str=None, data_protection=None, **kwargs) -> None: + def __init__(self, *, location: str, creation_token: str, subnet_id: str, tags=None, service_level="Premium", usage_threshold: int=107374182400, export_policy=None, protocol_types=None, snapshot_id: str=None, mount_targets=None, volume_type: str=None, data_protection=None, is_restoring: bool=None, **kwargs) -> None: super(Volume, self).__init__(**kwargs) self.location = location self.id = None @@ -876,6 +938,7 @@ def __init__(self, *, location: str, creation_token: str, subnet_id: str, tags=N self.mount_targets = mount_targets self.volume_type = volume_type self.data_protection = data_protection + self.is_restoring = is_restoring class VolumePatch(Model): @@ -959,7 +1022,8 @@ def __init__(self, *, rules=None, **kwargs) -> None: class VolumePropertiesDataProtection(Model): """DataProtection. - DataProtection volume, can have a replication object. + DataProtection type volumes include an object containing details of the + replication. :param replication: Replication. Replication properties :type replication: ~azure.mgmt.netapp.models.ReplicationObject diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_accounts_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_accounts_operations.py index cab47303dddd..c832c8d2505a 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_accounts_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_accounts_operations.py @@ -27,7 +27,7 @@ class AccountsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-08-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-10-01". """ models = models @@ -37,7 +37,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-08-01" + self.api_version = "2019-10-01" self.config = config diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_mount_targets_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_mount_targets_operations.py index 0f9d301cdc03..35f21a41509e 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_mount_targets_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_mount_targets_operations.py @@ -25,7 +25,7 @@ class MountTargetsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-08-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-10-01". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-08-01" + self.api_version = "2019-10-01" self.config = config diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_net_app_resource_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_net_app_resource_operations.py index 1fb54afe37cd..de7406785240 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_net_app_resource_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_net_app_resource_operations.py @@ -25,7 +25,7 @@ class NetAppResourceOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-08-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-10-01". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-08-01" + self.api_version = "2019-10-01" self.config = config diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_operations.py index a931726c178e..677211e01a69 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_operations.py @@ -25,7 +25,7 @@ class Operations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-08-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-10-01". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-08-01" + self.api_version = "2019-10-01" self.config = config diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_pools_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_pools_operations.py index 19b47e8b45d1..c457e2e6c0bc 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_pools_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_pools_operations.py @@ -27,7 +27,7 @@ class PoolsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-08-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-10-01". """ models = models @@ -37,7 +37,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-08-01" + self.api_version = "2019-10-01" self.config = config diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_snapshots_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_snapshots_operations.py index 482d61b49ebd..a87fb27a7e7c 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_snapshots_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_snapshots_operations.py @@ -27,7 +27,7 @@ class SnapshotsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-08-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-10-01". """ models = models @@ -37,7 +37,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-08-01" + self.api_version = "2019-10-01" self.config = config diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_volumes_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_volumes_operations.py index cffd7df22b37..fcbfd8eb24d0 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_volumes_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_volumes_operations.py @@ -27,7 +27,7 @@ class VolumesOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-08-01". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2019-10-01". """ models = models @@ -37,7 +37,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-08-01" + self.api_version = "2019-10-01" self.config = config @@ -462,3 +462,327 @@ def get_long_running_output(response): else: polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}'} + + def break_replication( + self, resource_group_name, account_name, pool_name, volume_name, custom_headers=None, raw=False, **operation_config): + """Break volume replication. + + Break the replication connection on the destination volume. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: 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 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: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.break_replication.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + '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') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + break_replication.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/breakReplication'} + + def replication_status_method( + self, resource_group_name, account_name, pool_name, volume_name, custom_headers=None, raw=False, **operation_config): + """Get volume replication status. + + Get the status of the replication. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: 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 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: ReplicationStatus or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.netapp.models.ReplicationStatus or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.replication_status_method.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + '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') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ReplicationStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + replication_status_method.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/replicationStatus'} + + def resync_replication( + self, resource_group_name, account_name, pool_name, volume_name, custom_headers=None, raw=False, **operation_config): + """Resync volume replication. + + Resync the connection on the destination volume. If the operation is + ran on the source volume it will reverse-resync the connection and sync + from source to destination. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: 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 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: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.resync_replication.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + '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') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + resync_replication.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/resyncReplication'} + + def delete_replication( + self, resource_group_name, account_name, pool_name, volume_name, custom_headers=None, raw=False, **operation_config): + """Delete volume replication. + + Delete the replication connection on the destination volume, and send + release to the source replication. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: 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 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: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete_replication.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + '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') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_replication.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/deleteReplication'} + + def authorize_replication( + self, resource_group_name, account_name, pool_name, volume_name, remote_volume_resource_id=None, custom_headers=None, raw=False, **operation_config): + """Authorize source volume replication. + + Authorize the replication connection on the source volume. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: 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 remote_volume_resource_id: Resource id + :type remote_volume_resource_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + body = models.AuthorizeRequest(remote_volume_resource_id=remote_volume_resource_id) + + # Construct URL + url = self.authorize_replication.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + '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') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(body, 'AuthorizeRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + authorize_replication.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/authorizeReplication'}