Skip to content

Commit

Permalink
[AutoRelease] t2-computefleet-2024-10-11-96995(can only be merged by …
Browse files Browse the repository at this point in the history
…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]>
  • Loading branch information
3 people authored Oct 22, 2024
1 parent 8d6a26c commit b53b7bb
Show file tree
Hide file tree
Showing 37 changed files with 3,640 additions and 13,406 deletions.
57 changes: 57 additions & 0 deletions sdk/computefleet/azure-mgmt-computefleet/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,62 @@
# Release History

## 1.0.0 (2024-10-22)

### Features Added

- Model `ComputeProfile` added property `additional_virtual_machine_capabilities`
- Model `FleetProperties` added property `vm_attributes`
- Model `FleetProperties` added property `additional_locations_profile`
- Enum `DiskControllerTypes` added member `NV_ME`
- Enum `SecurityTypes` added member `CONFIDENTIAL_VM`
- Enum `WindowsVMGuestPatchMode` added member `AUTOMATIC_BY_OS`
- Added model `AdditionalCapabilities`
- Added model `AdditionalLocationsProfile`
- Added model `LocationProfile`
- Added model `VMAttributeMinMaxDouble`
- Added model `VMAttributeMinMaxInteger`
- Added model `VMAttributes`
- Added enum `AcceleratorManufacturer`
- Added enum `AcceleratorType`
- Added enum `ArchitectureType`
- Added enum `CpuManufacturer`
- Added enum `LocalStorageDiskType`
- Added enum `VMAttributeSupport`
- Added enum `VMCategory`

### Breaking Changes

- Model `LinuxConfiguration` renamed its instance variable `provision_v_m_agent` into `provision_vm_agent`
- Model `LinuxConfiguration` renamed its instance variable `enable_v_m_agent_platform_updates` into `enable_vm_agent_platform_updates`
- Model `SpotPriorityProfile` renamed its instance variable `max_price_per_v_m` into `max_price_per_vm`
- Model `VMSizeProperties` renamed its instance variable `v_c_p_us_available` into `v_cpus_available`
- Model `VMSizeProperties` renamed its instance variable `v_c_p_us_per_core` into `v_cpus_per_core`
- Model `VirtualMachineScaleSetDataDisk` renamed its instance variable `disk_size_g_b` into `disk_size_gb`
- Model `VirtualMachineScaleSetDataDisk` renamed its instance variable `disk_i_o_p_s_read_write` into `disk_iops_read_write`
- Model `VirtualMachineScaleSetIPConfigurationProperties` renamed its instance variable `public_i_p_address_configuration` into `public_ip_address_configuration`
- Model `VirtualMachineScaleSetIPConfigurationProperties` renamed its instance variable `private_i_p_address_version` into `private_ip_address_version`
- Model `VirtualMachineScaleSetNetworkConfigurationProperties` renamed its instance variable `enable_i_p_forwarding` into `enable_ip_forwarding`
- Model `VirtualMachineScaleSetOSDisk` renamed its instance variable `disk_size_g_b` into `disk_size_gb`
- Model `VirtualMachineScaleSetPublicIPAddressConfigurationProperties` renamed its instance variable `public_i_p_prefix` into `public_ip_prefix`
- Model `VirtualMachineScaleSetPublicIPAddressConfigurationProperties` renamed its instance variable `public_i_p_address_version` into `public_ip_address_version`
- Model `WindowsConfiguration` renamed its instance variable `provision_v_m_agent` into `provision_vm_agent`
- Model `WindowsConfiguration` renamed its instance variable `win_r_m` into `win_rm`
- Model `WindowsConfiguration` renamed its instance variable `enable_v_m_agent_platform_updates` into `enable_vm_agent_platform_updates`
- Deleted or renamed enum value `DiskControllerTypes.N_V_ME`
- Deleted or renamed enum value `NetworkApiVersion.ENUM_2020_11_01`
- Deleted or renamed enum value `SecurityEncryptionTypes.DISK_WITH_V_M_GUEST_STATE`
- Deleted or renamed enum value `SecurityEncryptionTypes.NON_PERSISTED_T_P_M`
- Deleted or renamed enum value `SecurityEncryptionTypes.V_M_GUEST_STATE_ONLY`
- Deleted or renamed enum value `SecurityTypes.CONFIDENTIAL_V_M`
- Deleted or renamed enum value `StorageAccountTypes.PREMIUM_L_R_S`
- Deleted or renamed enum value `StorageAccountTypes.PREMIUM_V2_L_R_S`
- Deleted or renamed enum value `StorageAccountTypes.PREMIUM_Z_R_S`
- Deleted or renamed enum value `StorageAccountTypes.STANDARD_L_R_S`
- Deleted or renamed enum value `StorageAccountTypes.STANDARD_S_S_D_L_R_S`
- Deleted or renamed enum value `StorageAccountTypes.STANDARD_S_S_D_Z_R_S`
- Deleted or renamed enum value `StorageAccountTypes.ULTRA_S_S_D_L_R_S`
- Deleted or renamed enum value `WindowsVMGuestPatchMode.AUTOMATIC_BY_O_S`

## 1.0.0b1 (2024-07-22)

### Other Changes
Expand Down
4 changes: 2 additions & 2 deletions sdk/computefleet/azure-mgmt-computefleet/_meta.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"commit": "c1cea38fb7e5cec9afe223a2ed15cbe2fbeecbdb",
"commit": "fda3d5e4ae4c69aa72ddfdf5ca1b6d5795a03e71",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"typespec_src": "specification/azurefleet/AzureFleet.Management",
"@azure-tools/typespec-python": "0.26.0"
"@azure-tools/typespec-python": "0.35.1"
}
6 changes: 0 additions & 6 deletions sdk/computefleet/azure-mgmt-computefleet/assets.json

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,10 @@
from .operations import FleetsOperations, Operations

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


class ComputeFleetMgmtClient: # pylint: disable=client-accepts-api-version-keyword
class ComputeFleetMgmtClient:
"""ComputeFleetMgmtClient.
:ivar operations: Operations operations
Expand All @@ -37,9 +36,8 @@ class ComputeFleetMgmtClient: # pylint: disable=client-accepts-api-version-keyw
:type subscription_id: str
:param base_url: Service host. Default value is "https://management.azure.com".
:type base_url: str
:keyword api_version: The API version to use for this operation. Default value is
"2024-05-01-preview". Note that overriding this default value may result in unsupported
behavior.
:keyword api_version: The API version to use for this operation. Default value is "2024-11-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
Retry-After header is present.
Expand All @@ -52,8 +50,9 @@ def __init__(
base_url: str = "https://management.azure.com",
**kwargs: Any
) -> None:
_endpoint = "{endpoint}"
self._config = ComputeFleetMgmtClientConfiguration(
credential=credential, subscription_id=subscription_id, **kwargs
credential=credential, subscription_id=subscription_id, base_url=base_url, **kwargs
)
_policies = kwargs.pop("policies", None)
if _policies is None:
Expand All @@ -73,7 +72,7 @@ def __init__(
policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None,
self._config.http_logging_policy,
]
self._client: ARMPipelineClient = ARMPipelineClient(base_url=base_url, policies=_policies, **kwargs)
self._client: ARMPipelineClient = ARMPipelineClient(base_url=_endpoint, policies=_policies, **kwargs)

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

request_copy = deepcopy(request)
request_copy.url = self._client.format_url(request_copy.url)
path_format_arguments = {
"endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
}

request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments)
return self._client.send_request(request_copy, stream=stream, **kwargs) # type: ignore

def close(self) -> None:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,10 @@
from ._version import VERSION

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


class ComputeFleetMgmtClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long
class ComputeFleetMgmtClientConfiguration: # pylint: disable=too-many-instance-attributes
"""Configuration for ComputeFleetMgmtClient.
Note that all parameters used to create this instance are saved as instance
Expand All @@ -28,14 +27,21 @@ class ComputeFleetMgmtClientConfiguration: # pylint: disable=too-many-instance-
: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: The API version to use for this operation. Default value is
"2024-05-01-preview". Note that overriding this default value may result in unsupported
behavior.
:param base_url: Service host. Default value is "https://management.azure.com".
:type base_url: str
:keyword api_version: The API version to use for this operation. Default value is "2024-11-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", "2024-05-01-preview")
def __init__(
self,
credential: "TokenCredential",
subscription_id: str,
base_url: str = "https://management.azure.com",
**kwargs: Any
) -> None:
api_version: str = kwargs.pop("api_version", "2024-11-01")

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

self.credential = credential
self.subscription_id = subscription_id
self.base_url = base_url
self.api_version = api_version
self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"])
kwargs.setdefault("sdk_moniker", "mgmt-computefleet/{}".format(VERSION))
Expand Down
Loading

0 comments on commit b53b7bb

Please sign in to comment.