Skip to content

Commit 9706c13

Browse files
[AutoRelease] t2-networkcloud-2024-11-07-24143(can only be merged by SDK owner) (#38381)
* code and test * Update CHANGELOG.md * Update CHANGELOG.md * Update CHANGELOG.md * Update CHANGELOG.md * update testcases * update-testcases * update code format * Update CHANGELOG.md * Update CHANGELOG.md --------- Co-authored-by: azure-sdk <PythonSdkPipelines> Co-authored-by: ChenxiJiang333 <119990644+ChenxiJiang333@users.noreply.github.com> Co-authored-by: ChenxiJiang333 <v-chenjiang@microsoft.com>
1 parent e744c71 commit 9706c13

262 files changed

Lines changed: 17212 additions & 9066 deletions

File tree

Some content is hidden

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

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

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

3+
## 2.0.0b1 (2024-11-21)
4+
5+
### Features Added
6+
7+
- Client `NetworkCloudMgmtClient` added operation group `kubernetes_cluster_features`
8+
- Model `AgentPoolPatchParameters` added property `administrator_configuration`
9+
- Model `AgentPoolUpgradeSettings` added property `drain_timeout`
10+
- Model `AgentPoolUpgradeSettings` added property `max_unavailable`
11+
- Model `BareMetalMachine` added property `machine_cluster_version`
12+
- Model `BareMetalMachine` added property `machine_roles`
13+
- Model `BareMetalMachine` added property `runtime_protection_status`
14+
- Model `BareMetalMachine` added property `secret_rotation_status`
15+
- Model `Cluster` added property `identity`
16+
- Model `Cluster` added property `command_output_settings`
17+
- Model `Cluster` added property `runtime_protection_configuration`
18+
- Model `Cluster` added property `secret_archive`
19+
- Model `Cluster` added property `update_strategy`
20+
- Enum `ClusterConnectionStatus` added member `DISCONNECTED`
21+
- Enum `ClusterDetailedStatus` added member `UPDATE_PAUSED`
22+
- Model `ClusterManager` added property `identity`
23+
- Model `ClusterManagerPatchParameters` added property `identity`
24+
- Model `ClusterPatchParameters` added property `identity`
25+
- Model `ClusterPatchParameters` added property `command_output_settings`
26+
- Model `ClusterPatchParameters` added property `runtime_protection_configuration`
27+
- Model `ClusterPatchParameters` added property `secret_archive`
28+
- Model `ClusterPatchParameters` added property `update_strategy`
29+
- Model `ControlPlaneNodePatchConfiguration` added property `administrator_configuration`
30+
- Model `KeySetUser` added property `user_principal_name`
31+
- Model `KubernetesClusterPatchParameters` added property `administrator_configuration`
32+
- Model `NetworkConfiguration` added property `l2_service_load_balancer_configuration`
33+
- Model `OperationStatusResult` added property `exit_code`
34+
- Model `OperationStatusResult` added property `output_head`
35+
- Model `OperationStatusResult` added property `result_ref`
36+
- Model `OperationStatusResult` added property `result_url`
37+
- Enum `RackSkuProvisioningState` added member `CANCELED`
38+
- Enum `RackSkuProvisioningState` added member `FAILED`
39+
- Model `StorageAppliance` added property `manufacturer`
40+
- Model `StorageAppliance` added property `model`
41+
- Model `StorageAppliance` added property `secret_rotation_status`
42+
- Model `StorageAppliance` added property `version`
43+
- Added model `AdministratorConfigurationPatch`
44+
- Added enum `ClusterContinueUpdateVersionMachineGroupTargetingMode`
45+
- Added model `ClusterContinueUpdateVersionParameters`
46+
- Added model `ClusterScanRuntimeParameters`
47+
- Added enum `ClusterScanRuntimeParametersScanActivity`
48+
- Added model `ClusterSecretArchive`
49+
- Added enum `ClusterSecretArchiveEnabled`
50+
- Added model `ClusterUpdateStrategy`
51+
- Added enum `ClusterUpdateStrategyType`
52+
- Added model `CommandOutputSettings`
53+
- Added model `IdentitySelector`
54+
- Added model `KubernetesClusterFeature`
55+
- Added enum `KubernetesClusterFeatureAvailabilityLifecycle`
56+
- Added enum `KubernetesClusterFeatureDetailedStatus`
57+
- Added model `KubernetesClusterFeatureList`
58+
- Added model `KubernetesClusterFeaturePatchParameters`
59+
- Added enum `KubernetesClusterFeatureProvisioningState`
60+
- Added enum `KubernetesClusterFeatureRequired`
61+
- Added model `L2ServiceLoadBalancerConfiguration`
62+
- Added model `ManagedServiceIdentity`
63+
- Added enum `ManagedServiceIdentitySelectorType`
64+
- Added enum `ManagedServiceIdentityType`
65+
- Added model `NodePoolAdministratorConfigurationPatch`
66+
- Added model `RuntimeProtectionConfiguration`
67+
- Added enum `RuntimeProtectionEnforcementLevel`
68+
- Added model `RuntimeProtectionStatus`
69+
- Added model `SecretArchiveReference`
70+
- Added model `SecretRotationStatus`
71+
- Added model `StringKeyValuePair`
72+
- Added model `UserAssignedIdentity`
73+
- Operation group `ClustersOperations` added method `begin_continue_update_version`
74+
- Operation group `ClustersOperations` added method `begin_scan_runtime`
75+
- Added operation group `KubernetesClusterFeaturesOperations`
76+
77+
### Breaking Changes
78+
79+
- Parameter `max_surge` of model `AgentPoolUpgradeSettings` is no longer required
80+
381
## 1.0.0 (2023-08-18)
482

583
### Breaking Changes

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

Lines changed: 2 additions & 5 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 Networkcloud 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_
@@ -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.7+ is required to use this package.
15+
- Python 3.8+ is required to use this package.
1616
- [Azure subscription](https://azure.microsoft.com/free/)
1717

1818
### Install the package
@@ -59,6 +59,3 @@ Code samples for this package can be found at:
5959
If you encounter any bugs or have suggestions, please file an issue in the
6060
[Issues](https://github.com/Azure/azure-sdk-for-python/issues)
6161
section of the project.
62-
63-
64-
![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-networkcloud%2FREADME.png)
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"commit": "14d24d17491d8c2bde24532cb8cc2d663c0ffd9f",
2+
"commit": "735c26627331047d1c74526d171933af00d8c5d1",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
4-
"autorest": "3.9.7",
4+
"autorest": "3.10.2",
55
"use": [
6-
"@autorest/python@6.7.1",
7-
"@autorest/modelerfour@4.26.2"
6+
"@autorest/python@6.19.0",
7+
"@autorest/modelerfour@4.27.0"
88
],
9-
"autorest_command": "autorest specification/networkcloud/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.7.1 --use=@autorest/modelerfour@4.26.2 --version=3.9.7 --version-tolerant=False",
9+
"autorest_command": "autorest specification/networkcloud/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 --tag=package-2024-06-01-preview --use=@autorest/python@6.19.0 --use=@autorest/modelerfour@4.27.0 --version=3.10.2 --version-tolerant=False",
1010
"readme": "specification/networkcloud/resource-manager/readme.md"
1111
}

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

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
from typing import Any, TYPE_CHECKING
1010

11-
from azure.core.configuration import Configuration
1211
from azure.core.pipeline import policies
1312
from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy
1413

@@ -19,7 +18,7 @@
1918
from azure.core.credentials import TokenCredential
2019

2120

22-
class NetworkCloudMgmtClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes
21+
class NetworkCloudMgmtClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long
2322
"""Configuration for NetworkCloudMgmtClient.
2423
2524
Note that all parameters used to create this instance are saved as instance
@@ -29,14 +28,13 @@ class NetworkCloudMgmtClientConfiguration(Configuration): # pylint: disable=too
2928
:type credential: ~azure.core.credentials.TokenCredential
3029
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
3130
:type subscription_id: str
32-
:keyword api_version: Api Version. Default value is "2023-07-01". Note that overriding this
33-
default value may result in unsupported behavior.
31+
:keyword api_version: Api Version. Default value is "2024-06-01-preview". Note that overriding
32+
this default value may result in unsupported behavior.
3433
:paramtype api_version: str
3534
"""
3635

3736
def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None:
38-
super(NetworkCloudMgmtClientConfiguration, self).__init__(**kwargs)
39-
api_version: str = kwargs.pop("api_version", "2023-07-01")
37+
api_version: str = kwargs.pop("api_version", "2024-06-01-preview")
4038

4139
if credential is None:
4240
raise ValueError("Parameter 'credential' must not be None.")
@@ -48,6 +46,7 @@ def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs
4846
self.api_version = api_version
4947
self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"])
5048
kwargs.setdefault("sdk_moniker", "mgmt-networkcloud/{}".format(VERSION))
49+
self.polling_interval = kwargs.get("polling_interval", 30)
5150
self._configure(**kwargs)
5251

5352
def _configure(self, **kwargs: Any) -> None:
@@ -56,9 +55,9 @@ def _configure(self, **kwargs: Any) -> None:
5655
self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs)
5756
self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs)
5857
self.http_logging_policy = kwargs.get("http_logging_policy") or ARMHttpLoggingPolicy(**kwargs)
59-
self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs)
6058
self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs)
6159
self.redirect_policy = kwargs.get("redirect_policy") or policies.RedirectPolicy(**kwargs)
60+
self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs)
6261
self.authentication_policy = kwargs.get("authentication_policy")
6362
if self.credential and not self.authentication_policy:
6463
self.authentication_policy = ARMChallengeAuthenticationPolicy(

sdk/networkcloud/azure-mgmt-networkcloud/azure/mgmt/networkcloud/_network_cloud_mgmt_client.py

Lines changed: 36 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,12 @@
88

99
from copy import deepcopy
1010
from typing import Any, TYPE_CHECKING
11+
from typing_extensions import Self
1112

13+
from azure.core.pipeline import policies
1214
from azure.core.rest import HttpRequest, HttpResponse
1315
from azure.mgmt.core import ARMPipelineClient
16+
from azure.mgmt.core.policies import ARMAutoResourceProviderRegistrationPolicy
1417

1518
from . import models as _models
1619
from ._configuration import NetworkCloudMgmtClientConfiguration
@@ -24,6 +27,7 @@
2427
ClusterManagersOperations,
2528
ClustersOperations,
2629
ConsolesOperations,
30+
KubernetesClusterFeaturesOperations,
2731
KubernetesClustersOperations,
2832
L2NetworksOperations,
2933
L3NetworksOperations,
@@ -43,8 +47,8 @@
4347

4448

4549
class NetworkCloudMgmtClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes
46-
"""The Network Cloud APIs provide management of the on-premises clusters and their resources, such
47-
as, racks, bare metal hosts, virtual machines, workload networks and more.
50+
"""The Network Cloud APIs provide management of the Azure Operator Nexus compute resources such as
51+
on-premises clusters, hardware resources, and workload infrastructure resources.
4852
4953
:ivar operations: Operations operations
5054
:vartype operations: azure.mgmt.networkcloud.operations.Operations
@@ -85,6 +89,9 @@ class NetworkCloudMgmtClient: # pylint: disable=client-accepts-api-version-keyw
8589
azure.mgmt.networkcloud.operations.MetricsConfigurationsOperations
8690
:ivar agent_pools: AgentPoolsOperations operations
8791
:vartype agent_pools: azure.mgmt.networkcloud.operations.AgentPoolsOperations
92+
:ivar kubernetes_cluster_features: KubernetesClusterFeaturesOperations operations
93+
:vartype kubernetes_cluster_features:
94+
azure.mgmt.networkcloud.operations.KubernetesClusterFeaturesOperations
8895
:ivar consoles: ConsolesOperations operations
8996
:vartype consoles: azure.mgmt.networkcloud.operations.ConsolesOperations
9097
:param credential: Credential needed for the client to connect to Azure. Required.
@@ -93,8 +100,8 @@ class NetworkCloudMgmtClient: # pylint: disable=client-accepts-api-version-keyw
93100
:type subscription_id: str
94101
:param base_url: Service URL. Default value is "https://management.azure.com".
95102
:type base_url: str
96-
:keyword api_version: Api Version. Default value is "2023-07-01". Note that overriding this
97-
default value may result in unsupported behavior.
103+
:keyword api_version: Api Version. Default value is "2024-06-01-preview". Note that overriding
104+
this default value may result in unsupported behavior.
98105
:paramtype api_version: str
99106
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
100107
Retry-After header is present.
@@ -110,7 +117,25 @@ def __init__(
110117
self._config = NetworkCloudMgmtClientConfiguration(
111118
credential=credential, subscription_id=subscription_id, **kwargs
112119
)
113-
self._client: ARMPipelineClient = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
120+
_policies = kwargs.pop("policies", None)
121+
if _policies is None:
122+
_policies = [
123+
policies.RequestIdPolicy(**kwargs),
124+
self._config.headers_policy,
125+
self._config.user_agent_policy,
126+
self._config.proxy_policy,
127+
policies.ContentDecodePolicy(**kwargs),
128+
ARMAutoResourceProviderRegistrationPolicy(),
129+
self._config.redirect_policy,
130+
self._config.retry_policy,
131+
self._config.authentication_policy,
132+
self._config.custom_hook_policy,
133+
self._config.logging_policy,
134+
policies.DistributedTracingPolicy(**kwargs),
135+
policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None,
136+
self._config.http_logging_policy,
137+
]
138+
self._client: ARMPipelineClient = ARMPipelineClient(base_url=base_url, policies=_policies, **kwargs)
114139

115140
client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)}
116141
self._serialize = Serializer(client_models)
@@ -152,9 +177,12 @@ def __init__(
152177
self._client, self._config, self._serialize, self._deserialize
153178
)
154179
self.agent_pools = AgentPoolsOperations(self._client, self._config, self._serialize, self._deserialize)
180+
self.kubernetes_cluster_features = KubernetesClusterFeaturesOperations(
181+
self._client, self._config, self._serialize, self._deserialize
182+
)
155183
self.consoles = ConsolesOperations(self._client, self._config, self._serialize, self._deserialize)
156184

157-
def _send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse:
185+
def _send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse:
158186
"""Runs the network request through the client's chained policies.
159187
160188
>>> from azure.core.rest import HttpRequest
@@ -174,12 +202,12 @@ def _send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse:
174202

175203
request_copy = deepcopy(request)
176204
request_copy.url = self._client.format_url(request_copy.url)
177-
return self._client.send_request(request_copy, **kwargs)
205+
return self._client.send_request(request_copy, stream=stream, **kwargs) # type: ignore
178206

179207
def close(self) -> None:
180208
self._client.close()
181209

182-
def __enter__(self) -> "NetworkCloudMgmtClient":
210+
def __enter__(self) -> Self:
183211
self._client.__enter__()
184212
return self
185213

0 commit comments

Comments
 (0)