Skip to content

Commit 333ade2

Browse files
[AutoRelease] t2-redhatopenshift-2026-01-22-31664(can only be merged by SDK owner) (#44791)
* code and test * update changelog * Update CHANGELOG.md --------- Co-authored-by: azure-sdk <PythonSdkPipelines> Co-authored-by: ChenxiJiang333 <v-chenjiang@microsoft.com> Co-authored-by: ChenxiJiang333 <119990644+ChenxiJiang333@users.noreply.github.com>
1 parent b8707c3 commit 333ade2

File tree

84 files changed

+2331
-7419
lines changed

Some content is hidden

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

84 files changed

+2331
-7419
lines changed

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

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

3+
## 3.0.0 (2026-02-06)
4+
5+
### Features Added
6+
7+
- Model `AzureRedHatOpenShiftClient` added parameter `cloud_setting` in method `__init__`
8+
- Client `AzureRedHatOpenShiftClient` added operation group `platform_workload_identity_role_sets`
9+
- Client `AzureRedHatOpenShiftClient` added operation group `platform_workload_identity_role_set`
10+
- Model `ClusterProfile` added property `oidc_issuer`
11+
- Model `OpenShiftCluster` added property `identity`
12+
- Model `OpenShiftCluster` added property `platform_workload_identity_profile`
13+
- Model `OpenShiftClusterUpdate` added property `identity`
14+
- Model `OpenShiftClusterUpdate` added property `platform_workload_identity_profile`
15+
- Added model `ManagedServiceIdentity`
16+
- Added enum `ManagedServiceIdentityType`
17+
- Added model `PlatformWorkloadIdentity`
18+
- Added model `PlatformWorkloadIdentityProfile`
19+
- Added model `PlatformWorkloadIdentityRole`
20+
- Added model `PlatformWorkloadIdentityRoleSet`
21+
- Added model `PlatformWorkloadIdentityRoleSetList`
22+
- Added model `UserAssignedIdentity`
23+
- Added operation group `PlatformWorkloadIdentityRoleSetOperations`
24+
- Added operation group `PlatformWorkloadIdentityRoleSetsOperations`
25+
26+
### Breaking Changes
27+
28+
- Deleted or renamed client operation group `AzureRedHatOpenShiftClient.machine_pools`
29+
- Deleted or renamed client operation group `AzureRedHatOpenShiftClient.secrets`
30+
- Deleted or renamed client operation group `AzureRedHatOpenShiftClient.sync_identity_providers`
31+
- Deleted or renamed client operation group `AzureRedHatOpenShiftClient.sync_sets`
32+
- Model `OpenShiftClusterUpdate` deleted or renamed its instance variable `system_data`
33+
- Deleted or renamed model `MachinePool`
34+
- Deleted or renamed model `MachinePoolList`
35+
- Deleted or renamed model `MachinePoolUpdate`
36+
- Deleted or renamed model `Secret`
37+
- Deleted or renamed model `SecretList`
38+
- Deleted or renamed model `SecretUpdate`
39+
- Deleted or renamed model `SyncIdentityProvider`
40+
- Deleted or renamed model `SyncIdentityProviderList`
41+
- Deleted or renamed model `SyncIdentityProviderUpdate`
42+
- Deleted or renamed model `SyncSet`
43+
- Deleted or renamed model `SyncSetList`
44+
- Deleted or renamed model `SyncSetUpdate`
45+
- Deleted or renamed operation group `MachinePoolsOperations`
46+
- Deleted or renamed operation group `SecretsOperations`
47+
- Deleted or renamed operation group `SyncIdentityProvidersOperations`
48+
- Deleted or renamed operation group `SyncSetsOperations`
49+
350
## 2.0.0 (2024-10-30)
451

552
### Breaking Changes
Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
include _meta.json
2-
recursive-include tests *.py *.json
3-
recursive-include samples *.py *.md
41
include *.md
5-
include azure/__init__.py
6-
include azure/mgmt/__init__.py
72
include LICENSE
83
include azure/mgmt/redhatopenshift/py.typed
4+
recursive-include tests *.py
5+
recursive-include samples *.py *.md
6+
include azure/__init__.py
7+
include azure/mgmt/__init__.py

sdk/redhatopenshift/azure-mgmt-redhatopenshift/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 Red Hat Openshift 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.

sdk/redhatopenshift/azure-mgmt-redhatopenshift/_meta.json

Lines changed: 0 additions & 11 deletions
This file was deleted.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"commit": "f52764d11d53276b79bbbba37f977ef0b03bbd2c",
3+
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
4+
"autorest": "3.10.2",
5+
"use": [
6+
"@autorest/python@6.45.1",
7+
"@autorest/modelerfour@4.27.0"
8+
],
9+
"autorest_command": "autorest specification/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/OpenShiftClusters/readme.md --generate-sample=True --generate-test=True --include-x-ms-examples-original-file=True --package-mode=azure-mgmt --python --python-sdks-folder=/mnt/vss/_work/1/azure-sdk-for-python/sdk --use=@autorest/python@6.45.1 --use=@autorest/modelerfour@4.27.0 --version=3.10.2 --version-tolerant=False",
10+
"readme": "specification/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/OpenShiftClusters/readme.md"
11+
}
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
{
2+
"CrossLanguagePackageId": null,
3+
"CrossLanguageDefinitionId": {
4+
"azure.mgmt.redhatopenshift.models.APIServerProfile": null,
5+
"azure.mgmt.redhatopenshift.models.CloudErrorBody": null,
6+
"azure.mgmt.redhatopenshift.models.ClusterProfile": null,
7+
"azure.mgmt.redhatopenshift.models.ConsoleProfile": null,
8+
"azure.mgmt.redhatopenshift.models.Display": null,
9+
"azure.mgmt.redhatopenshift.models.EffectiveOutboundIP": null,
10+
"azure.mgmt.redhatopenshift.models.IngressProfile": null,
11+
"azure.mgmt.redhatopenshift.models.LoadBalancerProfile": null,
12+
"azure.mgmt.redhatopenshift.models.ManagedOutboundIPs": null,
13+
"azure.mgmt.redhatopenshift.models.ManagedServiceIdentity": null,
14+
"azure.mgmt.redhatopenshift.models.MasterProfile": null,
15+
"azure.mgmt.redhatopenshift.models.NetworkProfile": null,
16+
"azure.mgmt.redhatopenshift.models.Resource": null,
17+
"azure.mgmt.redhatopenshift.models.TrackedResource": null,
18+
"azure.mgmt.redhatopenshift.models.OpenShiftCluster": null,
19+
"azure.mgmt.redhatopenshift.models.OpenShiftClusterAdminKubeconfig": null,
20+
"azure.mgmt.redhatopenshift.models.OpenShiftClusterCredentials": null,
21+
"azure.mgmt.redhatopenshift.models.OpenShiftClusterList": null,
22+
"azure.mgmt.redhatopenshift.models.OpenShiftClusterUpdate": null,
23+
"azure.mgmt.redhatopenshift.models.ProxyResource": null,
24+
"azure.mgmt.redhatopenshift.models.OpenShiftVersion": null,
25+
"azure.mgmt.redhatopenshift.models.OpenShiftVersionList": null,
26+
"azure.mgmt.redhatopenshift.models.Operation": null,
27+
"azure.mgmt.redhatopenshift.models.OperationList": null,
28+
"azure.mgmt.redhatopenshift.models.PlatformWorkloadIdentity": null,
29+
"azure.mgmt.redhatopenshift.models.PlatformWorkloadIdentityProfile": null,
30+
"azure.mgmt.redhatopenshift.models.PlatformWorkloadIdentityRole": null,
31+
"azure.mgmt.redhatopenshift.models.PlatformWorkloadIdentityRoleSet": null,
32+
"azure.mgmt.redhatopenshift.models.PlatformWorkloadIdentityRoleSetList": null,
33+
"azure.mgmt.redhatopenshift.models.ServicePrincipalProfile": null,
34+
"azure.mgmt.redhatopenshift.models.SystemData": null,
35+
"azure.mgmt.redhatopenshift.models.UserAssignedIdentity": null,
36+
"azure.mgmt.redhatopenshift.models.WorkerProfile": null,
37+
"azure.mgmt.redhatopenshift.models.CreatedByType": null,
38+
"azure.mgmt.redhatopenshift.models.EncryptionAtHost": null,
39+
"azure.mgmt.redhatopenshift.models.Visibility": null,
40+
"azure.mgmt.redhatopenshift.models.ManagedServiceIdentityType": null,
41+
"azure.mgmt.redhatopenshift.models.ProvisioningState": null,
42+
"azure.mgmt.redhatopenshift.models.FipsValidatedModules": null,
43+
"azure.mgmt.redhatopenshift.models.OutboundType": null,
44+
"azure.mgmt.redhatopenshift.models.PreconfiguredNSG": null,
45+
"azure.mgmt.redhatopenshift.operations.Operations.list": null,
46+
"azure.mgmt.redhatopenshift.aio.operations.Operations.list": null,
47+
"azure.mgmt.redhatopenshift.operations.OpenShiftVersionsOperations.list": null,
48+
"azure.mgmt.redhatopenshift.aio.operations.OpenShiftVersionsOperations.list": null,
49+
"azure.mgmt.redhatopenshift.operations.OpenShiftVersionsOperations.get": null,
50+
"azure.mgmt.redhatopenshift.aio.operations.OpenShiftVersionsOperations.get": null,
51+
"azure.mgmt.redhatopenshift.operations.PlatformWorkloadIdentityRoleSetsOperations.list": null,
52+
"azure.mgmt.redhatopenshift.aio.operations.PlatformWorkloadIdentityRoleSetsOperations.list": null,
53+
"azure.mgmt.redhatopenshift.operations.PlatformWorkloadIdentityRoleSetOperations.get": null,
54+
"azure.mgmt.redhatopenshift.aio.operations.PlatformWorkloadIdentityRoleSetOperations.get": null,
55+
"azure.mgmt.redhatopenshift.operations.OpenShiftClustersOperations.list": null,
56+
"azure.mgmt.redhatopenshift.aio.operations.OpenShiftClustersOperations.list": null,
57+
"azure.mgmt.redhatopenshift.operations.OpenShiftClustersOperations.list_by_resource_group": null,
58+
"azure.mgmt.redhatopenshift.aio.operations.OpenShiftClustersOperations.list_by_resource_group": null,
59+
"azure.mgmt.redhatopenshift.operations.OpenShiftClustersOperations.get": null,
60+
"azure.mgmt.redhatopenshift.aio.operations.OpenShiftClustersOperations.get": null,
61+
"azure.mgmt.redhatopenshift.operations.OpenShiftClustersOperations.begin_create_or_update": null,
62+
"azure.mgmt.redhatopenshift.aio.operations.OpenShiftClustersOperations.begin_create_or_update": null,
63+
"azure.mgmt.redhatopenshift.operations.OpenShiftClustersOperations.begin_delete": null,
64+
"azure.mgmt.redhatopenshift.aio.operations.OpenShiftClustersOperations.begin_delete": null,
65+
"azure.mgmt.redhatopenshift.operations.OpenShiftClustersOperations.begin_update": null,
66+
"azure.mgmt.redhatopenshift.aio.operations.OpenShiftClustersOperations.begin_update": null,
67+
"azure.mgmt.redhatopenshift.operations.OpenShiftClustersOperations.list_admin_credentials": null,
68+
"azure.mgmt.redhatopenshift.aio.operations.OpenShiftClustersOperations.list_admin_credentials": null,
69+
"azure.mgmt.redhatopenshift.operations.OpenShiftClustersOperations.list_credentials": null,
70+
"azure.mgmt.redhatopenshift.aio.operations.OpenShiftClustersOperations.list_credentials": null
71+
}
72+
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__path__ = __import__("pkgutil").extend_path(__path__, __name__)
1+
__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__path__ = __import__("pkgutil").extend_path(__path__, __name__)
1+
__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore

sdk/redhatopenshift/azure-mgmt-redhatopenshift/azure/mgmt/redhatopenshift/__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) AutoRest 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 ._azure_red_hat_open_shift_client import AzureRedHatOpenShiftClient
10+
from typing import TYPE_CHECKING
11+
12+
if TYPE_CHECKING:
13+
from ._patch import * # pylint: disable=unused-wildcard-import
14+
15+
from ._azure_red_hat_open_shift_client import AzureRedHatOpenShiftClient # 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
"AzureRedHatOpenShiftClient",
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/redhatopenshift/azure-mgmt-redhatopenshift/azure/mgmt/redhatopenshift/_azure_red_hat_open_shift_client.py

Lines changed: 41 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -7,57 +7,58 @@
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 . import models as _models
1921
from ._configuration import AzureRedHatOpenShiftClientConfiguration
20-
from ._serialization import Deserializer, Serializer
22+
from ._utils.serialization import Deserializer, Serializer
2123
from .operations import (
22-
MachinePoolsOperations,
2324
OpenShiftClustersOperations,
2425
OpenShiftVersionsOperations,
2526
Operations,
26-
SecretsOperations,
27-
SyncIdentityProvidersOperations,
28-
SyncSetsOperations,
27+
PlatformWorkloadIdentityRoleSetOperations,
28+
PlatformWorkloadIdentityRoleSetsOperations,
2929
)
3030

3131
if TYPE_CHECKING:
32-
# pylint: disable=unused-import,ungrouped-imports
32+
from azure.core import AzureClouds
3333
from azure.core.credentials import TokenCredential
3434

3535

36-
class AzureRedHatOpenShiftClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes
36+
class AzureRedHatOpenShiftClient:
3737
"""Rest API for Azure Red Hat OpenShift 4.
3838
3939
:ivar operations: Operations operations
4040
:vartype operations: azure.mgmt.redhatopenshift.operations.Operations
4141
:ivar open_shift_versions: OpenShiftVersionsOperations operations
4242
:vartype open_shift_versions: azure.mgmt.redhatopenshift.operations.OpenShiftVersionsOperations
43+
:ivar platform_workload_identity_role_sets: PlatformWorkloadIdentityRoleSetsOperations
44+
operations
45+
:vartype platform_workload_identity_role_sets:
46+
azure.mgmt.redhatopenshift.operations.PlatformWorkloadIdentityRoleSetsOperations
47+
:ivar platform_workload_identity_role_set: PlatformWorkloadIdentityRoleSetOperations operations
48+
:vartype platform_workload_identity_role_set:
49+
azure.mgmt.redhatopenshift.operations.PlatformWorkloadIdentityRoleSetOperations
4350
:ivar open_shift_clusters: OpenShiftClustersOperations operations
4451
:vartype open_shift_clusters: azure.mgmt.redhatopenshift.operations.OpenShiftClustersOperations
45-
:ivar machine_pools: MachinePoolsOperations operations
46-
:vartype machine_pools: azure.mgmt.redhatopenshift.operations.MachinePoolsOperations
47-
:ivar secrets: SecretsOperations operations
48-
:vartype secrets: azure.mgmt.redhatopenshift.operations.SecretsOperations
49-
:ivar sync_identity_providers: SyncIdentityProvidersOperations operations
50-
:vartype sync_identity_providers:
51-
azure.mgmt.redhatopenshift.operations.SyncIdentityProvidersOperations
52-
:ivar sync_sets: SyncSetsOperations operations
53-
:vartype sync_sets: azure.mgmt.redhatopenshift.operations.SyncSetsOperations
5452
:param credential: Credential needed for the client to connect to Azure. Required.
5553
:type credential: ~azure.core.credentials.TokenCredential
56-
:param subscription_id: The ID of the target subscription. Required.
54+
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
5755
:type subscription_id: str
58-
:param base_url: Service URL. Default value is "https://management.azure.com".
56+
:param base_url: Service URL. Default value is None.
5957
:type base_url: str
60-
:keyword api_version: Api Version. Default value is "2023-11-22". Note that overriding this
58+
:keyword cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is
59+
None.
60+
:paramtype cloud_setting: ~azure.core.AzureClouds
61+
:keyword api_version: Api Version. Default value is "2025-07-25". Note that overriding this
6162
default value may result in unsupported behavior.
6263
:paramtype api_version: str
6364
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
@@ -68,12 +69,24 @@ def __init__(
6869
self,
6970
credential: "TokenCredential",
7071
subscription_id: str,
71-
base_url: str = "https://management.azure.com",
72+
base_url: Optional[str] = None,
73+
*,
74+
cloud_setting: Optional["AzureClouds"] = None,
7275
**kwargs: Any
7376
) -> None:
77+
_cloud = cloud_setting or settings.current.azure_cloud # type: ignore
78+
_endpoints = get_arm_endpoints(_cloud)
79+
if not base_url:
80+
base_url = _endpoints["resource_manager"]
81+
credential_scopes = kwargs.pop("credential_scopes", _endpoints["credential_scopes"])
7482
self._config = AzureRedHatOpenShiftClientConfiguration(
75-
credential=credential, subscription_id=subscription_id, **kwargs
83+
credential=credential,
84+
subscription_id=subscription_id,
85+
cloud_setting=cloud_setting,
86+
credential_scopes=credential_scopes,
87+
**kwargs
7688
)
89+
7790
_policies = kwargs.pop("policies", None)
7891
if _policies is None:
7992
_policies = [
@@ -92,7 +105,7 @@ def __init__(
92105
policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None,
93106
self._config.http_logging_policy,
94107
]
95-
self._client: ARMPipelineClient = ARMPipelineClient(base_url=base_url, policies=_policies, **kwargs)
108+
self._client: ARMPipelineClient = ARMPipelineClient(base_url=cast(str, base_url), policies=_policies, **kwargs)
96109

97110
client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)}
98111
self._serialize = Serializer(client_models)
@@ -102,15 +115,15 @@ def __init__(
102115
self.open_shift_versions = OpenShiftVersionsOperations(
103116
self._client, self._config, self._serialize, self._deserialize
104117
)
105-
self.open_shift_clusters = OpenShiftClustersOperations(
118+
self.platform_workload_identity_role_sets = PlatformWorkloadIdentityRoleSetsOperations(
106119
self._client, self._config, self._serialize, self._deserialize
107120
)
108-
self.machine_pools = MachinePoolsOperations(self._client, self._config, self._serialize, self._deserialize)
109-
self.secrets = SecretsOperations(self._client, self._config, self._serialize, self._deserialize)
110-
self.sync_identity_providers = SyncIdentityProvidersOperations(
121+
self.platform_workload_identity_role_set = PlatformWorkloadIdentityRoleSetOperations(
122+
self._client, self._config, self._serialize, self._deserialize
123+
)
124+
self.open_shift_clusters = OpenShiftClustersOperations(
111125
self._client, self._config, self._serialize, self._deserialize
112126
)
113-
self.sync_sets = SyncSetsOperations(self._client, self._config, self._serialize, self._deserialize)
114127

115128
def _send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse:
116129
"""Runs the network request through the client's chained policies.

0 commit comments

Comments
 (0)