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-keyvault] Test removing azure-resource-manager-schemas #9005

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
10 changes: 5 additions & 5 deletions sdk/keyvault/azure-mgmt-keyvault/_meta.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"commit": "2608e811fafd18657b224a0d59e1c3924a534adb",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"commit": "c1ce1f98cf3fa4fe9bd8c9149e100f4d92f03353",
"repository_url": "https://github.com/test-repo-billy/azure-rest-api-specs",
"autorest": "3.10.2",
"use": [
"@autorest/python@6.15.0",
"@autorest/python@6.19.0",
"@autorest/[email protected]"
],
"autorest_command": "autorest specification/keyvault/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.15.0 --use=@autorest/[email protected] --version=3.10.2 --version-tolerant=False",
"autorest_command": "autorest specification/keyvault/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/keyvault/resource-manager/readme.md",
"package-2019-09": "2021-07-15 01:23:27 -0700 4fe5435a25386ee460ba89817465c7deba818284 Microsoft.KeyVault/stable/2019-09-01/keyvault.json",
"package-2018-02": "2020-11-03 15:27:00 -0500 111dab2fbec96b208a78b36bb8dcefd958036476 Microsoft.KeyVault/preview/2018-02-14-preview/keyvault.json",
Expand All @@ -17,5 +17,5 @@
"package-2021-10": "2023-04-10 18:34:42 -0700 33f06ff82a4c751bcbc842b7ed4da2e81b0717b6 Microsoft.KeyVault/stable/2021-10-01/managedHsm.json",
"package-2022-07": "2023-09-13 16:38:17 -0700 5dd1107d5f2be8d600325d795450e1d854fbe7e8 Microsoft.KeyVault/stable/2022-07-01/keys.json",
"package-2023-02": "2023-09-13 16:38:17 -0700 5dd1107d5f2be8d600325d795450e1d854fbe7e8 Microsoft.KeyVault/stable/2023-02-01/keysManagedHsm.json",
"package-2023-07": "2023-10-12 19:27:13 +0100 b594fd4145904c9bbd018f4a2ddea75c7134aee7 Microsoft.KeyVault/stable/2023-07-01/secrets.json"
"package-2023-07": "2024-10-08 21:18:39 -0700 8cdfce7246c52eeba3458155dfd7e5099838bd39 Microsoft.KeyVault/stable/2023-07-01/keys.json"
}
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 = "10.3.1"
VERSION = "1.0.0b1"
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
else:
from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports


class VaultsOperations(_VaultsOperations):

@distributed_trace
Expand All @@ -57,9 +58,7 @@ def list(self, top: Optional[int] = None, **kwargs: Any) -> AsyncIterable["_mode
filter: Literal["resourceType eq 'Microsoft.KeyVault/vaults'"] = kwargs.pop(
"filter", _params.pop("$filter", "resourceType eq 'Microsoft.KeyVault/vaults'")
)
api_version: Literal["2015-11-01"] = kwargs.pop(
"api_version", _params.pop("api-version", "2015-11-01")
)
api_version: Literal["2015-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-11-01"))
cls: ClsType[_models.ResourceListResult] = kwargs.pop("cls", None)

error_map: MutableMapping[int, Type[HttpResponseError]] = {
Expand Down Expand Up @@ -124,6 +123,7 @@ async def get_next(next_link=None):

return AsyncItemPaged(get_next, extract_data)


__all__: List[str] = ["VaultsOperations"] # Add all objects you want publicly available to users at this package level


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
ResourceExistsError,
ResourceNotFoundError,
ResourceNotModifiedError,
StreamClosedError,
StreamConsumedError,
map_error,
)
from azure.core.pipeline import PipelineResponse
Expand Down Expand Up @@ -211,11 +213,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)

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

if response.status_code == 201:
deserialized = self._deserialize("Vault", pipeline_response.http_response)
deserialized = self._deserialize("Vault", pipeline_response.http_response)

if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore
Expand Down Expand Up @@ -345,11 +343,7 @@ async def update(
map_error(status_code=response.status_code, response=response, error_map=error_map)
raise HttpResponseError(response=response, error_format=ARMErrorFormat)

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

if response.status_code == 201:
deserialized = self._deserialize("Vault", pipeline_response.http_response)
deserialized = self._deserialize("Vault", pipeline_response.http_response)

if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore
Expand Down Expand Up @@ -601,11 +595,7 @@ async def update_access_policy(
map_error(status_code=response.status_code, response=response, error_map=error_map)
raise HttpResponseError(response=response, error_format=ARMErrorFormat)

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

if response.status_code == 201:
deserialized = self._deserialize("VaultAccessPolicyParameters", pipeline_response.http_response)
deserialized = self._deserialize("VaultAccessPolicyParameters", pipeline_response.http_response)

if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore
Expand Down Expand Up @@ -927,6 +917,7 @@ async def _purge_deleted_initial(self, vault_name: str, location: str, **kwargs:
)
_request.url = self._client.format_url(_request.url)

_decompress = kwargs.pop("decompress", True)
_stream = True
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
_request, stream=_stream, **kwargs
Expand All @@ -935,15 +926,14 @@ async def _purge_deleted_initial(self, vault_name: str, location: str, **kwargs:
response = pipeline_response.http_response

if response.status_code not in [200, 202]:
await response.read() # Load the body in memory and close the socket
try:
await response.read() # Load the body in memory and close the socket
except (StreamConsumedError, StreamClosedError):
pass
map_error(status_code=response.status_code, response=response, error_map=error_map)
raise HttpResponseError(response=response, error_format=ARMErrorFormat)

if response.status_code == 200:
deserialized = response.stream_download(self._client._pipeline)

if response.status_code == 202:
deserialized = response.stream_download(self._client._pipeline)
deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)

if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
else:
from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports


class VaultsOperations(_VaultsOperations):
@distributed_trace
def list(self, top: Optional[int] = None, **kwargs: Any) -> Iterable["_models.Resource"]:
Expand All @@ -54,9 +55,7 @@ def list(self, top: Optional[int] = None, **kwargs: Any) -> Iterable["_models.Re
filter: Literal["resourceType eq 'Microsoft.KeyVault/vaults'"] = kwargs.pop(
"filter", _params.pop("$filter", "resourceType eq 'Microsoft.KeyVault/vaults'")
)
api_version: Literal["2015-11-01"] = kwargs.pop(
"api_version", _params.pop("api-version", "2015-11-01")
)
api_version: Literal["2015-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-11-01"))
cls: ClsType[_models.ResourceListResult] = kwargs.pop("cls", None)

error_map: MutableMapping[int, Type[HttpResponseError]] = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
ResourceExistsError,
ResourceNotFoundError,
ResourceNotModifiedError,
StreamClosedError,
StreamConsumedError,
map_error,
)
from azure.core.paging import ItemPaged
Expand Down Expand Up @@ -538,11 +540,7 @@ def create_or_update(
map_error(status_code=response.status_code, response=response, error_map=error_map)
raise HttpResponseError(response=response, error_format=ARMErrorFormat)

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

if response.status_code == 201:
deserialized = self._deserialize("Vault", pipeline_response.http_response)
deserialized = self._deserialize("Vault", pipeline_response.http_response)

if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore
Expand Down Expand Up @@ -672,11 +670,7 @@ def update(
map_error(status_code=response.status_code, response=response, error_map=error_map)
raise HttpResponseError(response=response, error_format=ARMErrorFormat)

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

if response.status_code == 201:
deserialized = self._deserialize("Vault", pipeline_response.http_response)
deserialized = self._deserialize("Vault", pipeline_response.http_response)

if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore
Expand Down Expand Up @@ -928,11 +922,7 @@ def update_access_policy(
map_error(status_code=response.status_code, response=response, error_map=error_map)
raise HttpResponseError(response=response, error_format=ARMErrorFormat)

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

if response.status_code == 201:
deserialized = self._deserialize("VaultAccessPolicyParameters", pipeline_response.http_response)
deserialized = self._deserialize("VaultAccessPolicyParameters", pipeline_response.http_response)

if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore
Expand Down Expand Up @@ -1253,6 +1243,7 @@ def _purge_deleted_initial(self, vault_name: str, location: str, **kwargs: Any)
)
_request.url = self._client.format_url(_request.url)

_decompress = kwargs.pop("decompress", True)
_stream = True
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
_request, stream=_stream, **kwargs
Expand All @@ -1261,15 +1252,14 @@ def _purge_deleted_initial(self, vault_name: str, location: str, **kwargs: Any)
response = pipeline_response.http_response

if response.status_code not in [200, 202]:
response.read() # Load the body in memory and close the socket
try:
response.read() # Load the body in memory and close the socket
except (StreamConsumedError, StreamClosedError):
pass
map_error(status_code=response.status_code, response=response, error_map=error_map)
raise HttpResponseError(response=response, error_format=ARMErrorFormat)

if response.status_code == 200:
deserialized = response.stream_download(self._client._pipeline)

if response.status_code == 202:
deserialized = response.stream_download(self._client._pipeline)
deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)

if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore
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 = "10.3.1"
VERSION = "1.0.0b1"
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
else:
from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports


class VaultsOperations(_VaultsOperations):

@distributed_trace
Expand All @@ -57,9 +58,7 @@ def list(self, top: Optional[int] = None, **kwargs: Any) -> AsyncIterable["_mode
filter: Literal["resourceType eq 'Microsoft.KeyVault/vaults'"] = kwargs.pop(
"filter", _params.pop("$filter", "resourceType eq 'Microsoft.KeyVault/vaults'")
)
api_version: Literal["2015-11-01"] = kwargs.pop(
"api_version", _params.pop("api-version", "2015-11-01")
)
api_version: Literal["2015-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-11-01"))
cls: ClsType[_models.ResourceListResult] = kwargs.pop("cls", None)

error_map: MutableMapping[int, Type[HttpResponseError]] = {
Expand Down Expand Up @@ -124,6 +123,7 @@ async def get_next(next_link=None):

return AsyncItemPaged(get_next, extract_data)


__all__: List[str] = ["VaultsOperations"] # Add all objects you want publicly available to users at this package level


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
ResourceExistsError,
ResourceNotFoundError,
ResourceNotModifiedError,
StreamClosedError,
StreamConsumedError,
map_error,
)
from azure.core.pipeline import PipelineResponse
Expand Down Expand Up @@ -296,6 +298,7 @@ async def _delete_initial(
)
_request.url = self._client.format_url(_request.url)

_decompress = kwargs.pop("decompress", True)
_stream = True
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
_request, stream=_stream, **kwargs
Expand All @@ -304,22 +307,19 @@ async def _delete_initial(
response = pipeline_response.http_response

if response.status_code not in [200, 202, 204]:
await response.read() # Load the body in memory and close the socket
try:
await response.read() # Load the body in memory and close the socket
except (StreamConsumedError, StreamClosedError):
pass
map_error(status_code=response.status_code, response=response, error_map=error_map)
raise HttpResponseError(response=response, error_format=ARMErrorFormat)

response_headers = {}
if response.status_code == 200:
deserialized = response.stream_download(self._client._pipeline)

if response.status_code == 202:
response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))

deserialized = response.stream_download(self._client._pipeline)

if response.status_code == 204:
deserialized = response.stream_download(self._client._pipeline)
deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)

if cls:
return cls(pipeline_response, deserialized, response_headers) # type: ignore
Expand Down
Loading