Skip to content

Commit b53b7bb

Browse files
[AutoRelease] t2-computefleet-2024-10-11-96995(can only be merged by SDK owner) (Azure#37853)
* code and test * update-testcase * update-testcaes * Update CHANGELOG.md * Update CHANGELOG.md --------- Co-authored-by: azure-sdk <PythonSdkPipelines> Co-authored-by: ChenxiJiang333 <[email protected]> Co-authored-by: ChenxiJiang333 <[email protected]>
1 parent 8d6a26c commit b53b7bb

37 files changed

+3640
-13406
lines changed

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

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

3+
## 1.0.0 (2024-10-22)
4+
5+
### Features Added
6+
7+
- Model `ComputeProfile` added property `additional_virtual_machine_capabilities`
8+
- Model `FleetProperties` added property `vm_attributes`
9+
- Model `FleetProperties` added property `additional_locations_profile`
10+
- Enum `DiskControllerTypes` added member `NV_ME`
11+
- Enum `SecurityTypes` added member `CONFIDENTIAL_VM`
12+
- Enum `WindowsVMGuestPatchMode` added member `AUTOMATIC_BY_OS`
13+
- Added model `AdditionalCapabilities`
14+
- Added model `AdditionalLocationsProfile`
15+
- Added model `LocationProfile`
16+
- Added model `VMAttributeMinMaxDouble`
17+
- Added model `VMAttributeMinMaxInteger`
18+
- Added model `VMAttributes`
19+
- Added enum `AcceleratorManufacturer`
20+
- Added enum `AcceleratorType`
21+
- Added enum `ArchitectureType`
22+
- Added enum `CpuManufacturer`
23+
- Added enum `LocalStorageDiskType`
24+
- Added enum `VMAttributeSupport`
25+
- Added enum `VMCategory`
26+
27+
### Breaking Changes
28+
29+
- Model `LinuxConfiguration` renamed its instance variable `provision_v_m_agent` into `provision_vm_agent`
30+
- Model `LinuxConfiguration` renamed its instance variable `enable_v_m_agent_platform_updates` into `enable_vm_agent_platform_updates`
31+
- Model `SpotPriorityProfile` renamed its instance variable `max_price_per_v_m` into `max_price_per_vm`
32+
- Model `VMSizeProperties` renamed its instance variable `v_c_p_us_available` into `v_cpus_available`
33+
- Model `VMSizeProperties` renamed its instance variable `v_c_p_us_per_core` into `v_cpus_per_core`
34+
- Model `VirtualMachineScaleSetDataDisk` renamed its instance variable `disk_size_g_b` into `disk_size_gb`
35+
- Model `VirtualMachineScaleSetDataDisk` renamed its instance variable `disk_i_o_p_s_read_write` into `disk_iops_read_write`
36+
- Model `VirtualMachineScaleSetIPConfigurationProperties` renamed its instance variable `public_i_p_address_configuration` into `public_ip_address_configuration`
37+
- Model `VirtualMachineScaleSetIPConfigurationProperties` renamed its instance variable `private_i_p_address_version` into `private_ip_address_version`
38+
- Model `VirtualMachineScaleSetNetworkConfigurationProperties` renamed its instance variable `enable_i_p_forwarding` into `enable_ip_forwarding`
39+
- Model `VirtualMachineScaleSetOSDisk` renamed its instance variable `disk_size_g_b` into `disk_size_gb`
40+
- Model `VirtualMachineScaleSetPublicIPAddressConfigurationProperties` renamed its instance variable `public_i_p_prefix` into `public_ip_prefix`
41+
- Model `VirtualMachineScaleSetPublicIPAddressConfigurationProperties` renamed its instance variable `public_i_p_address_version` into `public_ip_address_version`
42+
- Model `WindowsConfiguration` renamed its instance variable `provision_v_m_agent` into `provision_vm_agent`
43+
- Model `WindowsConfiguration` renamed its instance variable `win_r_m` into `win_rm`
44+
- Model `WindowsConfiguration` renamed its instance variable `enable_v_m_agent_platform_updates` into `enable_vm_agent_platform_updates`
45+
- Deleted or renamed enum value `DiskControllerTypes.N_V_ME`
46+
- Deleted or renamed enum value `NetworkApiVersion.ENUM_2020_11_01`
47+
- Deleted or renamed enum value `SecurityEncryptionTypes.DISK_WITH_V_M_GUEST_STATE`
48+
- Deleted or renamed enum value `SecurityEncryptionTypes.NON_PERSISTED_T_P_M`
49+
- Deleted or renamed enum value `SecurityEncryptionTypes.V_M_GUEST_STATE_ONLY`
50+
- Deleted or renamed enum value `SecurityTypes.CONFIDENTIAL_V_M`
51+
- Deleted or renamed enum value `StorageAccountTypes.PREMIUM_L_R_S`
52+
- Deleted or renamed enum value `StorageAccountTypes.PREMIUM_V2_L_R_S`
53+
- Deleted or renamed enum value `StorageAccountTypes.PREMIUM_Z_R_S`
54+
- Deleted or renamed enum value `StorageAccountTypes.STANDARD_L_R_S`
55+
- Deleted or renamed enum value `StorageAccountTypes.STANDARD_S_S_D_L_R_S`
56+
- Deleted or renamed enum value `StorageAccountTypes.STANDARD_S_S_D_Z_R_S`
57+
- Deleted or renamed enum value `StorageAccountTypes.ULTRA_S_S_D_L_R_S`
58+
- Deleted or renamed enum value `WindowsVMGuestPatchMode.AUTOMATIC_BY_O_S`
59+
360
## 1.0.0b1 (2024-07-22)
461

562
### Other Changes
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"commit": "c1cea38fb7e5cec9afe223a2ed15cbe2fbeecbdb",
2+
"commit": "fda3d5e4ae4c69aa72ddfdf5ca1b6d5795a03e71",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
44
"typespec_src": "specification/azurefleet/AzureFleet.Management",
5-
"@azure-tools/typespec-python": "0.26.0"
5+
"@azure-tools/typespec-python": "0.35.1"
66
}

sdk/computefleet/azure-mgmt-computefleet/assets.json

Lines changed: 0 additions & 6 deletions
This file was deleted.

sdk/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/_client.py

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,10 @@
2020
from .operations import FleetsOperations, Operations
2121

2222
if TYPE_CHECKING:
23-
# pylint: disable=unused-import,ungrouped-imports
2423
from azure.core.credentials import TokenCredential
2524

2625

27-
class ComputeFleetMgmtClient: # pylint: disable=client-accepts-api-version-keyword
26+
class ComputeFleetMgmtClient:
2827
"""ComputeFleetMgmtClient.
2928
3029
:ivar operations: Operations operations
@@ -37,9 +36,8 @@ class ComputeFleetMgmtClient: # pylint: disable=client-accepts-api-version-keyw
3736
:type subscription_id: str
3837
:param base_url: Service host. Default value is "https://management.azure.com".
3938
:type base_url: str
40-
:keyword api_version: The API version to use for this operation. Default value is
41-
"2024-05-01-preview". Note that overriding this default value may result in unsupported
42-
behavior.
39+
:keyword api_version: The API version to use for this operation. Default value is "2024-11-01".
40+
Note that overriding this default value may result in unsupported behavior.
4341
:paramtype api_version: str
4442
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
4543
Retry-After header is present.
@@ -52,8 +50,9 @@ def __init__(
5250
base_url: str = "https://management.azure.com",
5351
**kwargs: Any
5452
) -> None:
53+
_endpoint = "{endpoint}"
5554
self._config = ComputeFleetMgmtClientConfiguration(
56-
credential=credential, subscription_id=subscription_id, **kwargs
55+
credential=credential, subscription_id=subscription_id, base_url=base_url, **kwargs
5756
)
5857
_policies = kwargs.pop("policies", None)
5958
if _policies is None:
@@ -73,7 +72,7 @@ def __init__(
7372
policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None,
7473
self._config.http_logging_policy,
7574
]
76-
self._client: ARMPipelineClient = ARMPipelineClient(base_url=base_url, policies=_policies, **kwargs)
75+
self._client: ARMPipelineClient = ARMPipelineClient(base_url=_endpoint, policies=_policies, **kwargs)
7776

7877
self._serialize = Serializer()
7978
self._deserialize = Deserializer()
@@ -100,7 +99,11 @@ def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs:
10099
"""
101100

102101
request_copy = deepcopy(request)
103-
request_copy.url = self._client.format_url(request_copy.url)
102+
path_format_arguments = {
103+
"endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
104+
}
105+
106+
request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments)
104107
return self._client.send_request(request_copy, stream=stream, **kwargs) # type: ignore
105108

106109
def close(self) -> None:

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

Lines changed: 14 additions & 7 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 ComputeFleetMgmtClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long
20+
class ComputeFleetMgmtClientConfiguration: # pylint: disable=too-many-instance-attributes
2221
"""Configuration for ComputeFleetMgmtClient.
2322
2423
Note that all parameters used to create this instance are saved as instance
@@ -28,14 +27,21 @@ class ComputeFleetMgmtClientConfiguration: # pylint: disable=too-many-instance-
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: The API version to use for this operation. Default value is
32-
"2024-05-01-preview". Note that overriding this default value may result in unsupported
33-
behavior.
30+
:param base_url: Service host. Default value is "https://management.azure.com".
31+
:type base_url: str
32+
:keyword api_version: The API version to use for this operation. Default value is "2024-11-01".
33+
Note that overriding this default value may result in unsupported behavior.
3434
:paramtype api_version: str
3535
"""
3636

37-
def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None:
38-
api_version: str = kwargs.pop("api_version", "2024-05-01-preview")
37+
def __init__(
38+
self,
39+
credential: "TokenCredential",
40+
subscription_id: str,
41+
base_url: str = "https://management.azure.com",
42+
**kwargs: Any
43+
) -> None:
44+
api_version: str = kwargs.pop("api_version", "2024-11-01")
3945

4046
if credential is None:
4147
raise ValueError("Parameter 'credential' must not be None.")
@@ -44,6 +50,7 @@ def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs
4450

4551
self.credential = credential
4652
self.subscription_id = subscription_id
53+
self.base_url = base_url
4754
self.api_version = api_version
4855
self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"])
4956
kwargs.setdefault("sdk_moniker", "mgmt-computefleet/{}".format(VERSION))

0 commit comments

Comments
 (0)