Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
14 changes: 14 additions & 0 deletions sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -65,10 +69,15 @@
InAvailabilityReasonType,
CheckNameResourceTypes,
ServiceLevel,
EndpointType,
ReplicationSchedule,
RelationshipStatus,
MirrorState,
)

__all__ = [
'ActiveDirectory',
'AuthorizeRequest',
'CapacityPool',
'CapacityPoolPatch',
'Dimension',
Expand All @@ -80,6 +89,7 @@
'Operation',
'OperationDisplay',
'ReplicationObject',
'ReplicationStatus',
'ResourceNameAvailability',
'ResourceNameAvailabilityRequest',
'ServiceSpecification',
Expand All @@ -99,4 +109,8 @@
'InAvailabilityReasonType',
'CheckNameResourceTypes',
'ServiceLevel',
'EndpointType',
'ReplicationSchedule',
'RelationshipStatus',
'MirrorState',
]
Original file line number Diff line number Diff line change
Expand Up @@ -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"
88 changes: 76 additions & 12 deletions sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -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},
}
Expand All @@ -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):
Expand All @@ -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):
Expand Down Expand Up @@ -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 = {
Expand Down Expand Up @@ -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):
Expand All @@ -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):
Expand Down Expand Up @@ -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
Expand Down
Loading