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] Swagger changes to support Vertica V2 in ADF #7526

Closed
wants to merge 1 commit into from
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
6 changes: 3 additions & 3 deletions sdk/datafactory/azure-mgmt-datafactory/_meta.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"commit": "92a02c9755fa3b2359df8dfc031babcddf6d91ba",
"commit": "6dd427f964f3a4ade0b06f6bd19e18328fc3d8d7",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest": "3.10.2",
"use": [
"@autorest/python@6.13.16",
"@autorest/python@6.15.0",
"@autorest/[email protected]"
],
"autorest_command": "autorest specification/datafactory/resource-manager/readme.md --generate-sample=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.13.16 --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.15.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 @@ -8,6 +8,7 @@

from copy import deepcopy
from typing import Any, TYPE_CHECKING
from typing_extensions import Self

from azure.core.pipeline import policies
from azure.core.rest import HttpRequest, HttpResponse
Expand Down Expand Up @@ -230,7 +231,7 @@ def _send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs:
def close(self) -> None:
self._client.close()

def __enter__(self) -> "DataFactoryManagementClient":
def __enter__(self) -> Self:
self._client.__enter__()
return self

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,8 @@ def _json_attemp(data):
# context otherwise.
_LOGGER.critical("Wasn't XML not JSON, failing")
raise DeserializationError("XML is invalid") from err
elif content_type.startswith("text/"):
return data_as_str
raise DeserializationError("Cannot deserialize content-type: {}".format(content_type))

@classmethod
Expand Down Expand Up @@ -1441,7 +1443,7 @@ def _deserialize(self, target_obj, data):
elif isinstance(response, type) and issubclass(response, Enum):
return self.deserialize_enum(data, response)

if data is None:
if data is None or data is CoreNull:
return data
try:
attributes = response._attribute_map # type: ignore
Expand Down

This file was deleted.

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 = "8.0.0"
VERSION = "1.0.0"
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

from copy import deepcopy
from typing import Any, Awaitable, TYPE_CHECKING
from typing_extensions import Self

from azure.core.pipeline import policies
from azure.core.rest import AsyncHttpResponse, HttpRequest
Expand Down Expand Up @@ -233,7 +234,7 @@ def _send_request(
async def close(self) -> None:
await self._client.close()

async def __aenter__(self) -> "DataFactoryManagementClient":
async def __aenter__(self) -> Self:
await self._client.__aenter__()
return self

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,12 @@
map_error,
)
from azure.core.pipeline import PipelineResponse
from azure.core.pipeline.transport import AsyncHttpResponse
from azure.core.rest import HttpRequest
from azure.core.rest import AsyncHttpResponse, HttpRequest
from azure.core.tracing.decorator_async import distributed_trace_async
from azure.core.utils import case_insensitive_dict
from azure.mgmt.core.exceptions import ARMErrorFormat

from ... import models as _models
from ..._vendor import _convert_request
from ...operations._activity_runs_operations import build_query_by_pipeline_run_request

if sys.version_info >= (3, 9):
Expand Down Expand Up @@ -173,7 +171,6 @@ async def query_by_pipeline_run(
headers=_headers,
params=_params,
)
_request = _convert_request(_request)
_request.url = self._client.format_url(_request.url)

_stream = False
Expand All @@ -187,7 +184,7 @@ async def query_by_pipeline_run(
map_error(status_code=response.status_code, response=response, error_map=error_map)
raise HttpResponseError(response=response, error_format=ARMErrorFormat)

deserialized = self._deserialize("ActivityRunsQueryResponse", pipeline_response)
deserialized = self._deserialize("ActivityRunsQueryResponse", pipeline_response.http_response)

if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,13 @@
map_error,
)
from azure.core.pipeline import PipelineResponse
from azure.core.pipeline.transport import AsyncHttpResponse
from azure.core.rest import HttpRequest
from azure.core.rest import AsyncHttpResponse, HttpRequest
from azure.core.tracing.decorator import distributed_trace
from azure.core.tracing.decorator_async import distributed_trace_async
from azure.core.utils import case_insensitive_dict
from azure.mgmt.core.exceptions import ARMErrorFormat

from ... import models as _models
from ..._vendor import _convert_request
from ...operations._change_data_capture_operations import (
build_create_or_update_request,
build_delete_request,
Expand Down Expand Up @@ -108,7 +106,6 @@ def prepare_request(next_link=None):
headers=_headers,
params=_params,
)
_request = _convert_request(_request)
_request.url = self._client.format_url(_request.url)

else:
Expand All @@ -124,7 +121,6 @@ def prepare_request(next_link=None):
_request = HttpRequest(
"GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
)
_request = _convert_request(_request)
_request.url = self._client.format_url(_request.url)
_request.method = "GET"
return _request
Expand Down Expand Up @@ -287,7 +283,6 @@ async def create_or_update(
headers=_headers,
params=_params,
)
_request = _convert_request(_request)
_request.url = self._client.format_url(_request.url)

_stream = False
Expand All @@ -301,7 +296,7 @@ async def create_or_update(
map_error(status_code=response.status_code, response=response, error_map=error_map)
raise HttpResponseError(response=response, error_format=ARMErrorFormat)

deserialized = self._deserialize("ChangeDataCaptureResource", pipeline_response)
deserialized = self._deserialize("ChangeDataCaptureResource", pipeline_response.http_response)

if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore
Expand Down Expand Up @@ -357,7 +352,6 @@ async def get(
headers=_headers,
params=_params,
)
_request = _convert_request(_request)
_request.url = self._client.format_url(_request.url)

_stream = False
Expand All @@ -371,7 +365,7 @@ async def get(
map_error(status_code=response.status_code, response=response, error_map=error_map)
raise HttpResponseError(response=response, error_format=ARMErrorFormat)

deserialized = self._deserialize("ChangeDataCaptureResource", pipeline_response)
deserialized = self._deserialize("ChangeDataCaptureResource", pipeline_response.http_response)

if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore
Expand Down Expand Up @@ -417,7 +411,6 @@ async def delete( # pylint: disable=inconsistent-return-statements
headers=_headers,
params=_params,
)
_request = _convert_request(_request)
_request.url = self._client.format_url(_request.url)

_stream = False
Expand Down Expand Up @@ -473,7 +466,6 @@ async def start( # pylint: disable=inconsistent-return-statements
headers=_headers,
params=_params,
)
_request = _convert_request(_request)
_request.url = self._client.format_url(_request.url)

_stream = False
Expand Down Expand Up @@ -529,7 +521,6 @@ async def stop( # pylint: disable=inconsistent-return-statements
headers=_headers,
params=_params,
)
_request = _convert_request(_request)
_request.url = self._client.format_url(_request.url)

_stream = False
Expand Down Expand Up @@ -585,7 +576,6 @@ async def status(
headers=_headers,
params=_params,
)
_request = _convert_request(_request)
_request.url = self._client.format_url(_request.url)

_stream = False
Expand All @@ -599,7 +589,7 @@ async def status(
map_error(status_code=response.status_code, response=response, error_map=error_map)
raise HttpResponseError(response=response, error_format=ARMErrorFormat)

deserialized = self._deserialize("str", pipeline_response)
deserialized = self._deserialize("str", pipeline_response.http_response)

if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,13 @@
map_error,
)
from azure.core.pipeline import PipelineResponse
from azure.core.pipeline.transport import AsyncHttpResponse
from azure.core.rest import HttpRequest
from azure.core.rest import AsyncHttpResponse, HttpRequest
from azure.core.tracing.decorator import distributed_trace
from azure.core.tracing.decorator_async import distributed_trace_async
from azure.core.utils import case_insensitive_dict
from azure.mgmt.core.exceptions import ARMErrorFormat

from ... import models as _models
from ..._vendor import _convert_request
from ...operations._credential_operations_operations import (
build_create_or_update_request,
build_delete_request,
Expand Down Expand Up @@ -104,7 +102,6 @@ def prepare_request(next_link=None):
headers=_headers,
params=_params,
)
_request = _convert_request(_request)
_request.url = self._client.format_url(_request.url)

else:
Expand All @@ -120,7 +117,6 @@ def prepare_request(next_link=None):
_request = HttpRequest(
"GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
)
_request = _convert_request(_request)
_request.url = self._client.format_url(_request.url)
_request.method = "GET"
return _request
Expand Down Expand Up @@ -279,7 +275,6 @@ async def create_or_update(
headers=_headers,
params=_params,
)
_request = _convert_request(_request)
_request.url = self._client.format_url(_request.url)

_stream = False
Expand All @@ -293,7 +288,7 @@ async def create_or_update(
map_error(status_code=response.status_code, response=response, error_map=error_map)
raise HttpResponseError(response=response, error_format=ARMErrorFormat)

deserialized = self._deserialize("CredentialResource", pipeline_response)
deserialized = self._deserialize("CredentialResource", pipeline_response.http_response)

if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore
Expand Down Expand Up @@ -349,7 +344,6 @@ async def get(
headers=_headers,
params=_params,
)
_request = _convert_request(_request)
_request.url = self._client.format_url(_request.url)

_stream = False
Expand All @@ -365,7 +359,7 @@ async def get(

deserialized = None
if response.status_code == 200:
deserialized = self._deserialize("CredentialResource", pipeline_response)
deserialized = self._deserialize("CredentialResource", pipeline_response.http_response)

if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore
Expand Down Expand Up @@ -411,7 +405,6 @@ async def delete( # pylint: disable=inconsistent-return-statements
headers=_headers,
params=_params,
)
_request = _convert_request(_request)
_request.url = self._client.format_url(_request.url)

_stream = False
Expand Down
Loading