diff --git a/azure-mgmt-storagesync/MANIFEST.in b/azure-mgmt-storagesync/MANIFEST.in index 9ecaeb15de50..bb37a2723dae 100644 --- a/azure-mgmt-storagesync/MANIFEST.in +++ b/azure-mgmt-storagesync/MANIFEST.in @@ -1,2 +1 @@ include *.rst -include azure_bdist_wheel.py \ No newline at end of file diff --git a/azure-mgmt-storagesync/azure/__init__.py b/azure-mgmt-storagesync/azure/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-mgmt-storagesync/azure/__init__.py +++ b/azure-mgmt-storagesync/azure/__init__.py @@ -1 +1 @@ -__import__('pkg_resources').declare_namespace(__name__) +__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/azure-mgmt-storagesync/azure/mgmt/__init__.py b/azure-mgmt-storagesync/azure/mgmt/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-mgmt-storagesync/azure/mgmt/__init__.py +++ b/azure-mgmt-storagesync/azure/mgmt/__init__.py @@ -1 +1 @@ -__import__('pkg_resources').declare_namespace(__name__) +__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/azure-mgmt-storagesync/azure/mgmt/storagesync/models/__init__.py b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/__init__.py index e21b612cadab..7bced8fc4caf 100644 --- a/azure-mgmt-storagesync/azure/mgmt/storagesync/models/__init__.py +++ b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/__init__.py @@ -22,6 +22,7 @@ from .sync_group_create_parameters_py3 import SyncGroupCreateParameters from .cloud_endpoint_create_parameters_py3 import CloudEndpointCreateParameters from .server_endpoint_create_parameters_py3 import ServerEndpointCreateParameters + from .trigger_rollover_request_py3 import TriggerRolloverRequest from .registered_server_create_parameters_py3 import RegisteredServerCreateParameters from .server_endpoint_update_parameters_py3 import ServerEndpointUpdateParameters from .server_endpoint_py3 import ServerEndpoint @@ -38,12 +39,11 @@ from .pre_restore_request_py3 import PreRestoreRequest from .backup_request_py3 import BackupRequest from .post_backup_response_py3 import PostBackupResponse - from .workflow_array_py3 import WorkflowArray from .storage_sync_service_update_parameters_py3 import StorageSyncServiceUpdateParameters - from .proxy_resource_py3 import ProxyResource from .tracked_resource_py3 import TrackedResource from .azure_entity_resource_py3 import AzureEntityResource from .resource_py3 import Resource + from .proxy_resource_py3 import ProxyResource except (SyntaxError, ImportError): from .storage_sync_error_details import StorageSyncErrorDetails from .storage_sync_api_error import StorageSyncApiError @@ -57,6 +57,7 @@ from .sync_group_create_parameters import SyncGroupCreateParameters from .cloud_endpoint_create_parameters import CloudEndpointCreateParameters from .server_endpoint_create_parameters import ServerEndpointCreateParameters + from .trigger_rollover_request import TriggerRolloverRequest from .registered_server_create_parameters import RegisteredServerCreateParameters from .server_endpoint_update_parameters import ServerEndpointUpdateParameters from .server_endpoint import ServerEndpoint @@ -73,18 +74,18 @@ from .pre_restore_request import PreRestoreRequest from .backup_request import BackupRequest from .post_backup_response import PostBackupResponse - from .workflow_array import WorkflowArray from .storage_sync_service_update_parameters import StorageSyncServiceUpdateParameters - from .proxy_resource import ProxyResource from .tracked_resource import TrackedResource from .azure_entity_resource import AzureEntityResource from .resource import Resource + from .proxy_resource import ProxyResource from .operation_entity_paged import OperationEntityPaged from .storage_sync_service_paged import StorageSyncServicePaged from .sync_group_paged import SyncGroupPaged from .cloud_endpoint_paged import CloudEndpointPaged from .server_endpoint_paged import ServerEndpointPaged from .registered_server_paged import RegisteredServerPaged +from .workflow_paged import WorkflowPaged from .storage_sync_management_client_enums import ( Reason, NameAvailabilityReason, @@ -103,6 +104,7 @@ 'SyncGroupCreateParameters', 'CloudEndpointCreateParameters', 'ServerEndpointCreateParameters', + 'TriggerRolloverRequest', 'RegisteredServerCreateParameters', 'ServerEndpointUpdateParameters', 'ServerEndpoint', @@ -119,18 +121,18 @@ 'PreRestoreRequest', 'BackupRequest', 'PostBackupResponse', - 'WorkflowArray', 'StorageSyncServiceUpdateParameters', - 'ProxyResource', 'TrackedResource', 'AzureEntityResource', 'Resource', + 'ProxyResource', 'OperationEntityPaged', 'StorageSyncServicePaged', 'SyncGroupPaged', 'CloudEndpointPaged', 'ServerEndpointPaged', 'RegisteredServerPaged', + 'WorkflowPaged', 'Reason', 'NameAvailabilityReason', ] diff --git a/azure-mgmt-storagesync/azure/mgmt/storagesync/models/cloud_endpoint.py b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/cloud_endpoint.py index 313f35377704..1c379341a803 100644 --- a/azure-mgmt-storagesync/azure/mgmt/storagesync/models/cloud_endpoint.py +++ b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/cloud_endpoint.py @@ -9,10 +9,10 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .proxy_resource import ProxyResource -class CloudEndpoint(Resource): +class CloudEndpoint(ProxyResource): """Cloud Endpoint object. Variables are only populated by the server, and will be ignored when diff --git a/azure-mgmt-storagesync/azure/mgmt/storagesync/models/cloud_endpoint_create_parameters.py b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/cloud_endpoint_create_parameters.py index d1eb614bc370..e9c6046bd04f 100644 --- a/azure-mgmt-storagesync/azure/mgmt/storagesync/models/cloud_endpoint_create_parameters.py +++ b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/cloud_endpoint_create_parameters.py @@ -9,24 +9,23 @@ # regenerated. # -------------------------------------------------------------------------- -from msrest.serialization import Model - - -class CloudEndpointCreateParameters(Model): - """The parameters used when creating a storage sync service. - - :param location: Required. Gets or sets the location of the resource. This - will be one of the supported and registered Azure Geo Regions (e.g. West - US, East US, Southeast Asia, etc.). The geo region of a resource cannot be - changed once it is created, but if an identical geo region is specified on - update, the request will succeed. - :type location: str - :param tags: Gets or sets a list of key value pairs that describe the - resource. These tags can be used for viewing and grouping this resource - (across resource groups). A maximum of 15 tags can be provided for a - resource. Each tag must have a key with a length no greater than 128 - characters and a value with a length no greater than 256 characters. - :type tags: dict[str, str] +from .proxy_resource import ProxyResource + + +class CloudEndpointCreateParameters(ProxyResource): + """The parameters used when creating a cloud endpoint. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str :param storage_account_resource_id: Storage Account Resource Id :type storage_account_resource_id: str :param storage_account_share_name: Storage Account Share name @@ -35,9 +34,16 @@ class CloudEndpointCreateParameters(Model): :type storage_account_tenant_id: str """ + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + _attribute_map = { - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, 'storage_account_resource_id': {'key': 'properties.storageAccountResourceId', 'type': 'str'}, 'storage_account_share_name': {'key': 'properties.storageAccountShareName', 'type': 'str'}, 'storage_account_tenant_id': {'key': 'properties.storageAccountTenantId', 'type': 'str'}, @@ -45,8 +51,6 @@ class CloudEndpointCreateParameters(Model): def __init__(self, **kwargs): super(CloudEndpointCreateParameters, self).__init__(**kwargs) - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) self.storage_account_resource_id = kwargs.get('storage_account_resource_id', None) self.storage_account_share_name = kwargs.get('storage_account_share_name', None) self.storage_account_tenant_id = kwargs.get('storage_account_tenant_id', None) diff --git a/azure-mgmt-storagesync/azure/mgmt/storagesync/models/cloud_endpoint_create_parameters_py3.py b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/cloud_endpoint_create_parameters_py3.py index 33ff555d026b..bc3b0921d083 100644 --- a/azure-mgmt-storagesync/azure/mgmt/storagesync/models/cloud_endpoint_create_parameters_py3.py +++ b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/cloud_endpoint_create_parameters_py3.py @@ -9,24 +9,23 @@ # regenerated. # -------------------------------------------------------------------------- -from msrest.serialization import Model - - -class CloudEndpointCreateParameters(Model): - """The parameters used when creating a storage sync service. - - :param location: Required. Gets or sets the location of the resource. This - will be one of the supported and registered Azure Geo Regions (e.g. West - US, East US, Southeast Asia, etc.). The geo region of a resource cannot be - changed once it is created, but if an identical geo region is specified on - update, the request will succeed. - :type location: str - :param tags: Gets or sets a list of key value pairs that describe the - resource. These tags can be used for viewing and grouping this resource - (across resource groups). A maximum of 15 tags can be provided for a - resource. Each tag must have a key with a length no greater than 128 - characters and a value with a length no greater than 256 characters. - :type tags: dict[str, str] +from .proxy_resource_py3 import ProxyResource + + +class CloudEndpointCreateParameters(ProxyResource): + """The parameters used when creating a cloud endpoint. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str :param storage_account_resource_id: Storage Account Resource Id :type storage_account_resource_id: str :param storage_account_share_name: Storage Account Share name @@ -35,18 +34,23 @@ class CloudEndpointCreateParameters(Model): :type storage_account_tenant_id: str """ + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + _attribute_map = { - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, 'storage_account_resource_id': {'key': 'properties.storageAccountResourceId', 'type': 'str'}, 'storage_account_share_name': {'key': 'properties.storageAccountShareName', 'type': 'str'}, 'storage_account_tenant_id': {'key': 'properties.storageAccountTenantId', 'type': 'str'}, } - def __init__(self, *, location: str=None, tags=None, storage_account_resource_id: str=None, storage_account_share_name: str=None, storage_account_tenant_id: str=None, **kwargs) -> None: + def __init__(self, *, storage_account_resource_id: str=None, storage_account_share_name: str=None, storage_account_tenant_id: str=None, **kwargs) -> None: super(CloudEndpointCreateParameters, self).__init__(**kwargs) - self.location = location - self.tags = tags self.storage_account_resource_id = storage_account_resource_id self.storage_account_share_name = storage_account_share_name self.storage_account_tenant_id = storage_account_tenant_id diff --git a/azure-mgmt-storagesync/azure/mgmt/storagesync/models/cloud_endpoint_py3.py b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/cloud_endpoint_py3.py index cf6aaaf35992..98812178b1f2 100644 --- a/azure-mgmt-storagesync/azure/mgmt/storagesync/models/cloud_endpoint_py3.py +++ b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/cloud_endpoint_py3.py @@ -9,10 +9,10 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource_py3 import Resource +from .proxy_resource_py3 import ProxyResource -class CloudEndpoint(Resource): +class CloudEndpoint(ProxyResource): """Cloud Endpoint object. Variables are only populated by the server, and will be ignored when diff --git a/azure-mgmt-storagesync/azure/mgmt/storagesync/models/registered_server.py b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/registered_server.py index bfb8d368118b..8b34d55fe192 100644 --- a/azure-mgmt-storagesync/azure/mgmt/storagesync/models/registered_server.py +++ b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/registered_server.py @@ -9,10 +9,10 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .proxy_resource import ProxyResource -class RegisteredServer(Resource): +class RegisteredServer(ProxyResource): """Registered Server resource. Variables are only populated by the server, and will be ignored when diff --git a/azure-mgmt-storagesync/azure/mgmt/storagesync/models/registered_server_create_parameters.py b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/registered_server_create_parameters.py index ec7b30e1fe06..d1dd456e9cf2 100644 --- a/azure-mgmt-storagesync/azure/mgmt/storagesync/models/registered_server_create_parameters.py +++ b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/registered_server_create_parameters.py @@ -9,24 +9,23 @@ # regenerated. # -------------------------------------------------------------------------- -from msrest.serialization import Model +from .proxy_resource import ProxyResource -class RegisteredServerCreateParameters(Model): - """The parameters used when creating a storage sync service. +class RegisteredServerCreateParameters(ProxyResource): + """The parameters used when creating a registered server. - :param location: Required. Gets or sets the location of the resource. This - will be one of the supported and registered Azure Geo Regions (e.g. West - US, East US, Southeast Asia, etc.). The geo region of a resource cannot be - changed once it is created, but if an identical geo region is specified on - update, the request will succeed. - :type location: str - :param tags: Gets or sets a list of key value pairs that describe the - resource. These tags can be used for viewing and grouping this resource - (across resource groups). A maximum of 15 tags can be provided for a - resource. Each tag must have a key with a length no greater than 128 - characters and a value with a length no greater than 256 characters. - :type tags: dict[str, str] + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str :param server_certificate: Registered Server Certificate :type server_certificate: str :param agent_version: Registered Server Agent Version @@ -47,9 +46,16 @@ class RegisteredServerCreateParameters(Model): :type friendly_name: str """ + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + _attribute_map = { - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, 'server_certificate': {'key': 'properties.serverCertificate', 'type': 'str'}, 'agent_version': {'key': 'properties.agentVersion', 'type': 'str'}, 'server_os_version': {'key': 'properties.serverOSVersion', 'type': 'str'}, @@ -63,8 +69,6 @@ class RegisteredServerCreateParameters(Model): def __init__(self, **kwargs): super(RegisteredServerCreateParameters, self).__init__(**kwargs) - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) self.server_certificate = kwargs.get('server_certificate', None) self.agent_version = kwargs.get('agent_version', None) self.server_os_version = kwargs.get('server_os_version', None) diff --git a/azure-mgmt-storagesync/azure/mgmt/storagesync/models/registered_server_create_parameters_py3.py b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/registered_server_create_parameters_py3.py index 0f9140055548..1ca4e7e3da5c 100644 --- a/azure-mgmt-storagesync/azure/mgmt/storagesync/models/registered_server_create_parameters_py3.py +++ b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/registered_server_create_parameters_py3.py @@ -9,24 +9,23 @@ # regenerated. # -------------------------------------------------------------------------- -from msrest.serialization import Model +from .proxy_resource_py3 import ProxyResource -class RegisteredServerCreateParameters(Model): - """The parameters used when creating a storage sync service. +class RegisteredServerCreateParameters(ProxyResource): + """The parameters used when creating a registered server. - :param location: Required. Gets or sets the location of the resource. This - will be one of the supported and registered Azure Geo Regions (e.g. West - US, East US, Southeast Asia, etc.). The geo region of a resource cannot be - changed once it is created, but if an identical geo region is specified on - update, the request will succeed. - :type location: str - :param tags: Gets or sets a list of key value pairs that describe the - resource. These tags can be used for viewing and grouping this resource - (across resource groups). A maximum of 15 tags can be provided for a - resource. Each tag must have a key with a length no greater than 128 - characters and a value with a length no greater than 256 characters. - :type tags: dict[str, str] + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str :param server_certificate: Registered Server Certificate :type server_certificate: str :param agent_version: Registered Server Agent Version @@ -47,9 +46,16 @@ class RegisteredServerCreateParameters(Model): :type friendly_name: str """ + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + _attribute_map = { - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, 'server_certificate': {'key': 'properties.serverCertificate', 'type': 'str'}, 'agent_version': {'key': 'properties.agentVersion', 'type': 'str'}, 'server_os_version': {'key': 'properties.serverOSVersion', 'type': 'str'}, @@ -61,10 +67,8 @@ class RegisteredServerCreateParameters(Model): 'friendly_name': {'key': 'properties.friendlyName', 'type': 'str'}, } - def __init__(self, *, location: str=None, tags=None, server_certificate: str=None, agent_version: str=None, server_os_version: str=None, last_heart_beat: str=None, server_role: str=None, cluster_id: str=None, cluster_name: str=None, server_id: str=None, friendly_name: str=None, **kwargs) -> None: + def __init__(self, *, server_certificate: str=None, agent_version: str=None, server_os_version: str=None, last_heart_beat: str=None, server_role: str=None, cluster_id: str=None, cluster_name: str=None, server_id: str=None, friendly_name: str=None, **kwargs) -> None: super(RegisteredServerCreateParameters, self).__init__(**kwargs) - self.location = location - self.tags = tags self.server_certificate = server_certificate self.agent_version = agent_version self.server_os_version = server_os_version diff --git a/azure-mgmt-storagesync/azure/mgmt/storagesync/models/registered_server_py3.py b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/registered_server_py3.py index 5499399a4806..78172e801739 100644 --- a/azure-mgmt-storagesync/azure/mgmt/storagesync/models/registered_server_py3.py +++ b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/registered_server_py3.py @@ -9,10 +9,10 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource_py3 import Resource +from .proxy_resource_py3 import ProxyResource -class RegisteredServer(Resource): +class RegisteredServer(ProxyResource): """Registered Server resource. Variables are only populated by the server, and will be ignored when diff --git a/azure-mgmt-storagesync/azure/mgmt/storagesync/models/server_endpoint.py b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/server_endpoint.py index b8e799f070aa..fec610a958f4 100644 --- a/azure-mgmt-storagesync/azure/mgmt/storagesync/models/server_endpoint.py +++ b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/server_endpoint.py @@ -9,10 +9,10 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .proxy_resource import ProxyResource -class ServerEndpoint(Resource): +class ServerEndpoint(ProxyResource): """Server Endpoint object. Variables are only populated by the server, and will be ignored when @@ -33,6 +33,8 @@ class ServerEndpoint(Resource): :param volume_free_space_percent: Level of free space to be maintained by Cloud Tiering if it is enabled. :type volume_free_space_percent: int + :param tier_files_older_than_days: Tier files older than days. + :type tier_files_older_than_days: int :param friendly_name: Friendly Name :type friendly_name: str :param server_resource_id: Server Resource Id. @@ -52,6 +54,7 @@ class ServerEndpoint(Resource): 'name': {'readonly': True}, 'type': {'readonly': True}, 'volume_free_space_percent': {'maximum': 100, 'minimum': 0}, + 'tier_files_older_than_days': {'maximum': 2147483647, 'minimum': 0}, } _attribute_map = { @@ -61,6 +64,7 @@ class ServerEndpoint(Resource): 'server_local_path': {'key': 'properties.serverLocalPath', 'type': 'str'}, 'cloud_tiering': {'key': 'properties.cloudTiering', 'type': 'str'}, 'volume_free_space_percent': {'key': 'properties.volumeFreeSpacePercent', 'type': 'int'}, + 'tier_files_older_than_days': {'key': 'properties.tierFilesOlderThanDays', 'type': 'int'}, 'friendly_name': {'key': 'properties.friendlyName', 'type': 'str'}, 'server_resource_id': {'key': 'properties.serverResourceId', 'type': 'str'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, @@ -74,6 +78,7 @@ def __init__(self, **kwargs): self.server_local_path = kwargs.get('server_local_path', None) self.cloud_tiering = kwargs.get('cloud_tiering', None) self.volume_free_space_percent = kwargs.get('volume_free_space_percent', None) + self.tier_files_older_than_days = kwargs.get('tier_files_older_than_days', None) self.friendly_name = kwargs.get('friendly_name', None) self.server_resource_id = kwargs.get('server_resource_id', None) self.provisioning_state = kwargs.get('provisioning_state', None) diff --git a/azure-mgmt-storagesync/azure/mgmt/storagesync/models/server_endpoint_create_parameters.py b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/server_endpoint_create_parameters.py index a96b07deded3..5fb20a4691c0 100644 --- a/azure-mgmt-storagesync/azure/mgmt/storagesync/models/server_endpoint_create_parameters.py +++ b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/server_endpoint_create_parameters.py @@ -9,24 +9,23 @@ # regenerated. # -------------------------------------------------------------------------- -from msrest.serialization import Model +from .proxy_resource import ProxyResource -class ServerEndpointCreateParameters(Model): - """The parameters used when creating a storage sync service. +class ServerEndpointCreateParameters(ProxyResource): + """The parameters used when creating a server endpoint. - :param location: Required. Gets or sets the location of the resource. This - will be one of the supported and registered Azure Geo Regions (e.g. West - US, East US, Southeast Asia, etc.). The geo region of a resource cannot be - changed once it is created, but if an identical geo region is specified on - update, the request will succeed. - :type location: str - :param tags: Gets or sets a list of key value pairs that describe the - resource. These tags can be used for viewing and grouping this resource - (across resource groups). A maximum of 15 tags can be provided for a - resource. Each tag must have a key with a length no greater than 128 - characters and a value with a length no greater than 256 characters. - :type tags: dict[str, str] + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str :param server_local_path: Server Local path. :type server_local_path: str :param cloud_tiering: Cloud Tiering. Possible values include: 'on', 'off' @@ -34,6 +33,8 @@ class ServerEndpointCreateParameters(Model): :param volume_free_space_percent: Level of free space to be maintained by Cloud Tiering if it is enabled. :type volume_free_space_percent: int + :param tier_files_older_than_days: Tier files older than days. + :type tier_files_older_than_days: int :param friendly_name: Friendly Name :type friendly_name: str :param server_resource_id: Server Resource Id. @@ -41,25 +42,30 @@ class ServerEndpointCreateParameters(Model): """ _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, 'volume_free_space_percent': {'maximum': 100, 'minimum': 0}, + 'tier_files_older_than_days': {'maximum': 2147483647, 'minimum': 0}, } _attribute_map = { - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, 'server_local_path': {'key': 'properties.serverLocalPath', 'type': 'str'}, 'cloud_tiering': {'key': 'properties.cloudTiering', 'type': 'str'}, 'volume_free_space_percent': {'key': 'properties.volumeFreeSpacePercent', 'type': 'int'}, + 'tier_files_older_than_days': {'key': 'properties.tierFilesOlderThanDays', 'type': 'int'}, 'friendly_name': {'key': 'properties.friendlyName', 'type': 'str'}, 'server_resource_id': {'key': 'properties.serverResourceId', 'type': 'str'}, } def __init__(self, **kwargs): super(ServerEndpointCreateParameters, self).__init__(**kwargs) - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) self.server_local_path = kwargs.get('server_local_path', None) self.cloud_tiering = kwargs.get('cloud_tiering', None) self.volume_free_space_percent = kwargs.get('volume_free_space_percent', None) + self.tier_files_older_than_days = kwargs.get('tier_files_older_than_days', None) self.friendly_name = kwargs.get('friendly_name', None) self.server_resource_id = kwargs.get('server_resource_id', None) diff --git a/azure-mgmt-storagesync/azure/mgmt/storagesync/models/server_endpoint_create_parameters_py3.py b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/server_endpoint_create_parameters_py3.py index 3c6da44af327..a9182e63ee4b 100644 --- a/azure-mgmt-storagesync/azure/mgmt/storagesync/models/server_endpoint_create_parameters_py3.py +++ b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/server_endpoint_create_parameters_py3.py @@ -9,24 +9,23 @@ # regenerated. # -------------------------------------------------------------------------- -from msrest.serialization import Model +from .proxy_resource_py3 import ProxyResource -class ServerEndpointCreateParameters(Model): - """The parameters used when creating a storage sync service. +class ServerEndpointCreateParameters(ProxyResource): + """The parameters used when creating a server endpoint. - :param location: Required. Gets or sets the location of the resource. This - will be one of the supported and registered Azure Geo Regions (e.g. West - US, East US, Southeast Asia, etc.). The geo region of a resource cannot be - changed once it is created, but if an identical geo region is specified on - update, the request will succeed. - :type location: str - :param tags: Gets or sets a list of key value pairs that describe the - resource. These tags can be used for viewing and grouping this resource - (across resource groups). A maximum of 15 tags can be provided for a - resource. Each tag must have a key with a length no greater than 128 - characters and a value with a length no greater than 256 characters. - :type tags: dict[str, str] + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str :param server_local_path: Server Local path. :type server_local_path: str :param cloud_tiering: Cloud Tiering. Possible values include: 'on', 'off' @@ -34,6 +33,8 @@ class ServerEndpointCreateParameters(Model): :param volume_free_space_percent: Level of free space to be maintained by Cloud Tiering if it is enabled. :type volume_free_space_percent: int + :param tier_files_older_than_days: Tier files older than days. + :type tier_files_older_than_days: int :param friendly_name: Friendly Name :type friendly_name: str :param server_resource_id: Server Resource Id. @@ -41,25 +42,30 @@ class ServerEndpointCreateParameters(Model): """ _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, 'volume_free_space_percent': {'maximum': 100, 'minimum': 0}, + 'tier_files_older_than_days': {'maximum': 2147483647, 'minimum': 0}, } _attribute_map = { - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, 'server_local_path': {'key': 'properties.serverLocalPath', 'type': 'str'}, 'cloud_tiering': {'key': 'properties.cloudTiering', 'type': 'str'}, 'volume_free_space_percent': {'key': 'properties.volumeFreeSpacePercent', 'type': 'int'}, + 'tier_files_older_than_days': {'key': 'properties.tierFilesOlderThanDays', 'type': 'int'}, 'friendly_name': {'key': 'properties.friendlyName', 'type': 'str'}, 'server_resource_id': {'key': 'properties.serverResourceId', 'type': 'str'}, } - def __init__(self, *, location: str=None, tags=None, server_local_path: str=None, cloud_tiering=None, volume_free_space_percent: int=None, friendly_name: str=None, server_resource_id: str=None, **kwargs) -> None: + def __init__(self, *, server_local_path: str=None, cloud_tiering=None, volume_free_space_percent: int=None, tier_files_older_than_days: int=None, friendly_name: str=None, server_resource_id: str=None, **kwargs) -> None: super(ServerEndpointCreateParameters, self).__init__(**kwargs) - self.location = location - self.tags = tags self.server_local_path = server_local_path self.cloud_tiering = cloud_tiering self.volume_free_space_percent = volume_free_space_percent + self.tier_files_older_than_days = tier_files_older_than_days self.friendly_name = friendly_name self.server_resource_id = server_resource_id diff --git a/azure-mgmt-storagesync/azure/mgmt/storagesync/models/server_endpoint_py3.py b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/server_endpoint_py3.py index bc34a2c9b9f1..217d2e5cd085 100644 --- a/azure-mgmt-storagesync/azure/mgmt/storagesync/models/server_endpoint_py3.py +++ b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/server_endpoint_py3.py @@ -9,10 +9,10 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource_py3 import Resource +from .proxy_resource_py3 import ProxyResource -class ServerEndpoint(Resource): +class ServerEndpoint(ProxyResource): """Server Endpoint object. Variables are only populated by the server, and will be ignored when @@ -33,6 +33,8 @@ class ServerEndpoint(Resource): :param volume_free_space_percent: Level of free space to be maintained by Cloud Tiering if it is enabled. :type volume_free_space_percent: int + :param tier_files_older_than_days: Tier files older than days. + :type tier_files_older_than_days: int :param friendly_name: Friendly Name :type friendly_name: str :param server_resource_id: Server Resource Id. @@ -52,6 +54,7 @@ class ServerEndpoint(Resource): 'name': {'readonly': True}, 'type': {'readonly': True}, 'volume_free_space_percent': {'maximum': 100, 'minimum': 0}, + 'tier_files_older_than_days': {'maximum': 2147483647, 'minimum': 0}, } _attribute_map = { @@ -61,6 +64,7 @@ class ServerEndpoint(Resource): 'server_local_path': {'key': 'properties.serverLocalPath', 'type': 'str'}, 'cloud_tiering': {'key': 'properties.cloudTiering', 'type': 'str'}, 'volume_free_space_percent': {'key': 'properties.volumeFreeSpacePercent', 'type': 'int'}, + 'tier_files_older_than_days': {'key': 'properties.tierFilesOlderThanDays', 'type': 'int'}, 'friendly_name': {'key': 'properties.friendlyName', 'type': 'str'}, 'server_resource_id': {'key': 'properties.serverResourceId', 'type': 'str'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, @@ -69,11 +73,12 @@ class ServerEndpoint(Resource): 'sync_status': {'key': 'properties.syncStatus', 'type': 'object'}, } - def __init__(self, *, server_local_path: str=None, cloud_tiering=None, volume_free_space_percent: int=None, friendly_name: str=None, server_resource_id: str=None, provisioning_state: str=None, last_workflow_id: str=None, last_operation_name: str=None, sync_status=None, **kwargs) -> None: + def __init__(self, *, server_local_path: str=None, cloud_tiering=None, volume_free_space_percent: int=None, tier_files_older_than_days: int=None, friendly_name: str=None, server_resource_id: str=None, provisioning_state: str=None, last_workflow_id: str=None, last_operation_name: str=None, sync_status=None, **kwargs) -> None: super(ServerEndpoint, self).__init__(**kwargs) self.server_local_path = server_local_path self.cloud_tiering = cloud_tiering self.volume_free_space_percent = volume_free_space_percent + self.tier_files_older_than_days = tier_files_older_than_days self.friendly_name = friendly_name self.server_resource_id = server_resource_id self.provisioning_state = provisioning_state diff --git a/azure-mgmt-storagesync/azure/mgmt/storagesync/models/server_endpoint_update_parameters.py b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/server_endpoint_update_parameters.py index 763badfa8817..45a99cf0285d 100644 --- a/azure-mgmt-storagesync/azure/mgmt/storagesync/models/server_endpoint_update_parameters.py +++ b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/server_endpoint_update_parameters.py @@ -15,27 +15,28 @@ class ServerEndpointUpdateParameters(Model): """Parameters for updating an Server Endpoint. - :param tags: The user-specified tags associated with the server endpoint. - :type tags: dict[str, str] :param cloud_tiering: Cloud Tiering. Possible values include: 'on', 'off' :type cloud_tiering: str or ~azure.mgmt.storagesync.models.enum :param volume_free_space_percent: Level of free space to be maintained by Cloud Tiering if it is enabled. :type volume_free_space_percent: int + :param tier_files_older_than_days: Tier files older than days. + :type tier_files_older_than_days: int """ _validation = { 'volume_free_space_percent': {'maximum': 100, 'minimum': 0}, + 'tier_files_older_than_days': {'maximum': 2147483647, 'minimum': 0}, } _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, 'cloud_tiering': {'key': 'properties.cloudTiering', 'type': 'str'}, 'volume_free_space_percent': {'key': 'properties.volumeFreeSpacePercent', 'type': 'int'}, + 'tier_files_older_than_days': {'key': 'properties.tierFilesOlderThanDays', 'type': 'int'}, } def __init__(self, **kwargs): super(ServerEndpointUpdateParameters, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) self.cloud_tiering = kwargs.get('cloud_tiering', None) self.volume_free_space_percent = kwargs.get('volume_free_space_percent', None) + self.tier_files_older_than_days = kwargs.get('tier_files_older_than_days', None) diff --git a/azure-mgmt-storagesync/azure/mgmt/storagesync/models/server_endpoint_update_parameters_py3.py b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/server_endpoint_update_parameters_py3.py index b08f88ace0a0..d6e1ee73e3cf 100644 --- a/azure-mgmt-storagesync/azure/mgmt/storagesync/models/server_endpoint_update_parameters_py3.py +++ b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/server_endpoint_update_parameters_py3.py @@ -15,27 +15,28 @@ class ServerEndpointUpdateParameters(Model): """Parameters for updating an Server Endpoint. - :param tags: The user-specified tags associated with the server endpoint. - :type tags: dict[str, str] :param cloud_tiering: Cloud Tiering. Possible values include: 'on', 'off' :type cloud_tiering: str or ~azure.mgmt.storagesync.models.enum :param volume_free_space_percent: Level of free space to be maintained by Cloud Tiering if it is enabled. :type volume_free_space_percent: int + :param tier_files_older_than_days: Tier files older than days. + :type tier_files_older_than_days: int """ _validation = { 'volume_free_space_percent': {'maximum': 100, 'minimum': 0}, + 'tier_files_older_than_days': {'maximum': 2147483647, 'minimum': 0}, } _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, 'cloud_tiering': {'key': 'properties.cloudTiering', 'type': 'str'}, 'volume_free_space_percent': {'key': 'properties.volumeFreeSpacePercent', 'type': 'int'}, + 'tier_files_older_than_days': {'key': 'properties.tierFilesOlderThanDays', 'type': 'int'}, } - def __init__(self, *, tags=None, cloud_tiering=None, volume_free_space_percent: int=None, **kwargs) -> None: + def __init__(self, *, cloud_tiering=None, volume_free_space_percent: int=None, tier_files_older_than_days: int=None, **kwargs) -> None: super(ServerEndpointUpdateParameters, self).__init__(**kwargs) - self.tags = tags self.cloud_tiering = cloud_tiering self.volume_free_space_percent = volume_free_space_percent + self.tier_files_older_than_days = tier_files_older_than_days diff --git a/azure-mgmt-storagesync/azure/mgmt/storagesync/models/storage_sync_service_create_parameters.py b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/storage_sync_service_create_parameters.py index 34ef75a32907..88f1df814a2a 100644 --- a/azure-mgmt-storagesync/azure/mgmt/storagesync/models/storage_sync_service_create_parameters.py +++ b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/storage_sync_service_create_parameters.py @@ -15,11 +15,13 @@ class StorageSyncServiceCreateParameters(Model): """The parameters used when creating a storage sync service. - :param location: Required. Gets or sets the location of the resource. This - will be one of the supported and registered Azure Geo Regions (e.g. West - US, East US, Southeast Asia, etc.). The geo region of a resource cannot be - changed once it is created, but if an identical geo region is specified on - update, the request will succeed. + All required parameters must be populated in order to send to Azure. + + :param location: Required. Required. Gets or sets the location of the + resource. This will be one of the supported and registered Azure Geo + Regions (e.g. West US, East US, Southeast Asia, etc.). The geo region of a + resource cannot be changed once it is created, but if an identical geo + region is specified on update, the request will succeed. :type location: str :param tags: Gets or sets a list of key value pairs that describe the resource. These tags can be used for viewing and grouping this resource @@ -27,14 +29,22 @@ class StorageSyncServiceCreateParameters(Model): resource. Each tag must have a key with a length no greater than 128 characters and a value with a length no greater than 256 characters. :type tags: dict[str, str] + :param properties: + :type properties: object """ + _validation = { + 'location': {'required': True}, + } + _attribute_map = { 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': 'object'}, } def __init__(self, **kwargs): super(StorageSyncServiceCreateParameters, self).__init__(**kwargs) self.location = kwargs.get('location', None) self.tags = kwargs.get('tags', None) + self.properties = kwargs.get('properties', None) diff --git a/azure-mgmt-storagesync/azure/mgmt/storagesync/models/storage_sync_service_create_parameters_py3.py b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/storage_sync_service_create_parameters_py3.py index 4d7536827676..15d33d0c62f4 100644 --- a/azure-mgmt-storagesync/azure/mgmt/storagesync/models/storage_sync_service_create_parameters_py3.py +++ b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/storage_sync_service_create_parameters_py3.py @@ -15,11 +15,13 @@ class StorageSyncServiceCreateParameters(Model): """The parameters used when creating a storage sync service. - :param location: Required. Gets or sets the location of the resource. This - will be one of the supported and registered Azure Geo Regions (e.g. West - US, East US, Southeast Asia, etc.). The geo region of a resource cannot be - changed once it is created, but if an identical geo region is specified on - update, the request will succeed. + All required parameters must be populated in order to send to Azure. + + :param location: Required. Required. Gets or sets the location of the + resource. This will be one of the supported and registered Azure Geo + Regions (e.g. West US, East US, Southeast Asia, etc.). The geo region of a + resource cannot be changed once it is created, but if an identical geo + region is specified on update, the request will succeed. :type location: str :param tags: Gets or sets a list of key value pairs that describe the resource. These tags can be used for viewing and grouping this resource @@ -27,14 +29,22 @@ class StorageSyncServiceCreateParameters(Model): resource. Each tag must have a key with a length no greater than 128 characters and a value with a length no greater than 256 characters. :type tags: dict[str, str] + :param properties: + :type properties: object """ + _validation = { + 'location': {'required': True}, + } + _attribute_map = { 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': 'object'}, } - def __init__(self, *, location: str=None, tags=None, **kwargs) -> None: + def __init__(self, *, location: str, tags=None, properties=None, **kwargs) -> None: super(StorageSyncServiceCreateParameters, self).__init__(**kwargs) self.location = location self.tags = tags + self.properties = properties diff --git a/azure-mgmt-storagesync/azure/mgmt/storagesync/models/sync_group.py b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/sync_group.py index 13effc3075c2..8b483ca16437 100644 --- a/azure-mgmt-storagesync/azure/mgmt/storagesync/models/sync_group.py +++ b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/sync_group.py @@ -9,10 +9,10 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .proxy_resource import ProxyResource -class SyncGroup(Resource): +class SyncGroup(ProxyResource): """Sync Group object. Variables are only populated by the server, and will be ignored when diff --git a/azure-mgmt-storagesync/azure/mgmt/storagesync/models/sync_group_create_parameters.py b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/sync_group_create_parameters.py index 4204db4c6a25..b849f3819c7e 100644 --- a/azure-mgmt-storagesync/azure/mgmt/storagesync/models/sync_group_create_parameters.py +++ b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/sync_group_create_parameters.py @@ -9,36 +9,40 @@ # regenerated. # -------------------------------------------------------------------------- -from msrest.serialization import Model +from .proxy_resource import ProxyResource -class SyncGroupCreateParameters(Model): +class SyncGroupCreateParameters(ProxyResource): """The parameters used when creating a sync group. - :param location: Required. Gets or sets the location of the resource. This - will be one of the supported and registered Azure Geo Regions (e.g. West - US, East US, Southeast Asia, etc.). The geo region of a resource cannot be - changed once it is created, but if an identical geo region is specified on - update, the request will succeed. - :type location: str - :param tags: Gets or sets a list of key value pairs that describe the - resource. These tags can be used for viewing and grouping this resource - (across resource groups). A maximum of 15 tags can be provided for a - resource. Each tag must have a key with a length no greater than 128 - characters and a value with a length no greater than 256 characters. - :type tags: dict[str, str] + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str :param properties: The parameters used to create the sync group :type properties: object """ + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + _attribute_map = { - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, 'properties': {'key': 'properties', 'type': 'object'}, } def __init__(self, **kwargs): super(SyncGroupCreateParameters, self).__init__(**kwargs) - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) self.properties = kwargs.get('properties', None) diff --git a/azure-mgmt-storagesync/azure/mgmt/storagesync/models/sync_group_create_parameters_py3.py b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/sync_group_create_parameters_py3.py index df7745368a3a..85d13ef96c34 100644 --- a/azure-mgmt-storagesync/azure/mgmt/storagesync/models/sync_group_create_parameters_py3.py +++ b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/sync_group_create_parameters_py3.py @@ -9,36 +9,40 @@ # regenerated. # -------------------------------------------------------------------------- -from msrest.serialization import Model +from .proxy_resource_py3 import ProxyResource -class SyncGroupCreateParameters(Model): +class SyncGroupCreateParameters(ProxyResource): """The parameters used when creating a sync group. - :param location: Required. Gets or sets the location of the resource. This - will be one of the supported and registered Azure Geo Regions (e.g. West - US, East US, Southeast Asia, etc.). The geo region of a resource cannot be - changed once it is created, but if an identical geo region is specified on - update, the request will succeed. - :type location: str - :param tags: Gets or sets a list of key value pairs that describe the - resource. These tags can be used for viewing and grouping this resource - (across resource groups). A maximum of 15 tags can be provided for a - resource. Each tag must have a key with a length no greater than 128 - characters and a value with a length no greater than 256 characters. - :type tags: dict[str, str] + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str :param properties: The parameters used to create the sync group :type properties: object """ + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + _attribute_map = { - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, 'properties': {'key': 'properties', 'type': 'object'}, } - def __init__(self, *, location: str=None, tags=None, properties=None, **kwargs) -> None: + def __init__(self, *, properties=None, **kwargs) -> None: super(SyncGroupCreateParameters, self).__init__(**kwargs) - self.location = location - self.tags = tags self.properties = properties diff --git a/azure-mgmt-storagesync/azure/mgmt/storagesync/models/sync_group_py3.py b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/sync_group_py3.py index b66bc7d0f935..0c3721525fc4 100644 --- a/azure-mgmt-storagesync/azure/mgmt/storagesync/models/sync_group_py3.py +++ b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/sync_group_py3.py @@ -9,10 +9,10 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource_py3 import Resource +from .proxy_resource_py3 import ProxyResource -class SyncGroup(Resource): +class SyncGroup(ProxyResource): """Sync Group object. Variables are only populated by the server, and will be ignored when diff --git a/azure-mgmt-storagesync/azure/mgmt/storagesync/models/workflow_array.py b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/trigger_rollover_request.py similarity index 62% rename from azure-mgmt-storagesync/azure/mgmt/storagesync/models/workflow_array.py rename to azure-mgmt-storagesync/azure/mgmt/storagesync/models/trigger_rollover_request.py index 9cf745567231..aa9cffa140ad 100644 --- a/azure-mgmt-storagesync/azure/mgmt/storagesync/models/workflow_array.py +++ b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/trigger_rollover_request.py @@ -12,17 +12,17 @@ from msrest.serialization import Model -class WorkflowArray(Model): - """Array of Workflow. +class TriggerRolloverRequest(Model): + """Trigger Rollover Request. - :param value: Collection of workflow items. - :type value: list[~azure.mgmt.storagesync.models.Workflow] + :param certificate_data: Certificate Data + :type certificate_data: str """ _attribute_map = { - 'value': {'key': 'value', 'type': '[Workflow]'}, + 'certificate_data': {'key': 'certificateData', 'type': 'str'}, } def __init__(self, **kwargs): - super(WorkflowArray, self).__init__(**kwargs) - self.value = kwargs.get('value', None) + super(TriggerRolloverRequest, self).__init__(**kwargs) + self.certificate_data = kwargs.get('certificate_data', None) diff --git a/azure-mgmt-storagesync/azure/mgmt/storagesync/models/workflow_array_py3.py b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/trigger_rollover_request_py3.py similarity index 57% rename from azure-mgmt-storagesync/azure/mgmt/storagesync/models/workflow_array_py3.py rename to azure-mgmt-storagesync/azure/mgmt/storagesync/models/trigger_rollover_request_py3.py index b9c47b3c24b3..ca5243083147 100644 --- a/azure-mgmt-storagesync/azure/mgmt/storagesync/models/workflow_array_py3.py +++ b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/trigger_rollover_request_py3.py @@ -12,17 +12,17 @@ from msrest.serialization import Model -class WorkflowArray(Model): - """Array of Workflow. +class TriggerRolloverRequest(Model): + """Trigger Rollover Request. - :param value: Collection of workflow items. - :type value: list[~azure.mgmt.storagesync.models.Workflow] + :param certificate_data: Certificate Data + :type certificate_data: str """ _attribute_map = { - 'value': {'key': 'value', 'type': '[Workflow]'}, + 'certificate_data': {'key': 'certificateData', 'type': 'str'}, } - def __init__(self, *, value=None, **kwargs) -> None: - super(WorkflowArray, self).__init__(**kwargs) - self.value = value + def __init__(self, *, certificate_data: str=None, **kwargs) -> None: + super(TriggerRolloverRequest, self).__init__(**kwargs) + self.certificate_data = certificate_data diff --git a/azure-mgmt-storagesync/azure/mgmt/storagesync/models/workflow.py b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/workflow.py index f104930e4854..f77bbd7fc476 100644 --- a/azure-mgmt-storagesync/azure/mgmt/storagesync/models/workflow.py +++ b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/workflow.py @@ -9,10 +9,10 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .proxy_resource import ProxyResource -class Workflow(Resource): +class Workflow(ProxyResource): """Workflow resource. Variables are only populated by the server, and will be ignored when diff --git a/azure-mgmt-storagesync/azure/mgmt/storagesync/models/workflow_paged.py b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/workflow_paged.py new file mode 100644 index 000000000000..1eae6f26f1ba --- /dev/null +++ b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/workflow_paged.py @@ -0,0 +1,27 @@ +# 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.paging import Paged + + +class WorkflowPaged(Paged): + """ + A paging container for iterating over a list of :class:`Workflow ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Workflow]'} + } + + def __init__(self, *args, **kwargs): + + super(WorkflowPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-storagesync/azure/mgmt/storagesync/models/workflow_py3.py b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/workflow_py3.py index 870783c06b3d..1b42835730ed 100644 --- a/azure-mgmt-storagesync/azure/mgmt/storagesync/models/workflow_py3.py +++ b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/workflow_py3.py @@ -9,10 +9,10 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource_py3 import Resource +from .proxy_resource_py3 import ProxyResource -class Workflow(Resource): +class Workflow(ProxyResource): """Workflow resource. Variables are only populated by the server, and will be ignored when diff --git a/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/cloud_endpoints_operations.py b/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/cloud_endpoints_operations.py index f8f703ed0523..8b2628a8dc52 100644 --- a/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/cloud_endpoints_operations.py +++ b/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/cloud_endpoints_operations.py @@ -24,7 +24,7 @@ class CloudEndpointsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2018-04-02". + :ivar api_version: The API version to use for this operation. Constant value: "2018-07-01". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-04-02" + self.api_version = "2018-07-01" self.config = config diff --git a/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/operations.py b/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/operations.py index 647832d4f685..151e61e72e2b 100644 --- a/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/operations.py +++ b/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/operations.py @@ -22,7 +22,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: The API version to use for this operation. Constant value: "2018-04-02". + :ivar api_version: The API version to use for this operation. Constant value: "2018-07-01". """ models = models @@ -32,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-04-02" + self.api_version = "2018-07-01" self.config = config diff --git a/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/registered_servers_operations.py b/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/registered_servers_operations.py index 1cb46ff84117..18aabcb3daae 100644 --- a/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/registered_servers_operations.py +++ b/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/registered_servers_operations.py @@ -24,7 +24,7 @@ class RegisteredServersOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2018-04-02". + :ivar api_version: The API version to use for this operation. Constant value: "2018-07-01". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-04-02" + self.api_version = "2018-07-01" self.config = config @@ -396,3 +396,107 @@ 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.StorageSync/storageSyncServices/{storageSyncServiceName}/registeredServers/{serverId}'} + + + def _trigger_rollover_initial( + self, resource_group_name, storage_sync_service_name, server_id, certificate_data=None, custom_headers=None, raw=False, **operation_config): + parameters = models.TriggerRolloverRequest(certificate_data=certificate_data) + + # Construct URL + url = self.trigger_rollover.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), + 'serverId': self._serialize.url("server_id", server_id, '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', min_length=1) + + # 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(parameters, 'TriggerRolloverRequest') + + # 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 [200, 202]: + raise models.StorageSyncErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + header_dict = { + 'x-ms-request-id': 'str', + 'x-ms-correlation-request-id': 'str', + 'Location': 'str', + } + client_raw_response.add_headers(header_dict) + return client_raw_response + + def trigger_rollover( + self, resource_group_name, storage_sync_service_name, server_id, certificate_data=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Triggers Server certificate rollover. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param storage_sync_service_name: Name of Storage Sync Service + resource. + :type storage_sync_service_name: str + :param server_id: Server Id + :type server_id: str + :param certificate_data: Certificate Data + :type certificate_data: 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 None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`StorageSyncErrorException` + """ + raw_result = self._trigger_rollover_initial( + resource_group_name=resource_group_name, + storage_sync_service_name=storage_sync_service_name, + server_id=server_id, + certificate_data=certificate_data, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + client_raw_response.add_headers({ + 'x-ms-request-id': 'str', + 'x-ms-correlation-request-id': 'str', + 'Location': 'str', + }) + return client_raw_response + + 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) + trigger_rollover.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/registeredServers/{serverId}/triggerRollover'} diff --git a/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/server_endpoints_operations.py b/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/server_endpoints_operations.py index 5440e1c2edd8..4e418bb2ecd3 100644 --- a/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/server_endpoints_operations.py +++ b/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/server_endpoints_operations.py @@ -24,7 +24,7 @@ class ServerEndpointsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2018-04-02". + :ivar api_version: The API version to use for this operation. Constant value: "2018-07-01". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-04-02" + self.api_version = "2018-07-01" self.config = config diff --git a/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/storage_sync_services_operations.py b/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/storage_sync_services_operations.py index 455bf778b46a..175637ba7477 100644 --- a/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/storage_sync_services_operations.py +++ b/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/storage_sync_services_operations.py @@ -23,7 +23,7 @@ class StorageSyncServicesOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2018-04-02". + :ivar api_version: The API version to use for this operation. Constant value: "2018-07-01". """ models = models @@ -33,7 +33,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-04-02" + self.api_version = "2018-07-01" self.config = config @@ -105,7 +105,7 @@ def check_name_availability( check_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.StorageSync/locations/{locationName}/checkNameAvailability'} def create( - self, resource_group_name, storage_sync_service_name, location=None, tags=None, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, storage_sync_service_name, parameters, custom_headers=None, raw=False, **operation_config): """Create a new StorageSyncService. :param resource_group_name: The name of the resource group. The name @@ -114,19 +114,9 @@ def create( :param storage_sync_service_name: Name of Storage Sync Service resource. :type storage_sync_service_name: str - :param location: Required. Gets or sets the location of the resource. - This will be one of the supported and registered Azure Geo Regions - (e.g. West US, East US, Southeast Asia, etc.). The geo region of a - resource cannot be changed once it is created, but if an identical geo - region is specified on update, the request will succeed. - :type location: str - :param tags: Gets or sets a list of key value pairs that describe the - resource. These tags can be used for viewing and grouping this - resource (across resource groups). A maximum of 15 tags can be - provided for a resource. Each tag must have a key with a length no - greater than 128 characters and a value with a length no greater than - 256 characters. - :type tags: dict[str, str] + :param parameters: Storage Sync Service resource name. + :type parameters: + ~azure.mgmt.storagesync.models.StorageSyncServiceCreateParameters :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -138,8 +128,6 @@ def create( :raises: :class:`StorageSyncErrorException` """ - parameters = models.StorageSyncServiceCreateParameters(location=location, tags=tags) - # Construct URL url = self.create.metadata['url'] path_format_arguments = { diff --git a/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/sync_groups_operations.py b/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/sync_groups_operations.py index 5d2f03074c13..cac42c5dce67 100644 --- a/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/sync_groups_operations.py +++ b/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/sync_groups_operations.py @@ -22,7 +22,7 @@ class SyncGroupsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2018-04-02". + :ivar api_version: The API version to use for this operation. Constant value: "2018-07-01". """ models = models @@ -32,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-04-02" + self.api_version = "2018-07-01" self.config = config @@ -108,7 +108,7 @@ def internal_paging(next_link=None, raw=False): list_by_storage_sync_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups'} def create( - self, resource_group_name, storage_sync_service_name, sync_group_name, parameters, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, storage_sync_service_name, sync_group_name, properties=None, custom_headers=None, raw=False, **operation_config): """Create a new SyncGroup. :param resource_group_name: The name of the resource group. The name @@ -119,9 +119,8 @@ def create( :type storage_sync_service_name: str :param sync_group_name: Name of Sync Group resource. :type sync_group_name: str - :param parameters: Sync Group Body - :type parameters: - ~azure.mgmt.storagesync.models.SyncGroupCreateParameters + :param properties: The parameters used to create the sync group + :type properties: object :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -133,6 +132,8 @@ def create( :raises: :class:`StorageSyncErrorException` """ + parameters = models.SyncGroupCreateParameters(properties=properties) + # Construct URL url = self.create.metadata['url'] path_format_arguments = { diff --git a/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/workflows_operations.py b/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/workflows_operations.py index c2b89a18bc1d..f87d3c38472e 100644 --- a/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/workflows_operations.py +++ b/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/workflows_operations.py @@ -22,7 +22,7 @@ class WorkflowsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2018-04-02". + :ivar api_version: The API version to use for this operation. Constant value: "2018-07-01". """ models = models @@ -32,10 +32,81 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-04-02" + self.api_version = "2018-07-01" self.config = config + def list_by_storage_sync_service( + self, resource_group_name, storage_sync_service_name, custom_headers=None, raw=False, **operation_config): + """Get a Workflow List. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param storage_sync_service_name: Name of Storage Sync Service + resource. + :type storage_sync_service_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: An iterator like instance of Workflow + :rtype: + ~azure.mgmt.storagesync.models.WorkflowPaged[~azure.mgmt.storagesync.models.Workflow] + :raises: + :class:`StorageSyncErrorException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_storage_sync_service.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_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', min_length=1) + + else: + url = next_link + query_parameters = {} + + # 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]: + raise models.StorageSyncErrorException(self._deserialize, response) + + return response + + # Deserialize response + deserialized = models.WorkflowPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.WorkflowPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_storage_sync_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/workflows'} + def get( self, resource_group_name, storage_sync_service_name, workflow_id, custom_headers=None, raw=False, **operation_config): """Get Workflows resource. diff --git a/azure-mgmt-storagesync/azure/mgmt/storagesync/storage_sync_management_client.py b/azure-mgmt-storagesync/azure/mgmt/storagesync/storage_sync_management_client.py index 6128e87ae534..9f9c5713bbfc 100644 --- a/azure-mgmt-storagesync/azure/mgmt/storagesync/storage_sync_management_client.py +++ b/azure-mgmt-storagesync/azure/mgmt/storagesync/storage_sync_management_client.py @@ -91,7 +91,7 @@ def __init__( super(StorageSyncManagementClient, 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 = '2018-04-02' + self.api_version = '2018-07-01' self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) diff --git a/azure-mgmt-storagesync/azure_bdist_wheel.py b/azure-mgmt-storagesync/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/azure-mgmt-storagesync/azure_bdist_wheel.py +++ /dev/null @@ -1,54 +0,0 @@ -#------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -#-------------------------------------------------------------------------- - -from distutils import log as logger -import os.path - -from wheel.bdist_wheel import bdist_wheel -class azure_bdist_wheel(bdist_wheel): - """The purpose of this class is to build wheel a little differently than the sdist, - without requiring to build the wheel from the sdist (i.e. you can build the wheel - directly from source). - """ - - description = "Create an Azure wheel distribution" - - user_options = bdist_wheel.user_options + \ - [('azure-namespace-package=', None, - "Name of the deepest nspkg used")] - - def initialize_options(self): - bdist_wheel.initialize_options(self) - self.azure_namespace_package = None - - def finalize_options(self): - bdist_wheel.finalize_options(self) - if self.azure_namespace_package and not self.azure_namespace_package.endswith("-nspkg"): - raise ValueError("azure_namespace_package must finish by -nspkg") - - def run(self): - if not self.distribution.install_requires: - self.distribution.install_requires = [] - self.distribution.install_requires.append( - "{}>=2.0.0".format(self.azure_namespace_package)) - bdist_wheel.run(self) - - def write_record(self, bdist_dir, distinfo_dir): - if self.azure_namespace_package: - # Split and remove last part, assuming it's "nspkg" - subparts = self.azure_namespace_package.split('-')[0:-1] - folder_with_init = [os.path.join(*subparts[0:i+1]) for i in range(len(subparts))] - for azure_sub_package in folder_with_init: - init_file = os.path.join(bdist_dir, azure_sub_package, '__init__.py') - if os.path.isfile(init_file): - logger.info("manually remove {} while building the wheel".format(init_file)) - os.remove(init_file) - else: - raise ValueError("Unable to find {}. Are you sure of your namespace package?".format(init_file)) - bdist_wheel.write_record(self, bdist_dir, distinfo_dir) -cmdclass = { - 'bdist_wheel': azure_bdist_wheel, -} diff --git a/azure-mgmt-storagesync/setup.cfg b/azure-mgmt-storagesync/setup.cfg index 856f4164982c..3c6e79cf31da 100644 --- a/azure-mgmt-storagesync/setup.cfg +++ b/azure-mgmt-storagesync/setup.cfg @@ -1,3 +1,2 @@ [bdist_wheel] universal=1 -azure-namespace-package=azure-mgmt-nspkg \ No newline at end of file diff --git a/azure-mgmt-storagesync/setup.py b/azure-mgmt-storagesync/setup.py index 78fecbe70633..d84f1437c36c 100644 --- a/azure-mgmt-storagesync/setup.py +++ b/azure-mgmt-storagesync/setup.py @@ -10,12 +10,6 @@ import os.path from io import open from setuptools import find_packages, setup -try: - from azure_bdist_wheel import cmdclass -except ImportError: - from distutils import log as logger - logger.warn("Wheel is not available, disabling bdist_wheel hook") - cmdclass = {} # Change the PACKAGE_NAME only to change folder and different name PACKAGE_NAME = "azure-mgmt-storagesync" @@ -76,11 +70,18 @@ 'License :: OSI Approved :: MIT License', ], zip_safe=False, - packages=find_packages(exclude=["tests"]), + packages=find_packages(exclude=[ + 'tests', + # Exclude packages that will be covered by PEP420 or nspkg + 'azure', + 'azure.mgmt', + ]), install_requires=[ 'msrest>=0.5.0', 'msrestazure>=0.4.32,<2.0.0', 'azure-common~=1.1', ], - cmdclass=cmdclass + extras_require={ + ":python_version<'3.0'": ['azure-mgmt-nspkg'], + } )