Skip to content

[AutoPR azure-mgmt-compute] Migrate compute latest swagger to TypeSpec #10216

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

Draft
wants to merge 1 commit into
base: main
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
45 changes: 45 additions & 0 deletions sdk/compute/azure-mgmt-compute/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,50 @@
# Release History

## 35.0.0 (2025-04-23)

### Features Added

- Model AvailabilitySet has a new parameter system_data
- Model CapacityReservation has a new parameter system_data
- Model CapacityReservationGroup has a new parameter system_data
- Model DedicatedHost has a new parameter system_data
- Model DedicatedHostGroup has a new parameter system_data
- Model DedicatedHostSizeListResult has a new parameter next_link
- Model Disk has a new parameter system_data
- Model DiskAccess has a new parameter system_data
- Model DiskEncryptionSet has a new parameter system_data
- Model DiskRestorePoint has a new parameter system_data
- Model Image has a new parameter system_data
- Model PrivateEndpointConnection has a new parameter system_data
- Model ProximityPlacementGroup has a new parameter system_data
- Model ProxyResource has a new parameter system_data
- Model RestorePoint has a new parameter system_data
- Model RestorePointCollection has a new parameter system_data
- Model RollingUpgradeStatusInfo has a new parameter system_data
- Model Snapshot has a new parameter system_data
- Model SshPublicKeyResource has a new parameter system_data
- Model SystemData has a new parameter created_by
- Model SystemData has a new parameter created_by_type
- Model SystemData has a new parameter last_modified_by
- Model SystemData has a new parameter last_modified_by_type
- Model VirtualMachine has a new parameter system_data
- Model VirtualMachineExtension has a new parameter system_data
- Model VirtualMachineExtensionImage has a new parameter system_data
- Model VirtualMachineRunCommand has a new parameter system_data
- Model VirtualMachineScaleSet has a new parameter system_data
- Model VirtualMachineScaleSetExtension has a new parameter vm_name
- Model VirtualMachineScaleSetVM has a new parameter system_data
- Model VirtualMachineScaleSetVMExtension has a new parameter vm_name
- Model VirtualMachineSizeListResult has a new parameter next_link

### Breaking Changes

- Model VirtualMachineScaleSetExtension no longer has parameter name
- Model VirtualMachineScaleSetVMExtension no longer has parameter name
- Parameter location of model VirtualMachineExtension is now required
- Parameter value of model PrivateEndpointConnectionListResult is now required
- Parameter value of model RestorePointCollectionListResult is now required

## 34.1.0 (2025-03-24)

### Features Added
Expand Down
6 changes: 3 additions & 3 deletions sdk/compute/azure-mgmt-compute/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Microsoft Azure SDK for Python

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

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

### Prerequisites

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

### Install the package
Expand All @@ -24,7 +24,7 @@ pip install azure-identity

### Authentication

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

- `AZURE_CLIENT_ID` for Azure client ID.
- `AZURE_TENANT_ID` for Azure tenant ID.
Expand Down
6 changes: 3 additions & 3 deletions sdk/compute/azure-mgmt-compute/_meta.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"commit": "85dbdf68f1c3e1693bd94eff5e8a869f1a07ed78",
"commit": "2504c146c24560d657445ac435b5bc4ee21c4189",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest": "3.10.2",
"use": [
"@autorest/python@6.27.4",
"@autorest/python@6.33.0",
"@autorest/[email protected]"
],
"autorest_command": "autorest specification/compute/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/azure-sdk-for-python/sdk --use=@autorest/python@6.27.4 --use=@autorest/[email protected] --version=3.10.2 --version-tolerant=False",
"autorest_command": "autorest specification/compute/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.33.0 --use=@autorest/[email protected] --version=3.10.2 --version-tolerant=False",
"readme": "specification/compute/resource-manager/readme.md",
"package-2024-03-02-only": "2024-07-16 12:23:13 -0400 602fb5144a226577186e35845422c11db9067cf8 Microsoft.Compute/DiskRP/stable/2024-03-02/snapshot.json",
"package-2024-03-01-only": "2024-06-05 15:03:47 -0700 491e00d17f24909ecf5e1030b3833bed51224e92 Microsoft.Compute/ComputeRP/stable/2024-03-01/virtualMachineScaleSet.json",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@
# regenerated.
# --------------------------------------------------------------------------

from typing import Any, Optional, TYPE_CHECKING
from typing import Any, Optional, TYPE_CHECKING, cast
from typing_extensions import Self

from azure.core.pipeline import policies
from azure.core.settings import settings
from azure.mgmt.core import ARMPipelineClient
from azure.mgmt.core.policies import ARMAutoResourceProviderRegistrationPolicy
from azure.mgmt.core.tools import get_arm_endpoints
from azure.profiles import KnownProfiles, ProfileDefinition
from azure.profiles.multiapiclient import MultiApiClientMixin

Expand All @@ -27,7 +29,7 @@

class _SDKClient(object):
def __init__(self, *args, **kwargs):
"""This is a fake class to support current implemetation of MultiApiClientMixin."
"""This is a fake class to support current implementation of MultiApiClientMixin."
Will be removed in final version of multiapi azure-core based client
"""
pass
Expand Down Expand Up @@ -114,13 +116,18 @@ def __init__(
credential: "TokenCredential",
subscription_id: str,
api_version: Optional[str]=None,
base_url: str = "https://management.azure.com",
base_url: Optional[str] = None,
profile: KnownProfiles=KnownProfiles.default,
**kwargs: Any
):
if api_version:
kwargs.setdefault('api_version', api_version)
self._config = ComputeManagementClientConfiguration(credential, subscription_id, **kwargs)
_cloud = kwargs.pop("cloud_setting", None) or settings.current.azure_cloud # type: ignore
_endpoints = get_arm_endpoints(_cloud)
if not base_url:
base_url = _endpoints["resource_manager"]
credential_scopes = kwargs.pop("credential_scopes", _endpoints["credential_scopes"])
self._config = ComputeManagementClientConfiguration(credential, subscription_id, credential_scopes=credential_scopes, **kwargs)
_policies = kwargs.pop("policies", None)
if _policies is None:
_policies = [
Expand All @@ -139,7 +146,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=cast(str, base_url), policies=_policies, **kwargs)
super(ComputeManagementClient, self).__init__(
api_version=api_version,
profile=profile
Expand Down
Loading