Skip to content

Commit

Permalink
CodeGen from PR 24490 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
AVS API 2023-03-01 (Azure#24490)

* cp -r 2022-05-01 2023-03-01

* set version as 2023-03-01

* changes

* switch back to v1 ErrorResponse

* must not use two differert ErrorResponse types

* use v5 ErrorResponse (#4)

* remove sku changes

* #/definitions/Sku

* remove old readme block

* remove skus.json

* add patterns for resource names
ported from https://github.com/Azure/azure-rest-api-specs-pr/pull/11127
  • Loading branch information
SDKAuto committed Aug 4, 2023
1 parent 3a6c7f4 commit a2854c9
Show file tree
Hide file tree
Showing 149 changed files with 2,132 additions and 2,303 deletions.
10 changes: 5 additions & 5 deletions sdk/compute/azure-mgmt-avs/_meta.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"commit": "f38115ac455af89493b0a0719d9a987404560dda",
"commit": "0baf811c3c76c87b3c127d098519bd97141222dd",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest": "3.9.2",
"autorest": "3.9.7",
"use": [
"@autorest/python@6.2.7",
"@autorest/modelerfour@4.24.3"
"@autorest/python@6.7.1",
"@autorest/modelerfour@4.26.2"
],
"autorest_command": "autorest specification/vmware/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.2.7 --use=@autorest/modelerfour@4.24.3 --version=3.9.2 --version-tolerant=False",
"autorest_command": "autorest specification/vmware/resource-manager/readme.md --generate-sample=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.7.1 --use=@autorest/modelerfour@4.26.2 --version=3.9.7 --version-tolerant=False",
"readme": "specification/vmware/resource-manager/readme.md"
}
6 changes: 3 additions & 3 deletions sdk/compute/azure-mgmt-avs/azure/mgmt/avs/_avs_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class AVSClient: # pylint: disable=client-accepts-api-version-keyword,too-many-
:type subscription_id: str
:param base_url: Service URL. Default value is "https://management.azure.com".
:type base_url: str
:keyword api_version: Api Version. Default value is "2022-05-01". Note that overriding this
:keyword api_version: Api Version. Default value is "2023-03-01". Note that overriding this
default value may result in unsupported behavior.
:paramtype api_version: str
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
Expand All @@ -95,7 +95,7 @@ def __init__(
**kwargs: Any
) -> None:
self._config = AVSClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs)
self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
self._client: ARMPipelineClient = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)

client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)}
self._serialize = Serializer(client_models)
Expand Down Expand Up @@ -159,5 +159,5 @@ def __enter__(self) -> "AVSClient":
self._client.__enter__()
return self

def __exit__(self, *exc_details) -> None:
def __exit__(self, *exc_details: Any) -> None:
self._client.__exit__(*exc_details)
10 changes: 2 additions & 8 deletions sdk/compute/azure-mgmt-avs/azure/mgmt/avs/_configuration.py
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.
# --------------------------------------------------------------------------

import sys
from typing import Any, TYPE_CHECKING

from azure.core.configuration import Configuration
Expand All @@ -15,11 +14,6 @@

from ._version import VERSION

if sys.version_info >= (3, 8):
from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports
else:
from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports

if TYPE_CHECKING:
# pylint: disable=unused-import,ungrouped-imports
from azure.core.credentials import TokenCredential
Expand All @@ -35,14 +29,14 @@ class AVSClientConfiguration(Configuration): # pylint: disable=too-many-instanc
:type credential: ~azure.core.credentials.TokenCredential
:param subscription_id: The ID of the target subscription. Required.
:type subscription_id: str
:keyword api_version: Api Version. Default value is "2022-05-01". Note that overriding this
:keyword api_version: Api Version. Default value is "2023-03-01". Note that overriding this
default value may result in unsupported behavior.
:paramtype api_version: str
"""

def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None:
super(AVSClientConfiguration, self).__init__(**kwargs)
api_version: Literal["2022-05-01"] = kwargs.pop("api_version", "2022-05-01")
api_version: str = kwargs.pop("api_version", "2023-03-01")

if credential is None:
raise ValueError("Parameter 'credential' must not be None.")
Expand Down
Loading

0 comments on commit a2854c9

Please sign in to comment.