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 azure-mgmt-datafactory] [test tsp breakingchange] 09 change both tsp and swagger #9126

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/datafactory/azure-mgmt-datafactory/_meta.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"commit": "471fbc404548c3c6611833680dbbeefcc010e201",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"commit": "988d78cda7f7f3af632cdb4ca1c46ec25d4da018",
"repository_url": "https://github.com/test-repo-billy/azure-rest-api-specs",
"autorest": "3.10.2",
"use": [
"@autorest/python@6.17.0",
"@autorest/python@6.19.0",
"@autorest/[email protected]"
],
"autorest_command": "autorest specification/datafactory/resource-manager/readme.md --generate-sample=True --generate-test=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --use=@autorest/python@6.17.0 --use=@autorest/[email protected] --version=3.10.2 --version-tolerant=False",
"autorest_command": "autorest specification/datafactory/resource-manager/readme.md --generate-sample=True --generate-test=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-python/sdk --use=@autorest/python@6.19.0 --use=@autorest/[email protected] --version=3.10.2 --version-tolerant=False",
"readme": "specification/datafactory/resource-manager/readme.md"
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
LinkedServicesOperations,
ManagedPrivateEndpointsOperations,
ManagedVirtualNetworksOperations,
Operations,
PipelineRunsOperations,
PipelinesOperations,
PrivateEndPointConnectionsOperations,
Expand All @@ -53,8 +52,6 @@ class DataFactoryManagementClient: # pylint: disable=client-accepts-api-version
"""The Azure Data Factory V2 management API provides a RESTful set of web services that interact
with Azure Data Factory V2 services.

:ivar operations: Operations operations
:vartype operations: azure.mgmt.datafactory.operations.Operations
:ivar factories: FactoriesOperations operations
:vartype factories: azure.mgmt.datafactory.operations.FactoriesOperations
:ivar exposure_control: ExposureControlOperations operations
Expand Down Expand Up @@ -156,7 +153,6 @@ def __init__(
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)
self._serialize.client_side_validation = False
self.operations = Operations(self._client, self._config, self._serialize, self._deserialize)
self.factories = FactoriesOperations(self._client, self._config, self._serialize, self._deserialize)
self.exposure_control = ExposureControlOperations(
self._client, self._config, self._serialize, self._deserialize
Expand Down
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.0"
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
LinkedServicesOperations,
ManagedPrivateEndpointsOperations,
ManagedVirtualNetworksOperations,
Operations,
PipelineRunsOperations,
PipelinesOperations,
PrivateEndPointConnectionsOperations,
Expand All @@ -53,8 +52,6 @@ class DataFactoryManagementClient: # pylint: disable=client-accepts-api-version
"""The Azure Data Factory V2 management API provides a RESTful set of web services that interact
with Azure Data Factory V2 services.

:ivar operations: Operations operations
:vartype operations: azure.mgmt.datafactory.aio.operations.Operations
:ivar factories: FactoriesOperations operations
:vartype factories: azure.mgmt.datafactory.aio.operations.FactoriesOperations
:ivar exposure_control: ExposureControlOperations operations
Expand Down Expand Up @@ -157,7 +154,6 @@ def __init__(
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)
self._serialize.client_side_validation = False
self.operations = Operations(self._client, self._config, self._serialize, self._deserialize)
self.factories = FactoriesOperations(self._client, self._config, self._serialize, self._deserialize)
self.exposure_control = ExposureControlOperations(
self._client, self._config, self._serialize, self._deserialize
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

from ._operations import Operations
from ._factories_operations import FactoriesOperations
from ._exposure_control_operations import ExposureControlOperations
from ._integration_runtimes_operations import IntegrationRuntimesOperations
Expand Down Expand Up @@ -35,7 +34,6 @@
from ._patch import patch_sdk as _patch_sdk

__all__ = [
"Operations",
"FactoriesOperations",
"ExposureControlOperations",
"IntegrationRuntimesOperations",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
build_get_git_hub_access_token_request,
build_get_request,
build_list_by_resource_group_request,
build_list_request,
build_update_request,
)

Expand Down Expand Up @@ -67,80 +66,6 @@ def __init__(self, *args, **kwargs) -> None:
self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")

@distributed_trace
def list(self, **kwargs: Any) -> AsyncIterable["_models.Factory"]:
"""Lists factories under the specified subscription.

:return: An iterator like instance of either Factory or the result of cls(response)
:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.datafactory.models.Factory]
:raises ~azure.core.exceptions.HttpResponseError:
"""
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})

api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.FactoryListResponse] = kwargs.pop("cls", None)

error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
304: ResourceNotModifiedError,
}
error_map.update(kwargs.pop("error_map", {}) or {})

def prepare_request(next_link=None):
if not next_link:

_request = build_list_request(
subscription_id=self._config.subscription_id,
api_version=api_version,
headers=_headers,
params=_params,
)
_request.url = self._client.format_url(_request.url)

else:
# make call to next link with the client's api-version
_parsed_next_link = urllib.parse.urlparse(next_link)
_next_request_params = case_insensitive_dict(
{
key: [urllib.parse.quote(v) for v in value]
for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
}
)
_next_request_params["api-version"] = self._config.api_version
_request = HttpRequest(
"GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
)
_request.url = self._client.format_url(_request.url)
_request.method = "GET"
return _request

async def extract_data(pipeline_response):
deserialized = self._deserialize("FactoryListResponse", pipeline_response)
list_of_elem = deserialized.value
if cls:
list_of_elem = cls(list_of_elem) # type: ignore
return deserialized.next_link or None, AsyncList(list_of_elem)

async def get_next(next_link=None):
_request = prepare_request(next_link)

_stream = False
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
_request, stream=_stream, **kwargs
)
response = pipeline_response.http_response

if response.status_code not in [200]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
raise HttpResponseError(response=response, error_format=ARMErrorFormat)

return pipeline_response

return AsyncItemPaged(get_next, extract_data)

@overload
async def configure_factory_repo(
self,
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,9 @@
from ._models_py3 import HubspotLinkedService
from ._models_py3 import HubspotObjectDataset
from ._models_py3 import HubspotSource
from ._models_py3 import IcebergDataset
from ._models_py3 import IcebergSink
from ._models_py3 import IcebergWriteSettings
from ._models_py3 import IfConditionActivity
from ._models_py3 import ImpalaLinkedService
from ._models_py3 import ImpalaObjectDataset
Expand Down Expand Up @@ -1271,6 +1274,9 @@
"HubspotLinkedService",
"HubspotObjectDataset",
"HubspotSource",
"IcebergDataset",
"IcebergSink",
"IcebergWriteSettings",
"IfConditionActivity",
"ImpalaLinkedService",
"ImpalaObjectDataset",
Expand Down
Loading