Skip to content

Commit 8ad5074

Browse files
[AutoRelease] t2-scvmm-2024-06-19-12172(can only be merged by SDK owner) (#36156)
* code and test * update-testcase --------- Co-authored-by: azure-sdk <PythonSdkPipelines> Co-authored-by: ChenxiJiang333 <[email protected]>
1 parent b82bf25 commit 8ad5074

File tree

146 files changed

+14882
-11978
lines changed

Some content is hidden

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

146 files changed

+14882
-11978
lines changed

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

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

3+
## 1.0.0 (2024-06-20)
4+
5+
### Features Added
6+
7+
- Added operation group GuestAgentsOperations
8+
- Added operation group VirtualMachineInstancesOperations
9+
- Added operation group VmInstanceHybridIdentityMetadatasOperations
10+
- Model AvailabilitySet has a new parameter properties
11+
- Model Cloud has a new parameter properties
12+
- Model InventoryItem has a new parameter properties
13+
- Model ProxyResource has a new parameter system_data
14+
- Model Resource has a new parameter system_data
15+
- Model VirtualDisk has a new parameter storage_qos_policy
16+
- Model VirtualDiskUpdate has a new parameter storage_qos_policy
17+
- Model VirtualMachineInventoryItem has a new parameter bios_guid
18+
- Model VirtualMachineInventoryItem has a new parameter managed_machine_resource_id
19+
- Model VirtualMachineInventoryItem has a new parameter os_version
20+
- Model VirtualMachineTemplate has a new parameter properties
21+
- Model VirtualNetwork has a new parameter properties
22+
23+
### Breaking Changes
24+
25+
- Client name is changed from `SCVMM` to `ScVmmMgmtClient`
26+
- Model AvailabilitySet no longer has parameter availability_set_name
27+
- Model AvailabilitySet no longer has parameter provisioning_state
28+
- Model AvailabilitySet no longer has parameter vmm_server_id
29+
- Model Cloud no longer has parameter cloud_capacity
30+
- Model Cloud no longer has parameter cloud_name
31+
- Model Cloud no longer has parameter inventory_item_id
32+
- Model Cloud no longer has parameter provisioning_state
33+
- Model Cloud no longer has parameter storage_qo_s_policies
34+
- Model Cloud no longer has parameter uuid
35+
- Model Cloud no longer has parameter vmm_server_id
36+
- Model InventoryItem no longer has parameter inventory_item_name
37+
- Model InventoryItem no longer has parameter inventory_type
38+
- Model InventoryItem no longer has parameter managed_resource_id
39+
- Model InventoryItem no longer has parameter provisioning_state
40+
- Model InventoryItem no longer has parameter uuid
41+
- Model VirtualDisk no longer has parameter storage_qo_s_policy
42+
- Model VirtualDiskUpdate no longer has parameter storage_qo_s_policy
43+
- Model VirtualMachineTemplate no longer has parameter computer_name
44+
- Model VirtualMachineTemplate no longer has parameter cpu_count
45+
- Model VirtualMachineTemplate no longer has parameter disks
46+
- Model VirtualMachineTemplate no longer has parameter dynamic_memory_enabled
47+
- Model VirtualMachineTemplate no longer has parameter dynamic_memory_max_mb
48+
- Model VirtualMachineTemplate no longer has parameter dynamic_memory_min_mb
49+
- Model VirtualMachineTemplate no longer has parameter generation
50+
- Model VirtualMachineTemplate no longer has parameter inventory_item_id
51+
- Model VirtualMachineTemplate no longer has parameter is_customizable
52+
- Model VirtualMachineTemplate no longer has parameter is_highly_available
53+
- Model VirtualMachineTemplate no longer has parameter limit_cpu_for_migration
54+
- Model VirtualMachineTemplate no longer has parameter memory_mb
55+
- Model VirtualMachineTemplate no longer has parameter network_interfaces
56+
- Model VirtualMachineTemplate no longer has parameter os_name
57+
- Model VirtualMachineTemplate no longer has parameter os_type
58+
- Model VirtualMachineTemplate no longer has parameter provisioning_state
59+
- Model VirtualMachineTemplate no longer has parameter uuid
60+
- Model VirtualMachineTemplate no longer has parameter vmm_server_id
61+
- Model VirtualNetwork no longer has parameter inventory_item_id
62+
- Model VirtualNetwork no longer has parameter network_name
63+
- Model VirtualNetwork no longer has parameter provisioning_state
64+
- Model VirtualNetwork no longer has parameter uuid
65+
- Model VirtualNetwork no longer has parameter vmm_server_id
66+
- Operation AvailabilitySetsOperations.begin_create_or_update has a new required parameter availability_set_resource_name
67+
- Operation AvailabilitySetsOperations.begin_create_or_update has a new required parameter resource
68+
- Operation AvailabilitySetsOperations.begin_create_or_update no longer has parameter availability_set_name
69+
- Operation AvailabilitySetsOperations.begin_create_or_update no longer has parameter body
70+
- Operation AvailabilitySetsOperations.begin_delete has a new required parameter availability_set_resource_name
71+
- Operation AvailabilitySetsOperations.begin_delete no longer has parameter availability_set_name
72+
- Operation AvailabilitySetsOperations.begin_update has a new required parameter availability_set_resource_name
73+
- Operation AvailabilitySetsOperations.begin_update has a new required parameter properties
74+
- Operation AvailabilitySetsOperations.begin_update no longer has parameter availability_set_name
75+
- Operation AvailabilitySetsOperations.begin_update no longer has parameter body
76+
- Operation AvailabilitySetsOperations.get has a new required parameter availability_set_resource_name
77+
- Operation AvailabilitySetsOperations.get no longer has parameter availability_set_name
78+
- Operation CloudsOperations.begin_create_or_update has a new required parameter cloud_resource_name
79+
- Operation CloudsOperations.begin_create_or_update has a new required parameter resource
80+
- Operation CloudsOperations.begin_create_or_update no longer has parameter body
81+
- Operation CloudsOperations.begin_create_or_update no longer has parameter cloud_name
82+
- Operation CloudsOperations.begin_delete has a new required parameter cloud_resource_name
83+
- Operation CloudsOperations.begin_delete no longer has parameter cloud_name
84+
- Operation CloudsOperations.begin_update has a new required parameter cloud_resource_name
85+
- Operation CloudsOperations.begin_update has a new required parameter properties
86+
- Operation CloudsOperations.begin_update no longer has parameter body
87+
- Operation CloudsOperations.begin_update no longer has parameter cloud_name
88+
- Operation CloudsOperations.get has a new required parameter cloud_resource_name
89+
- Operation CloudsOperations.get no longer has parameter cloud_name
90+
- Operation InventoryItemsOperations.create has a new required parameter inventory_item_resource_name
91+
- Operation InventoryItemsOperations.create has a new required parameter resource
92+
- Operation InventoryItemsOperations.create no longer has parameter body
93+
- Operation InventoryItemsOperations.create no longer has parameter inventory_item_name
94+
- Operation InventoryItemsOperations.delete has a new required parameter inventory_item_resource_name
95+
- Operation InventoryItemsOperations.delete no longer has parameter inventory_item_name
96+
- Operation InventoryItemsOperations.get has a new required parameter inventory_item_resource_name
97+
- Operation InventoryItemsOperations.get no longer has parameter inventory_item_name
98+
- Operation VirtualMachineTemplatesOperations.begin_create_or_update has a new required parameter resource
99+
- Operation VirtualMachineTemplatesOperations.begin_create_or_update no longer has parameter body
100+
- Operation VirtualMachineTemplatesOperations.begin_update has a new required parameter properties
101+
- Operation VirtualMachineTemplatesOperations.begin_update no longer has parameter body
102+
- Operation VirtualNetworksOperations.begin_create_or_update has a new required parameter resource
103+
- Operation VirtualNetworksOperations.begin_create_or_update no longer has parameter body
104+
- Operation VirtualNetworksOperations.begin_update has a new required parameter properties
105+
- Operation VirtualNetworksOperations.begin_update no longer has parameter body
106+
- Operation VmmServersOperations.begin_create_or_update has a new required parameter resource
107+
- Operation VmmServersOperations.begin_create_or_update no longer has parameter body
108+
- Operation VmmServersOperations.begin_update has a new required parameter properties
109+
- Operation VmmServersOperations.begin_update no longer has parameter body
110+
- Parameter extended_location of model AvailabilitySet is now required
111+
- Parameter location of model AvailabilitySet is now required
112+
- Parameter value of model AvailabilitySetListResult is now required
113+
- Parameter value of model CloudListResult is now required
114+
- Parameter value of model VirtualMachineTemplateListResult is now required
115+
- Parameter value of model VirtualNetworkListResult is now required
116+
- Removed operation group VirtualMachinesOperations
117+
3118
## 1.0.0b2 (2022-11-23)
4119

5120
### Other Changes

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

Lines changed: 44 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,61 @@
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.7+.
4+
This package has been tested with Python 3.8+.
55
For a more complete view of Azure libraries, see the [azure sdk python release](https://aka.ms/azsdk/python/all).
66

77
## _Disclaimer_
88

99
_Azure SDK Python packages support for Python 2.7 has ended 01 January 2022. For more information and questions, please refer to https://github.com/Azure/azure-sdk-for-python/issues/20691_
1010

11-
# Usage
11+
## Getting started
1212

13+
### Prerequisites
1314

14-
To learn how to use this package, see the [quickstart guide](https://aka.ms/azsdk/python/mgmt)
15-
16-
For docs and references, see [Python SDK References](https://docs.microsoft.com/python/api/overview/azure/)
17-
Code samples for this package can be found at [Scvmm Management](https://docs.microsoft.com/samples/browse/?languages=python&term=Getting%20started%20-%20Managing&terms=Getting%20started%20-%20Managing) on docs.microsoft.com.
18-
Additional code samples for different Azure services are available at [Samples Repo](https://aka.ms/azsdk/python/mgmt/samples)
15+
- Python 3.8+ is required to use this package.
16+
- [Azure subscription](https://azure.microsoft.com/free/)
1917

18+
### Install the package
2019

21-
# Provide Feedback
20+
```bash
21+
pip install azure-mgmt-scvmm
22+
pip install azure-identity
23+
```
24+
25+
### Authentication
26+
27+
By default, [Azure Active Directory](https://aka.ms/awps/aad) token authentication depends on correct configure of following environment variables.
28+
29+
- `AZURE_CLIENT_ID` for Azure client ID.
30+
- `AZURE_TENANT_ID` for Azure tenant ID.
31+
- `AZURE_CLIENT_SECRET` for Azure client secret.
32+
33+
In addition, Azure subscription ID can be configured via environment variable `AZURE_SUBSCRIPTION_ID`.
34+
35+
With above configuration, client can be authenticated by following code:
36+
37+
```python
38+
from azure.identity import DefaultAzureCredential
39+
from azure.mgmt.scvmm import SCVMM
40+
import os
41+
42+
sub_id = os.getenv("AZURE_SUBSCRIPTION_ID")
43+
client = SCVMM(credential=DefaultAzureCredential(), subscription_id=sub_id)
44+
```
45+
46+
## Examples
47+
48+
Code samples for this package can be found at:
49+
- [Search Scvmm Management](https://docs.microsoft.com/samples/browse/?languages=python&term=Getting%20started%20-%20Managing&terms=Getting%20started%20-%20Managing) on docs.microsoft.com
50+
- [Azure Python Mgmt SDK Samples Repo](https://aka.ms/azsdk/python/mgmt/samples)
51+
52+
53+
## Troubleshooting
54+
55+
## Next steps
56+
57+
## Provide Feedback
2258

2359
If you encounter any bugs or have suggestions, please file an issue in the
2460
[Issues](https://github.com/Azure/azure-sdk-for-python/issues)
2561
section of the project.
26-
27-
28-
![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-scvmm%2FREADME.png)
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"commit": "7a54c1a83d14da431c0ae48c4315cba143084bce",
2+
"commit": "061505b89d5d0bbcc9f980e2276f79ff354ce286",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
4-
"autorest": "3.9.2",
4+
"autorest": "3.10.2",
55
"use": [
6-
"@autorest/python@6.2.7",
7-
"@autorest/modelerfour@4.24.3"
6+
"@autorest/python@6.13.19",
7+
"@autorest/modelerfour@4.27.0"
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.2.7 --use=@autorest/modelerfour@4.24.3 --version=3.9.2 --version-tolerant=False",
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/modelerfour@4.27.0 --version=3.10.2 --version-tolerant=False",
1010
"readme": "specification/scvmm/resource-manager/readme.md"
1111
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"AssetsRepo": "Azure/azure-sdk-assets",
3+
"AssetsRepoPrefixPath": "python",
4+
"TagPrefix": "python/scvmm/azure-mgmt-scvmm",
5+
"Tag": "python/scvmm/azure-mgmt-scvmm_3e1282e8af"
6+
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88

9-
from ._scvmm import SCVMM
9+
from ._sc_vmm_mgmt_client import ScVmmMgmtClient
1010
from ._version import VERSION
1111

1212
__version__ = VERSION
@@ -19,7 +19,7 @@
1919
from ._patch import patch_sdk as _patch_sdk
2020

2121
__all__ = [
22-
"SCVMM",
22+
"ScVmmMgmtClient",
2323
]
2424
__all__.extend([p for p in _patch_all if p not in __all__])
2525

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

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,44 +6,35 @@
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88

9-
import sys
109
from typing import Any, TYPE_CHECKING
1110

12-
from azure.core.configuration import Configuration
1311
from azure.core.pipeline import policies
1412
from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy
1513

1614
from ._version import VERSION
1715

18-
if sys.version_info >= (3, 8):
19-
from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports
20-
else:
21-
from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports
22-
2316
if TYPE_CHECKING:
2417
# pylint: disable=unused-import,ungrouped-imports
2518
from azure.core.credentials import TokenCredential
2619

2720

28-
class SCVMMConfiguration(Configuration): # pylint: disable=too-many-instance-attributes
29-
"""Configuration for SCVMM.
21+
class ScVmmMgmtClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long
22+
"""Configuration for ScVmmMgmtClient.
3023
3124
Note that all parameters used to create this instance are saved as instance
3225
attributes.
3326
3427
:param credential: Credential needed for the client to connect to Azure. Required.
3528
:type credential: ~azure.core.credentials.TokenCredential
36-
:param subscription_id: The Azure subscription ID. This is a GUID-formatted string (e.g.
37-
00000000-0000-0000-0000-000000000000). Required.
29+
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
3830
:type subscription_id: str
39-
:keyword api_version: Api Version. Default value is "2020-06-05-preview". Note that overriding
40-
this default value may result in unsupported behavior.
31+
:keyword api_version: Api Version. Default value is "2023-10-07". Note that overriding this
32+
default value may result in unsupported behavior.
4133
:paramtype api_version: str
4234
"""
4335

4436
def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None:
45-
super(SCVMMConfiguration, self).__init__(**kwargs)
46-
api_version: Literal["2020-06-05-preview"] = kwargs.pop("api_version", "2020-06-05-preview")
37+
api_version: str = kwargs.pop("api_version", "2023-10-07")
4738

4839
if credential is None:
4940
raise ValueError("Parameter 'credential' must not be None.")
@@ -55,6 +46,7 @@ def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs
5546
self.api_version = api_version
5647
self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"])
5748
kwargs.setdefault("sdk_moniker", "mgmt-scvmm/{}".format(VERSION))
49+
self.polling_interval = kwargs.get("polling_interval", 30)
5850
self._configure(**kwargs)
5951

6052
def _configure(self, **kwargs: Any) -> None:
@@ -63,9 +55,9 @@ def _configure(self, **kwargs: Any) -> None:
6355
self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs)
6456
self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs)
6557
self.http_logging_policy = kwargs.get("http_logging_policy") or ARMHttpLoggingPolicy(**kwargs)
66-
self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs)
6758
self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs)
6859
self.redirect_policy = kwargs.get("redirect_policy") or policies.RedirectPolicy(**kwargs)
60+
self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs)
6961
self.authentication_policy = kwargs.get("authentication_policy")
7062
if self.credential and not self.authentication_policy:
7163
self.authentication_policy = ARMChallengeAuthenticationPolicy(

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
#
2626
# --------------------------------------------------------------------------
2727

28+
2829
# This file is used for handwritten extensions to the generated code. Example:
2930
# https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md
3031
def patch_sdk():

0 commit comments

Comments
 (0)