Skip to content
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
1 change: 1 addition & 0 deletions sdk/datamigration/azure-mgmt-datamigration/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
include _meta.json
recursive-include tests *.py *.yaml
include *.md
include azure/__init__.py
Expand Down
11 changes: 11 additions & 0 deletions sdk/datamigration/azure-mgmt-datamigration/_meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"autorest": "3.4.5",
"use": [
"@autorest/[email protected]",
"@autorest/[email protected]"
],
"commit": "f0bf91845340a9faaaf798c8336c65bbfdec1de5",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest_command": "autorest specification/datamigration/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] --use=@autorest/[email protected] --version=3.4.5",
"readme": "specification/datamigration/resource-manager/readme.md"
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def __init__(

self.credential = credential
self.subscription_id = subscription_id
self.api_version = "2018-07-15-preview"
self.api_version = "2021-06-30"
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
kwargs.setdefault('sdk_moniker', 'mgmt-datamigration/{}'.format(VERSION))
self._configure(**kwargs)
Expand Down
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 DataMigrationManagementClientConfiguration
from .operations import ResourceSkusOperations
Expand Down Expand Up @@ -91,6 +92,24 @@ def __init__(
self.files = FilesOperations(
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'),
}
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
@@ -1,6 +1,6 @@
{
"chosen_version": "2018-07-15-preview",
"total_api_version_list": ["2018-07-15-preview"],
"chosen_version": "2021-06-30",
"total_api_version_list": ["2021-06-30"],
"client": {
"name": "DataMigrationManagementClient",
"filename": "_data_migration_management_client",
Expand All @@ -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\": [\"DataMigrationManagementClientConfiguration\"]}}, \"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\": [\"DataMigrationManagementClientConfiguration\"]}}, \"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\": [\"DataMigrationManagementClientConfiguration\"]}}, \"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\": [\"DataMigrationManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}"
},
"global_parameters": {
"sync": {
Expand Down Expand Up @@ -106,11 +106,5 @@
"usages": "UsagesOperations",
"operations": "Operations",
"files": "FilesOperations"
},
"operation_mixins": {
"sync_imports": "None",
"async_imports": "None",
"operations": {
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "9.0.0"
VERSION = "1.0.0b1"
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def __init__(

self.credential = credential
self.subscription_id = subscription_id
self.api_version = "2018-07-15-preview"
self.api_version = "2021-06-30"
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
kwargs.setdefault('sdk_moniker', 'mgmt-datamigration/{}'.format(VERSION))
self._configure(**kwargs)
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 @@ -88,6 +89,23 @@ def __init__(
self.files = FilesOperations(
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'),
}
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 @@ -46,7 +46,7 @@ def list(
group_name: str,
service_name: str,
project_name: str,
**kwargs
**kwargs: Any
) -> AsyncIterable["_models.FileList"]:
"""Get files in a project.

Expand All @@ -69,7 +69,7 @@ def list(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2018-07-15-preview"
api_version = "2021-06-30"
accept = "application/json"

def prepare_request(next_link=None):
Expand Down Expand Up @@ -129,7 +129,7 @@ async def get(
service_name: str,
project_name: str,
file_name: str,
**kwargs
**kwargs: Any
) -> "_models.ProjectFile":
"""Get file information.

Expand All @@ -154,7 +154,7 @@ async def get(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2018-07-15-preview"
api_version = "2021-06-30"
accept = "application/json"

# Construct URL
Expand Down Expand Up @@ -200,7 +200,7 @@ async def create_or_update(
project_name: str,
file_name: str,
parameters: "_models.ProjectFile",
**kwargs
**kwargs: Any
) -> "_models.ProjectFile":
"""Create a file resource.

Expand All @@ -226,7 +226,7 @@ async def create_or_update(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2018-07-15-preview"
api_version = "2021-06-30"
content_type = kwargs.pop("content_type", "application/json")
accept = "application/json"

Expand Down Expand Up @@ -280,7 +280,7 @@ async def delete(
service_name: str,
project_name: str,
file_name: str,
**kwargs
**kwargs: Any
) -> None:
"""Delete file.

Expand All @@ -304,7 +304,7 @@ async def delete(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2018-07-15-preview"
api_version = "2021-06-30"
accept = "application/json"

# Construct URL
Expand Down Expand Up @@ -347,7 +347,7 @@ async def update(
project_name: str,
file_name: str,
parameters: "_models.ProjectFile",
**kwargs
**kwargs: Any
) -> "_models.ProjectFile":
"""Update a file.

Expand All @@ -373,7 +373,7 @@ async def update(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2018-07-15-preview"
api_version = "2021-06-30"
content_type = kwargs.pop("content_type", "application/json")
accept = "application/json"

Expand Down Expand Up @@ -423,7 +423,7 @@ async def read(
service_name: str,
project_name: str,
file_name: str,
**kwargs
**kwargs: Any
) -> "_models.FileStorageInfo":
"""Request storage information for downloading the file content.

Expand All @@ -448,7 +448,7 @@ async def read(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2018-07-15-preview"
api_version = "2021-06-30"
accept = "application/json"

# Construct URL
Expand Down Expand Up @@ -493,7 +493,7 @@ async def read_write(
service_name: str,
project_name: str,
file_name: str,
**kwargs
**kwargs: Any
) -> "_models.FileStorageInfo":
"""Request information for reading and writing file content.

Expand All @@ -517,7 +517,7 @@ async def read_write(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2018-07-15-preview"
api_version = "2021-06-30"
accept = "application/json"

# Construct URL
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def __init__(self, client, config, serializer, deserializer) -> None:

def list(
self,
**kwargs
**kwargs: Any
) -> AsyncIterable["_models.ServiceOperationList"]:
"""Get available resource provider actions (operations).

Expand All @@ -59,7 +59,7 @@ def list(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2018-07-15-preview"
api_version = "2021-06-30"
accept = "application/json"

def prepare_request(next_link=None):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def list(
self,
group_name: str,
service_name: str,
**kwargs
**kwargs: Any
) -> AsyncIterable["_models.ProjectList"]:
"""Get projects in a service.

Expand All @@ -66,7 +66,7 @@ def list(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2018-07-15-preview"
api_version = "2021-06-30"
accept = "application/json"

def prepare_request(next_link=None):
Expand Down Expand Up @@ -125,7 +125,7 @@ async def create_or_update(
service_name: str,
project_name: str,
parameters: "_models.Project",
**kwargs
**kwargs: Any
) -> "_models.Project":
"""Create or update project.

Expand All @@ -150,7 +150,7 @@ async def create_or_update(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2018-07-15-preview"
api_version = "2021-06-30"
content_type = kwargs.pop("content_type", "application/json")
accept = "application/json"

Expand Down Expand Up @@ -202,7 +202,7 @@ async def get(
group_name: str,
service_name: str,
project_name: str,
**kwargs
**kwargs: Any
) -> "_models.Project":
"""Get project information.

Expand All @@ -225,7 +225,7 @@ async def get(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2018-07-15-preview"
api_version = "2021-06-30"
accept = "application/json"

# Construct URL
Expand Down Expand Up @@ -269,7 +269,7 @@ async def delete(
service_name: str,
project_name: str,
delete_running_tasks: Optional[bool] = None,
**kwargs
**kwargs: Any
) -> None:
"""Delete project.

Expand All @@ -294,7 +294,7 @@ async def delete(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2018-07-15-preview"
api_version = "2021-06-30"
accept = "application/json"

# Construct URL
Expand Down Expand Up @@ -337,7 +337,7 @@ async def update(
service_name: str,
project_name: str,
parameters: "_models.Project",
**kwargs
**kwargs: Any
) -> "_models.Project":
"""Update project.

Expand All @@ -362,7 +362,7 @@ async def update(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2018-07-15-preview"
api_version = "2021-06-30"
content_type = kwargs.pop("content_type", "application/json")
accept = "application/json"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def __init__(self, client, config, serializer, deserializer) -> None:

def list_skus(
self,
**kwargs
**kwargs: Any
) -> AsyncIterable["_models.ResourceSkusResult"]:
"""Get supported SKUs.

Expand All @@ -59,7 +59,7 @@ def list_skus(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2018-07-15-preview"
api_version = "2021-06-30"
accept = "application/json"

def prepare_request(next_link=None):
Expand Down
Loading