Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoPR track2_azure-mgmt-storagesync] [StorageSync] Publish 2020-09-01 as stable API version #5589

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions sdk/storage/azure-mgmt-storagesync/_meta.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"autorest": "3.0.6369",
"use": "@autorest/[email protected].2",
"commit": "18ed65c7581a1142c0015451e4d61ef0a3797268",
"autorest": "3.4.2",
"use": "@autorest/[email protected].6",
"commit": "eb36e2fa32a0922429c0962e3e15d6c2d508d2f9",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest_command": "autorest specification/storagesync/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/[email protected].2 --version=3.0.6369",
"autorest_command": "autorest specification/storagesync/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/[email protected].6 --version=3.4.2",
"readme": "specification/storagesync/resource-manager/readme.md"
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
"azure_arm": true,
"has_lro_operations": true,
"client_side_validation": false,
"sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MicrosoftStorageSyncConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}",
"async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MicrosoftStorageSyncConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}"
"sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MicrosoftStorageSyncConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}",
"async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MicrosoftStorageSyncConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}"
},
"global_parameters": {
"sync": {
Expand Down Expand Up @@ -108,11 +108,5 @@
"registered_servers": "RegisteredServersOperations",
"workflows": "WorkflowsOperations",
"operation_status": "OperationStatusOperations"
},
"operation_mixins": {
"sync_imports": "None",
"async_imports": "None",
"operations": {
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
from typing import Any, Optional

from azure.core.credentials import TokenCredential
from azure.core.pipeline.transport import HttpRequest, HttpResponse

from ._configuration import MicrosoftStorageSyncConfiguration
from .operations import Operations
Expand Down Expand Up @@ -101,6 +102,24 @@ def __init__(
self.operation_status = OperationStatusOperations(
self._client, self._config, self._serialize, self._deserialize)

def _send_request(self, http_request, **kwargs):
# type: (HttpRequest, Any) -> HttpResponse
"""Runs the network request through the client's chained policies.

:param http_request: The network request you want to make. Required.
:type http_request: ~azure.core.pipeline.transport.HttpRequest
:keyword bool stream: Whether the response payload will be streamed. Defaults to True.
:return: The response of your network call. Does not do error handling on your response.
:rtype: ~azure.core.pipeline.transport.HttpResponse
"""
path_format_arguments = {
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1),
}
http_request.url = self._client.format_url(http_request.url, **path_format_arguments)
stream = kwargs.pop("stream", True)
pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs)
return pipeline_response.http_response

def close(self):
# type: () -> None
self._client.close()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

from typing import Any, Optional, TYPE_CHECKING

from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest
from azure.mgmt.core import AsyncARMPipelineClient
from msrest import Deserializer, Serializer

Expand Down Expand Up @@ -98,6 +99,23 @@ def __init__(
self.operation_status = OperationStatusOperations(
self._client, self._config, self._serialize, self._deserialize)

async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse:
"""Runs the network request through the client's chained policies.

:param http_request: The network request you want to make. Required.
:type http_request: ~azure.core.pipeline.transport.HttpRequest
:keyword bool stream: Whether the response payload will be streamed. Defaults to True.
:return: The response of your network call. Does not do error handling on your response.
:rtype: ~azure.core.pipeline.transport.AsyncHttpResponse
"""
path_format_arguments = {
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1),
}
http_request.url = self._client.format_url(http_request.url, **path_format_arguments)
stream = kwargs.pop("stream", True)
pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs)
return pipeline_response.http_response

async def close(self) -> None:
await self._client.close()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@
from ._models_py3 import CheckNameAvailabilityResult
from ._models_py3 import CloudEndpoint
from ._models_py3 import CloudEndpointArray
from ._models_py3 import CloudEndpointChangeEnumerationActivity
from ._models_py3 import CloudEndpointChangeEnumerationStatus
from ._models_py3 import CloudEndpointCreateParameters
from ._models_py3 import CloudEndpointLastChangeEnumerationStatus
from ._models_py3 import CloudTieringCachePerformance
from ._models_py3 import CloudTieringDatePolicyStatus
from ._models_py3 import CloudTieringFilesNotTiering
Expand Down Expand Up @@ -80,7 +83,10 @@
from ._models import CheckNameAvailabilityResult # type: ignore
from ._models import CloudEndpoint # type: ignore
from ._models import CloudEndpointArray # type: ignore
from ._models import CloudEndpointChangeEnumerationActivity # type: ignore
from ._models import CloudEndpointChangeEnumerationStatus # type: ignore
from ._models import CloudEndpointCreateParameters # type: ignore
from ._models import CloudEndpointLastChangeEnumerationStatus # type: ignore
from ._models import CloudTieringCachePerformance # type: ignore
from ._models import CloudTieringDatePolicyStatus # type: ignore
from ._models import CloudTieringFilesNotTiering # type: ignore
Expand Down Expand Up @@ -145,9 +151,12 @@

from ._microsoft_storage_sync_enums import (
ChangeDetectionMode,
CloudEndpointChangeEnumerationActivityState,
CloudEndpointChangeEnumerationTotalCountsState,
FeatureStatus,
IncomingTrafficPolicy,
InitialDownloadPolicy,
InitialUploadPolicy,
LocalCacheMode,
NameAvailabilityReason,
OperationDirection,
Expand All @@ -169,7 +178,10 @@
'CheckNameAvailabilityResult',
'CloudEndpoint',
'CloudEndpointArray',
'CloudEndpointChangeEnumerationActivity',
'CloudEndpointChangeEnumerationStatus',
'CloudEndpointCreateParameters',
'CloudEndpointLastChangeEnumerationStatus',
'CloudTieringCachePerformance',
'CloudTieringDatePolicyStatus',
'CloudTieringFilesNotTiering',
Expand Down Expand Up @@ -232,9 +244,12 @@
'Workflow',
'WorkflowArray',
'ChangeDetectionMode',
'CloudEndpointChangeEnumerationActivityState',
'CloudEndpointChangeEnumerationTotalCountsState',
'FeatureStatus',
'IncomingTrafficPolicy',
'InitialDownloadPolicy',
'InitialUploadPolicy',
'LocalCacheMode',
'NameAvailabilityReason',
'OperationDirection',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,20 @@ class ChangeDetectionMode(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
DEFAULT = "Default"
RECURSIVE = "Recursive"

class CloudEndpointChangeEnumerationActivityState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
"""State of change enumeration activity
"""

INITIAL_ENUMERATION_IN_PROGRESS = "InitialEnumerationInProgress"
ENUMERATION_IN_PROGRESS = "EnumerationInProgress"

class CloudEndpointChangeEnumerationTotalCountsState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
"""State of the total counts of change enumeration activity
"""

CALCULATING = "Calculating"
FINAL = "Final"

class FeatureStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
"""Type of the Feature Status
"""
Expand All @@ -55,9 +69,16 @@ class InitialDownloadPolicy(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum))
NAMESPACE_THEN_MODIFIED_FILES = "NamespaceThenModifiedFiles"
AVOID_TIERED_FILES = "AvoidTieredFiles"

class InitialUploadPolicy(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
"""Policy for how the initial upload sync session is performed.
"""

SERVER_AUTHORITATIVE = "ServerAuthoritative"
MERGE = "Merge"

class LocalCacheMode(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
"""Policy for enabling follow-the-sun business models: link local cache to cloud behavior to pre-
populate before local access.
"""Policy for enabling follow-the-sun business models: link local cache to cloud behavior to
pre-populate before local access.
"""

DOWNLOAD_NEW_AND_MODIFIED_FILES = "DownloadNewAndModifiedFiles"
Expand Down
Loading