Skip to content

Commit 41baeb5

Browse files
author
SDKAuto
committed
CodeGen from PR 34242 in Azure/azure-rest-api-specs
Merge 8fbc11097a7044c1adc129e989a96f3988cf536d into 11059b2f00c7572b276dc9862c0b41db8702cc78
1 parent ebf29c4 commit 41baeb5

File tree

151 files changed

+4515
-1724
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

151 files changed

+4515
-1724
lines changed

sdk/scvmm/azure-mgmt-scvmm/CHANGELOG.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,23 @@
11
# Release History
22

3+
## 1.1.0 (2025-04-27)
4+
5+
### Features Added
6+
7+
- Model `CloudCapacity` added property `storage_gb`
8+
- Model `GuestAgentProperties` added property `private_link_scope_resource_id`
9+
- Model `OsProfileForVmInstance` added property `admin_username`
10+
- Model `OsProfileForVmInstance` added property `domain_name`
11+
- Model `OsProfileForVmInstance` added property `domain_username`
12+
- Model `OsProfileForVmInstance` added property `domain_password`
13+
- Model `OsProfileForVmInstance` added property `workgroup`
14+
- Model `OsProfileForVmInstance` added property `product_key`
15+
- Model `OsProfileForVmInstance` added property `timezone`
16+
- Model `OsProfileForVmInstance` added property `run_once_commands`
17+
- Model `VirtualMachineInventoryItem` added property `generation`
18+
- Method `VirtualMachineInstancesOperations.begin_stop` has a new overload `def begin_stop(self: None, resource_uri: str, body: Optional[StopVirtualMachineOptions], content_type: str)`
19+
- Method `VirtualMachineInstancesOperations.begin_stop` has a new overload `def begin_stop(self: None, resource_uri: str, body: Optional[IO[bytes]], content_type: str)`
20+
321
## 1.0.0 (2024-06-20)
422

523
### Features Added

sdk/scvmm/azure-mgmt-scvmm/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Microsoft Azure SDK for Python
22

33
This is the Microsoft Azure Scvmm Management Client Library.
4-
This package has been tested with Python 3.8+.
4+
This package has been tested with Python 3.9+.
55
For a more complete view of Azure libraries, see the [azure sdk python release](https://aka.ms/azsdk/python/all).
66

77
## _Disclaimer_
@@ -12,7 +12,7 @@ _Azure SDK Python packages support for Python 2.7 has ended 01 January 2022. For
1212

1313
### Prerequisites
1414

15-
- Python 3.8+ is required to use this package.
15+
- Python 3.9+ is required to use this package.
1616
- [Azure subscription](https://azure.microsoft.com/free/)
1717

1818
### Install the package
@@ -24,7 +24,7 @@ pip install azure-identity
2424

2525
### Authentication
2626

27-
By default, [Azure Active Directory](https://aka.ms/awps/aad) token authentication depends on correct configure of following environment variables.
27+
By default, [Azure Active Directory](https://aka.ms/awps/aad) token authentication depends on correct configuration of the following environment variables.
2828

2929
- `AZURE_CLIENT_ID` for Azure client ID.
3030
- `AZURE_TENANT_ID` for Azure tenant ID.
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"commit": "061505b89d5d0bbcc9f980e2276f79ff354ce286",
2+
"commit": "c908490d3d2b6fdd1a5dfa108a0f47183e4c06e0",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
44
"autorest": "3.10.2",
55
"use": [
6-
"@autorest/python@6.13.19",
6+
"@autorest/python@6.34.1",
77
"@autorest/[email protected]"
88
],
9-
"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/[email protected] --version=3.10.2 --version-tolerant=False",
9+
"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.34.1 --use=@autorest/[email protected] --version=3.10.2 --version-tolerant=False",
1010
"readme": "specification/scvmm/resource-manager/readme.md"
1111
}

sdk/scvmm/azure-mgmt-scvmm/azure/mgmt/scvmm/__init__.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,28 @@
55
# Code generated by Microsoft (R) AutoRest Code Generator.
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
8+
# pylint: disable=wrong-import-position
89

9-
from ._sc_vmm_mgmt_client import ScVmmMgmtClient
10+
from typing import TYPE_CHECKING
11+
12+
if TYPE_CHECKING:
13+
from ._patch import * # pylint: disable=unused-wildcard-import
14+
15+
from ._sc_vmm_mgmt_client import ScVmmMgmtClient # type: ignore
1016
from ._version import VERSION
1117

1218
__version__ = VERSION
1319

1420
try:
1521
from ._patch import __all__ as _patch_all
16-
from ._patch import * # pylint: disable=unused-wildcard-import
22+
from ._patch import *
1723
except ImportError:
1824
_patch_all = []
1925
from ._patch import patch_sdk as _patch_sdk
2026

2127
__all__ = [
2228
"ScVmmMgmtClient",
2329
]
24-
__all__.extend([p for p in _patch_all if p not in __all__])
30+
__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore
2531

2632
_patch_sdk()

sdk/scvmm/azure-mgmt-scvmm/azure/mgmt/scvmm/_configuration.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,10 @@
1414
from ._version import VERSION
1515

1616
if TYPE_CHECKING:
17-
# pylint: disable=unused-import,ungrouped-imports
1817
from azure.core.credentials import TokenCredential
1918

2019

21-
class ScVmmMgmtClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long
20+
class ScVmmMgmtClientConfiguration: # pylint: disable=too-many-instance-attributes
2221
"""Configuration for ScVmmMgmtClient.
2322
2423
Note that all parameters used to create this instance are saved as instance
@@ -28,13 +27,13 @@ class ScVmmMgmtClientConfiguration: # pylint: disable=too-many-instance-attribu
2827
:type credential: ~azure.core.credentials.TokenCredential
2928
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
3029
:type subscription_id: str
31-
:keyword api_version: Api Version. Default value is "2023-10-07". Note that overriding this
30+
:keyword api_version: Api Version. Default value is "2025-03-13". Note that overriding this
3231
default value may result in unsupported behavior.
3332
:paramtype api_version: str
3433
"""
3534

3635
def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None:
37-
api_version: str = kwargs.pop("api_version", "2023-10-07")
36+
api_version: str = kwargs.pop("api_version", "2025-03-13")
3837

3938
if credential is None:
4039
raise ValueError("Parameter 'credential' must not be None.")

sdk/scvmm/azure-mgmt-scvmm/azure/mgmt/scvmm/_sc_vmm_mgmt_client.py

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,19 @@
77
# --------------------------------------------------------------------------
88

99
from copy import deepcopy
10-
from typing import Any, TYPE_CHECKING
10+
from typing import Any, Optional, TYPE_CHECKING, cast
11+
from typing_extensions import Self
1112

1213
from azure.core.pipeline import policies
1314
from azure.core.rest import HttpRequest, HttpResponse
15+
from azure.core.settings import settings
1416
from azure.mgmt.core import ARMPipelineClient
1517
from azure.mgmt.core.policies import ARMAutoResourceProviderRegistrationPolicy
18+
from azure.mgmt.core.tools import get_arm_endpoints
1619

1720
from . import models as _models
1821
from ._configuration import ScVmmMgmtClientConfiguration
19-
from ._serialization import Deserializer, Serializer
22+
from ._utils.serialization import Deserializer, Serializer
2023
from .operations import (
2124
AvailabilitySetsOperations,
2225
CloudsOperations,
@@ -31,11 +34,10 @@
3134
)
3235

3336
if TYPE_CHECKING:
34-
# pylint: disable=unused-import,ungrouped-imports
3537
from azure.core.credentials import TokenCredential
3638

3739

38-
class ScVmmMgmtClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes
40+
class ScVmmMgmtClient: # pylint: disable=too-many-instance-attributes
3941
"""The Microsoft.ScVmm Rest API spec.
4042
4143
:ivar virtual_machine_instances: VirtualMachineInstancesOperations operations
@@ -66,23 +68,27 @@ class ScVmmMgmtClient: # pylint: disable=client-accepts-api-version-keyword,too
6668
:type credential: ~azure.core.credentials.TokenCredential
6769
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
6870
:type subscription_id: str
69-
:param base_url: Service URL. Default value is "https://management.azure.com".
71+
:param base_url: Service URL. Default value is None.
7072
:type base_url: str
71-
:keyword api_version: Api Version. Default value is "2023-10-07". Note that overriding this
73+
:keyword api_version: Api Version. Default value is "2025-03-13". Note that overriding this
7274
default value may result in unsupported behavior.
7375
:paramtype api_version: str
7476
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
7577
Retry-After header is present.
7678
"""
7779

7880
def __init__(
79-
self,
80-
credential: "TokenCredential",
81-
subscription_id: str,
82-
base_url: str = "https://management.azure.com",
83-
**kwargs: Any
81+
self, credential: "TokenCredential", subscription_id: str, base_url: Optional[str] = None, **kwargs: Any
8482
) -> None:
85-
self._config = ScVmmMgmtClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs)
83+
_cloud = kwargs.pop("cloud_setting", None) or settings.current.azure_cloud # type: ignore
84+
_endpoints = get_arm_endpoints(_cloud)
85+
if not base_url:
86+
base_url = _endpoints["resource_manager"]
87+
credential_scopes = kwargs.pop("credential_scopes", _endpoints["credential_scopes"])
88+
self._config = ScVmmMgmtClientConfiguration(
89+
credential=credential, subscription_id=subscription_id, credential_scopes=credential_scopes, **kwargs
90+
)
91+
8692
_policies = kwargs.pop("policies", None)
8793
if _policies is None:
8894
_policies = [
@@ -101,7 +107,7 @@ def __init__(
101107
policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None,
102108
self._config.http_logging_policy,
103109
]
104-
self._client: ARMPipelineClient = ARMPipelineClient(base_url=base_url, policies=_policies, **kwargs)
110+
self._client: ARMPipelineClient = ARMPipelineClient(base_url=cast(str, base_url), policies=_policies, **kwargs)
105111

106112
client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)}
107113
self._serialize = Serializer(client_models)
@@ -153,7 +159,7 @@ def _send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs:
153159
def close(self) -> None:
154160
self._client.close()
155161

156-
def __enter__(self) -> "ScVmmMgmtClient":
162+
def __enter__(self) -> Self:
157163
self._client.__enter__()
158164
return self
159165

sdk/scvmm/azure-mgmt-scvmm/azure/mgmt/scvmm/_vendor.py renamed to sdk/scvmm/azure-mgmt-scvmm/azure/mgmt/scvmm/_utils/__init__.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,3 @@
44
# Code generated by Microsoft (R) AutoRest Code Generator.
55
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
66
# --------------------------------------------------------------------------
7-
8-
from azure.core.pipeline.transport import HttpRequest
9-
10-
11-
def _convert_request(request, files=None):
12-
data = request.content if not files else None
13-
request = HttpRequest(method=request.method, url=request.url, headers=request.headers, data=data)
14-
if files:
15-
request.set_formdata_body(files)
16-
return request

0 commit comments

Comments
 (0)