Skip to content

Commit da9983e

Browse files
author
SDKAuto
committed
CodeGen from PR 34270 in Azure/azure-rest-api-specs
Merge 447c4193246efcde66d0d0feaa59da2c756c794f into a19648565889eaae019e531c15f3045d1244c7ce
1 parent 6c30600 commit da9983e

Some content is hidden

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

46 files changed

+843
-665
lines changed

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

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

3+
## 1.0.0 (2025-05-13)
4+
5+
### Features Added
6+
7+
- Method `Operation.__init__` has a new overload `def __init__(self: None, display: Optional[_models.OperationDisplay])`
8+
39
## 1.0.0b1 (2024-10-20)
410

511
### Other Changes

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

Lines changed: 3 additions & 3 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 Containerorchestratorruntime Management Client Library.
4-
This package has been tested with Python 3.8+.
4+
This package has been tested with Python 3.9+.
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.8+ is required to use this package.
15+
- Python 3.9+ is required to use this package.
1616
- [Azure subscription](https://azure.microsoft.com/free/)
1717

1818
### Install the package
@@ -24,7 +24,7 @@ pip install azure-identity
2424

2525
### Authentication
2626

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

2929
- `AZURE_CLIENT_ID` for Azure client ID.
3030
- `AZURE_TENANT_ID` for Azure tenant ID.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"commit": "399cbac2de1bc0acbed4c9a0a864a9c84da3692e",
2+
"commit": "5ab69662eff4ee3c2bc93c2a4959470ab9867c99",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
44
"typespec_src": "specification/kubernetesruntime/KubernetesRuntime.Management",
5-
"@azure-tools/typespec-python": "0.33.0"
5+
"@azure-tools/typespec-python": "0.44.2"
66
}
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
{
2+
"CrossLanguagePackageId": "Microsoft.KubernetesRuntime",
3+
"CrossLanguageDefinitionId": {
4+
"azure.mgmt.containerorchestratorruntime.models.Resource": "Azure.ResourceManager.CommonTypes.Resource",
5+
"azure.mgmt.containerorchestratorruntime.models.ExtensionResource": "Azure.ResourceManager.CommonTypes.ExtensionResource",
6+
"azure.mgmt.containerorchestratorruntime.models.BgpPeer": "Microsoft.KubernetesRuntime.BgpPeer",
7+
"azure.mgmt.containerorchestratorruntime.models.BgpPeerProperties": "Microsoft.KubernetesRuntime.BgpPeerProperties",
8+
"azure.mgmt.containerorchestratorruntime.models.StorageClassTypeProperties": "Microsoft.KubernetesRuntime.StorageClassTypeProperties",
9+
"azure.mgmt.containerorchestratorruntime.models.BlobStorageClassTypeProperties": "Microsoft.KubernetesRuntime.BlobStorageClassTypeProperties",
10+
"azure.mgmt.containerorchestratorruntime.models.ErrorAdditionalInfo": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo",
11+
"azure.mgmt.containerorchestratorruntime.models.ErrorDetail": "Azure.ResourceManager.CommonTypes.ErrorDetail",
12+
"azure.mgmt.containerorchestratorruntime.models.ErrorResponse": "Azure.ResourceManager.CommonTypes.ErrorResponse",
13+
"azure.mgmt.containerorchestratorruntime.models.LoadBalancer": "Microsoft.KubernetesRuntime.LoadBalancer",
14+
"azure.mgmt.containerorchestratorruntime.models.LoadBalancerProperties": "Microsoft.KubernetesRuntime.LoadBalancerProperties",
15+
"azure.mgmt.containerorchestratorruntime.models.NativeStorageClassTypeProperties": "Microsoft.KubernetesRuntime.NativeStorageClassTypeProperties",
16+
"azure.mgmt.containerorchestratorruntime.models.NfsStorageClassTypeProperties": "Microsoft.KubernetesRuntime.NfsStorageClassTypeProperties",
17+
"azure.mgmt.containerorchestratorruntime.models.Operation": "Azure.ResourceManager.CommonTypes.Operation",
18+
"azure.mgmt.containerorchestratorruntime.models.OperationDisplay": "Azure.ResourceManager.CommonTypes.OperationDisplay",
19+
"azure.mgmt.containerorchestratorruntime.models.RwxStorageClassTypeProperties": "Microsoft.KubernetesRuntime.RwxStorageClassTypeProperties",
20+
"azure.mgmt.containerorchestratorruntime.models.ServiceProperties": "Microsoft.KubernetesRuntime.ServiceProperties",
21+
"azure.mgmt.containerorchestratorruntime.models.ServiceResource": "Microsoft.KubernetesRuntime.ServiceResource",
22+
"azure.mgmt.containerorchestratorruntime.models.SmbStorageClassTypeProperties": "Microsoft.KubernetesRuntime.SmbStorageClassTypeProperties",
23+
"azure.mgmt.containerorchestratorruntime.models.StorageClassProperties": "Microsoft.KubernetesRuntime.StorageClassProperties",
24+
"azure.mgmt.containerorchestratorruntime.models.StorageClassPropertiesUpdate": "Microsoft.KubernetesRuntime.StorageClassPropertiesUpdate",
25+
"azure.mgmt.containerorchestratorruntime.models.StorageClassResource": "Microsoft.KubernetesRuntime.StorageClassResource",
26+
"azure.mgmt.containerorchestratorruntime.models.StorageClassResourceUpdate": "Microsoft.KubernetesRuntime.StorageClassResourceUpdate",
27+
"azure.mgmt.containerorchestratorruntime.models.StorageClassTypePropertiesUpdate": "Microsoft.KubernetesRuntime.StorageClassTypePropertiesUpdate",
28+
"azure.mgmt.containerorchestratorruntime.models.SystemData": "Azure.ResourceManager.CommonTypes.SystemData",
29+
"azure.mgmt.containerorchestratorruntime.models.CreatedByType": "Azure.ResourceManager.CommonTypes.createdByType",
30+
"azure.mgmt.containerorchestratorruntime.models.VolumeExpansion": "Microsoft.KubernetesRuntime.VolumeExpansion",
31+
"azure.mgmt.containerorchestratorruntime.models.VolumeBindingMode": "Microsoft.KubernetesRuntime.VolumeBindingMode",
32+
"azure.mgmt.containerorchestratorruntime.models.AccessMode": "Microsoft.KubernetesRuntime.AccessMode",
33+
"azure.mgmt.containerorchestratorruntime.models.DataResilienceTier": "Microsoft.KubernetesRuntime.DataResilienceTier",
34+
"azure.mgmt.containerorchestratorruntime.models.FailoverTier": "Microsoft.KubernetesRuntime.FailoverTier",
35+
"azure.mgmt.containerorchestratorruntime.models.PerformanceTier": "Microsoft.KubernetesRuntime.PerformanceTier",
36+
"azure.mgmt.containerorchestratorruntime.models.SCType": "Microsoft.KubernetesRuntime.SCType",
37+
"azure.mgmt.containerorchestratorruntime.models.NfsDirectoryActionOnVolumeDeletion": "Microsoft.KubernetesRuntime.NfsDirectoryActionOnVolumeDeletion",
38+
"azure.mgmt.containerorchestratorruntime.models.ProvisioningState": "Microsoft.KubernetesRuntime.ProvisioningState",
39+
"azure.mgmt.containerorchestratorruntime.models.Origin": "Azure.ResourceManager.CommonTypes.Origin",
40+
"azure.mgmt.containerorchestratorruntime.models.ActionType": "Azure.ResourceManager.CommonTypes.ActionType",
41+
"azure.mgmt.containerorchestratorruntime.models.AdvertiseMode": "Microsoft.KubernetesRuntime.AdvertiseMode",
42+
"azure.mgmt.containerorchestratorruntime.operations.StorageClassOperations.get": "Microsoft.KubernetesRuntime.StorageClass.get",
43+
"azure.mgmt.containerorchestratorruntime.aio.operations.StorageClassOperations.get": "Microsoft.KubernetesRuntime.StorageClass.get",
44+
"azure.mgmt.containerorchestratorruntime.operations.StorageClassOperations.begin_create_or_update": "Microsoft.KubernetesRuntime.StorageClass.createOrUpdate",
45+
"azure.mgmt.containerorchestratorruntime.aio.operations.StorageClassOperations.begin_create_or_update": "Microsoft.KubernetesRuntime.StorageClass.createOrUpdate",
46+
"azure.mgmt.containerorchestratorruntime.operations.StorageClassOperations.begin_update": "Microsoft.KubernetesRuntime.StorageClass.update",
47+
"azure.mgmt.containerorchestratorruntime.aio.operations.StorageClassOperations.begin_update": "Microsoft.KubernetesRuntime.StorageClass.update",
48+
"azure.mgmt.containerorchestratorruntime.operations.StorageClassOperations.begin_delete": "Microsoft.KubernetesRuntime.StorageClass.delete",
49+
"azure.mgmt.containerorchestratorruntime.aio.operations.StorageClassOperations.begin_delete": "Microsoft.KubernetesRuntime.StorageClass.delete",
50+
"azure.mgmt.containerorchestratorruntime.operations.StorageClassOperations.list": "Microsoft.KubernetesRuntime.StorageClass.list",
51+
"azure.mgmt.containerorchestratorruntime.aio.operations.StorageClassOperations.list": "Microsoft.KubernetesRuntime.StorageClass.list",
52+
"azure.mgmt.containerorchestratorruntime.operations.Operations.list": "Azure.ResourceManager.Operations.list",
53+
"azure.mgmt.containerorchestratorruntime.aio.operations.Operations.list": "Azure.ResourceManager.Operations.list",
54+
"azure.mgmt.containerorchestratorruntime.operations.LoadBalancersOperations.get": "Microsoft.KubernetesRuntime.LoadBalancers.get",
55+
"azure.mgmt.containerorchestratorruntime.aio.operations.LoadBalancersOperations.get": "Microsoft.KubernetesRuntime.LoadBalancers.get",
56+
"azure.mgmt.containerorchestratorruntime.operations.LoadBalancersOperations.begin_create_or_update": "Microsoft.KubernetesRuntime.LoadBalancers.createOrUpdate",
57+
"azure.mgmt.containerorchestratorruntime.aio.operations.LoadBalancersOperations.begin_create_or_update": "Microsoft.KubernetesRuntime.LoadBalancers.createOrUpdate",
58+
"azure.mgmt.containerorchestratorruntime.operations.LoadBalancersOperations.delete": "Microsoft.KubernetesRuntime.LoadBalancers.delete",
59+
"azure.mgmt.containerorchestratorruntime.aio.operations.LoadBalancersOperations.delete": "Microsoft.KubernetesRuntime.LoadBalancers.delete",
60+
"azure.mgmt.containerorchestratorruntime.operations.LoadBalancersOperations.list": "Microsoft.KubernetesRuntime.LoadBalancers.list",
61+
"azure.mgmt.containerorchestratorruntime.aio.operations.LoadBalancersOperations.list": "Microsoft.KubernetesRuntime.LoadBalancers.list",
62+
"azure.mgmt.containerorchestratorruntime.operations.BgpPeersOperations.get": "Microsoft.KubernetesRuntime.BgpPeers.get",
63+
"azure.mgmt.containerorchestratorruntime.aio.operations.BgpPeersOperations.get": "Microsoft.KubernetesRuntime.BgpPeers.get",
64+
"azure.mgmt.containerorchestratorruntime.operations.BgpPeersOperations.begin_create_or_update": "Microsoft.KubernetesRuntime.BgpPeers.createOrUpdate",
65+
"azure.mgmt.containerorchestratorruntime.aio.operations.BgpPeersOperations.begin_create_or_update": "Microsoft.KubernetesRuntime.BgpPeers.createOrUpdate",
66+
"azure.mgmt.containerorchestratorruntime.operations.BgpPeersOperations.delete": "Microsoft.KubernetesRuntime.BgpPeers.delete",
67+
"azure.mgmt.containerorchestratorruntime.aio.operations.BgpPeersOperations.delete": "Microsoft.KubernetesRuntime.BgpPeers.delete",
68+
"azure.mgmt.containerorchestratorruntime.operations.BgpPeersOperations.list": "Microsoft.KubernetesRuntime.BgpPeers.list",
69+
"azure.mgmt.containerorchestratorruntime.aio.operations.BgpPeersOperations.list": "Microsoft.KubernetesRuntime.BgpPeers.list",
70+
"azure.mgmt.containerorchestratorruntime.operations.ServicesOperations.get": "Microsoft.KubernetesRuntime.Services.get",
71+
"azure.mgmt.containerorchestratorruntime.aio.operations.ServicesOperations.get": "Microsoft.KubernetesRuntime.Services.get",
72+
"azure.mgmt.containerorchestratorruntime.operations.ServicesOperations.create_or_update": "Microsoft.KubernetesRuntime.Services.createOrUpdate",
73+
"azure.mgmt.containerorchestratorruntime.aio.operations.ServicesOperations.create_or_update": "Microsoft.KubernetesRuntime.Services.createOrUpdate",
74+
"azure.mgmt.containerorchestratorruntime.operations.ServicesOperations.delete": "Microsoft.KubernetesRuntime.Services.delete",
75+
"azure.mgmt.containerorchestratorruntime.aio.operations.ServicesOperations.delete": "Microsoft.KubernetesRuntime.Services.delete",
76+
"azure.mgmt.containerorchestratorruntime.operations.ServicesOperations.list": "Microsoft.KubernetesRuntime.Services.list",
77+
"azure.mgmt.containerorchestratorruntime.aio.operations.ServicesOperations.list": "Microsoft.KubernetesRuntime.Services.list"
78+
}
79+
}

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

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,28 @@
55
# Code generated by Microsoft (R) Python Code Generator.
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
8+
# pylint: disable=wrong-import-position
89

9-
from ._client import ContainerOrchestratorRuntimeMgmtClient
10+
from typing import TYPE_CHECKING
11+
12+
if TYPE_CHECKING:
13+
from ._patch import * # pylint: disable=unused-wildcard-import
14+
15+
from ._client import ContainerOrchestratorRuntimeMgmtClient # type: ignore
1016
from ._version import VERSION
1117

1218
__version__ = VERSION
1319

1420
try:
1521
from ._patch import __all__ as _patch_all
16-
from ._patch import * # pylint: disable=unused-wildcard-import
22+
from ._patch import *
1723
except ImportError:
1824
_patch_all = []
1925
from ._patch import patch_sdk as _patch_sdk
2026

2127
__all__ = [
2228
"ContainerOrchestratorRuntimeMgmtClient",
2329
]
24-
__all__.extend([p for p in _patch_all if p not in __all__])
30+
__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore
2531

2632
_patch_sdk()

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

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,18 @@
77
# --------------------------------------------------------------------------
88

99
from copy import deepcopy
10-
from typing import Any, TYPE_CHECKING
10+
from typing import Any, Optional, TYPE_CHECKING, cast
1111
from typing_extensions import Self
1212

1313
from azure.core.pipeline import policies
1414
from azure.core.rest import HttpRequest, HttpResponse
15+
from azure.core.settings import settings
1516
from azure.mgmt.core import ARMPipelineClient
1617
from azure.mgmt.core.policies import ARMAutoResourceProviderRegistrationPolicy
18+
from azure.mgmt.core.tools import get_arm_endpoints
1719

1820
from ._configuration import ContainerOrchestratorRuntimeMgmtClientConfiguration
19-
from ._serialization import Deserializer, Serializer
21+
from ._utils.serialization import Deserializer, Serializer
2022
from .operations import (
2123
BgpPeersOperations,
2224
LoadBalancersOperations,
@@ -26,11 +28,10 @@
2628
)
2729

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

3233

33-
class ContainerOrchestratorRuntimeMgmtClient: # pylint: disable=client-accepts-api-version-keyword
34+
class ContainerOrchestratorRuntimeMgmtClient:
3435
"""ContainerOrchestratorRuntimeMgmtClient.
3536
3637
:ivar storage_class: StorageClassOperations operations
@@ -47,7 +48,7 @@ class ContainerOrchestratorRuntimeMgmtClient: # pylint: disable=client-accepts-
4748
:vartype services: azure.mgmt.containerorchestratorruntime.operations.ServicesOperations
4849
:param credential: Credential used to authenticate requests to the service. Required.
4950
:type credential: ~azure.core.credentials.TokenCredential
50-
:param base_url: Service host. Default value is "https://management.azure.com".
51+
:param base_url: Service host. Default value is None.
5152
:type base_url: str
5253
:keyword api_version: The API version to use for this operation. Default value is "2024-03-01".
5354
Note that overriding this default value may result in unsupported behavior.
@@ -56,13 +57,17 @@ class ContainerOrchestratorRuntimeMgmtClient: # pylint: disable=client-accepts-
5657
Retry-After header is present.
5758
"""
5859

59-
def __init__(
60-
self, credential: "TokenCredential", base_url: str = "https://management.azure.com", **kwargs: Any
61-
) -> None:
60+
def __init__(self, credential: "TokenCredential", base_url: Optional[str] = None, **kwargs: Any) -> None:
6261
_endpoint = "{endpoint}"
62+
_cloud = kwargs.pop("cloud_setting", None) or settings.current.azure_cloud # type: ignore
63+
_endpoints = get_arm_endpoints(_cloud)
64+
if not base_url:
65+
base_url = _endpoints["resource_manager"]
66+
credential_scopes = kwargs.pop("credential_scopes", _endpoints["credential_scopes"])
6367
self._config = ContainerOrchestratorRuntimeMgmtClientConfiguration(
64-
credential=credential, base_url=base_url, **kwargs
68+
credential=credential, base_url=cast(str, base_url), credential_scopes=credential_scopes, **kwargs
6569
)
70+
6671
_policies = kwargs.pop("policies", None)
6772
if _policies is None:
6873
_policies = [
@@ -81,7 +86,7 @@ def __init__(
8186
policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None,
8287
self._config.http_logging_policy,
8388
]
84-
self._client: ARMPipelineClient = ARMPipelineClient(base_url=_endpoint, policies=_policies, **kwargs)
89+
self._client: ARMPipelineClient = ARMPipelineClient(base_url=cast(str, _endpoint), policies=_policies, **kwargs)
8590

8691
self._serialize = Serializer()
8792
self._deserialize = Deserializer()

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
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

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
# ------------------------------------
2-
# Copyright (c) Microsoft Corporation.
3-
# Licensed under the MIT License.
4-
# ------------------------------------
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for license information.
5+
# --------------------------------------------------------------------------
56
"""Customize generated code here.
67
78
Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# --------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See License.txt in the project root for license information.
4+
# Code generated by Microsoft (R) Python Code Generator.
5+
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
6+
# --------------------------------------------------------------------------

0 commit comments

Comments
 (0)