Skip to content

Commit

Permalink
Generated from d0870480d5ef34251631c424b439082fc7606879
Browse files Browse the repository at this point in the history
Merge pull request #36 from leonardbf/ANF-440-2019-10-01

ANF-440 API 2019-10-01 corrections
  • Loading branch information
SDK Automation committed Dec 5, 2019
1 parent fdd1621 commit f5d8ac3
Show file tree
Hide file tree
Showing 11 changed files with 521 additions and 35 deletions.
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
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 @@ -69,6 +73,7 @@

__all__ = [
'ActiveDirectory',
'AuthorizeRequest',
'CapacityPool',
'CapacityPoolPatch',
'Dimension',
Expand All @@ -80,6 +85,7 @@
'Operation',
'OperationDisplay',
'ReplicationObject',
'ReplicationStatus',
'ResourceNameAvailability',
'ResourceNameAvailabilityRequest',
'ServiceSpecification',
Expand Down
79 changes: 70 additions & 9 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,24 @@ 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
:param endpoint_type: Indicates whether the local volume is the source or
destination for the Volume Replication
:type endpoint_type: str
:param replication_schedule: Required. replicationSchedule. Schedule
:param replication_schedule: Required. Schedule
:type replication_schedule: str
:param remote_volume_resource_id: Required. remoteVolumeResourceId. The
resource ID of the remote volume.
:param owner_id: Id used to identify the owner of the resource
:type owner_id: str
: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 @@ -585,15 +605,52 @@ class ReplicationObject(Model):
'replication_id': {'key': 'replicationId', 'type': 'str'},
'endpoint_type': {'key': 'endpointType', 'type': 'str'},
'replication_schedule': {'key': 'replicationSchedule', 'type': 'str'},
'owner_id': {'key': 'ownerId', 'type': 'str'},
'remote_volume_resource_id': {'key': 'remoteVolumeResourceId', 'type': 'str'},
'remote_volume_region': {'key': 'remoteVolumeRegion', 'type': 'str'},
}

def __init__(self, **kwargs):
super(ReplicationObject, self).__init__(**kwargs)
self.replication_id = kwargs.get('replication_id', None)
self.endpoint_type = kwargs.get('endpoint_type', None)
self.replication_schedule = kwargs.get('replication_schedule', None)
self.owner_id = kwargs.get('owner_id', 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
:type relationship_status: str
:param mirror_state: The status of the replication
:type mirror_state: str
: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 @@ -819,6 +876,8 @@ class Volume(Model):
replication object
:type data_protection:
~azure.mgmt.netapp.models.VolumePropertiesDataProtection
:param is_restoring: Restoring
:type is_restoring: bool
"""

_validation = {
Expand Down Expand Up @@ -854,6 +913,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 +936,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 @@ -962,11 +1023,11 @@ class VolumePropertiesDataProtection(Model):
DataProtection volume, can have a replication object.
:param replication: Replication. Replication properties
:type replication: ~azure.mgmt.netapp.models.ReplicationObject
:type replication: object
"""

_attribute_map = {
'replication': {'key': 'replication', 'type': 'ReplicationObject'},
'replication': {'key': 'replication', 'type': 'object'},
}

def __init__(self, **kwargs):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -563,20 +579,24 @@ 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
:param endpoint_type: Indicates whether the local volume is the source or
destination for the Volume Replication
:type endpoint_type: str
:param replication_schedule: Required. replicationSchedule. Schedule
:param replication_schedule: Required. Schedule
:type replication_schedule: str
:param remote_volume_resource_id: Required. remoteVolumeResourceId. The
resource ID of the remote volume.
:param owner_id: Id used to identify the owner of the resource
:type owner_id: str
: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 @@ -585,15 +605,52 @@ class ReplicationObject(Model):
'replication_id': {'key': 'replicationId', 'type': 'str'},
'endpoint_type': {'key': 'endpointType', 'type': 'str'},
'replication_schedule': {'key': 'replicationSchedule', 'type': 'str'},
'owner_id': {'key': 'ownerId', '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: str, remote_volume_resource_id: str, replication_id: str=None, endpoint_type: str=None, owner_id: str=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.owner_id = owner_id
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
:type relationship_status: str
:param mirror_state: The status of the replication
:type mirror_state: str
: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: str=None, mirror_state: str=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):
Expand Down Expand Up @@ -819,6 +876,8 @@ class Volume(Model):
replication object
:type data_protection:
~azure.mgmt.netapp.models.VolumePropertiesDataProtection
:param is_restoring: Restoring
:type is_restoring: bool
"""

_validation = {
Expand Down Expand Up @@ -854,9 +913,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
Expand All @@ -876,6 +936,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):
Expand Down Expand Up @@ -962,11 +1023,11 @@ class VolumePropertiesDataProtection(Model):
DataProtection volume, can have a replication object.
:param replication: Replication. Replication properties
:type replication: ~azure.mgmt.netapp.models.ReplicationObject
:type replication: object
"""

_attribute_map = {
'replication': {'key': 'replication', 'type': 'ReplicationObject'},
'replication': {'key': 'replication', 'type': 'object'},
}

def __init__(self, *, replication=None, **kwargs) -> None:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down
Loading

0 comments on commit f5d8ac3

Please sign in to comment.