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-scvmm] mgmt swagger #9260

Draft
wants to merge 1 commit into
base: pipeline-optimize-for-multi-input
Choose a base branch
from
Draft
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/scvmm/azure-mgmt-scvmm/_meta.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"commit": "061505b89d5d0bbcc9f980e2276f79ff354ce286",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"commit": "7db6e74954519a8d86405ef6169e4b95bd53f567",
"repository_url": "https://github.com/test-repo-billy/azure-rest-api-specs",
"autorest": "3.10.2",
"use": [
"@autorest/python@6.13.19",
"@autorest/python@6.19.0",
"@autorest/modelerfour@4.27.0"
],
"autorest_command": "autorest specification/scvmm/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.19 --use=@autorest/modelerfour@4.27.0 --version=3.10.2 --version-tolerant=False",
"autorest_command": "autorest specification/scvmm/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/modelerfour@4.27.0 --version=3.10.2 --version-tolerant=False",
"readme": "specification/scvmm/resource-manager/readme.md"
}
4 changes: 2 additions & 2 deletions sdk/scvmm/azure-mgmt-scvmm/azure/mgmt/scvmm/_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ class ScVmmMgmtClientConfiguration: # pylint: disable=too-many-instance-attribu
:type credential: ~azure.core.credentials.TokenCredential
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
:type subscription_id: str
:keyword api_version: Api Version. Default value is "2023-10-07". Note that overriding this
:keyword api_version: Api Version. Default value is "2024-06-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:
api_version: str = kwargs.pop("api_version", "2023-10-07")
api_version: str = kwargs.pop("api_version", "2024-06-01")

if credential is None:
raise ValueError("Parameter 'credential' must not be None.")
Expand Down
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 @@ -68,7 +69,7 @@ class ScVmmMgmtClient: # pylint: disable=client-accepts-api-version-keyword,too
: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 "2023-10-07". Note that overriding this
:keyword api_version: Api Version. Default value is "2024-06-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 Down Expand Up @@ -153,7 +154,7 @@ def _send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs:
def close(self) -> None:
self._client.close()

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

Expand Down
2 changes: 2 additions & 0 deletions sdk/scvmm/azure-mgmt-scvmm/azure/mgmt/scvmm/_serialization.py
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
16 changes: 0 additions & 16 deletions sdk/scvmm/azure-mgmt-scvmm/azure/mgmt/scvmm/_vendor.py

This file was deleted.

2 changes: 1 addition & 1 deletion sdk/scvmm/azure-mgmt-scvmm/azure/mgmt/scvmm/_version.py
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 = "1.0.0"
VERSION = "1.0.0b1"
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ class ScVmmMgmtClientConfiguration: # pylint: disable=too-many-instance-attribu
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
:type subscription_id: str
:keyword api_version: Api Version. Default value is "2023-10-07". Note that overriding this
:keyword api_version: Api Version. Default value is "2024-06-01". Note that overriding this
default value may result in unsupported behavior.
:paramtype api_version: str
"""

def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None:
api_version: str = kwargs.pop("api_version", "2023-10-07")
api_version: str = kwargs.pop("api_version", "2024-06-01")

if credential is None:
raise ValueError("Parameter 'credential' must not be None.")
Expand Down
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 @@ -68,7 +69,7 @@ class ScVmmMgmtClient: # pylint: disable=client-accepts-api-version-keyword,too
: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 "2023-10-07". Note that overriding this
:keyword api_version: Api Version. Default value is "2024-06-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 Down Expand Up @@ -155,7 +156,7 @@ def _send_request(
async def close(self) -> None:
await self._client.close()

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

Expand Down
Loading