Skip to content

Commit adab824

Browse files
[AutoRelease] t2-redhatopenshift-2024-07-18-41903(can only be merged by SDK owner) (#36526)
* code and test * Update assets.json --------- Co-authored-by: azure-sdk <PythonSdkPipelines> Co-authored-by: ChenxiJiang333 <[email protected]>
1 parent 308b749 commit adab824

File tree

207 files changed

+16463
-5793
lines changed

Some content is hidden

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

207 files changed

+16463
-5793
lines changed

sdk/redhatopenshift/azure-mgmt-redhatopenshift/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.5.0 (2024-07-22)
4+
5+
### Features Added
6+
7+
- Model NetworkProfile has a new parameter load_balancer_profile
8+
39
## 1.4.0 (2023-10-23)
410

511
### Features Added

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

Lines changed: 2 additions & 2 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.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
Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11
{
2-
"commit": "c280892951a9e45c059132c05aace25a9c752d48",
2+
"commit": "260f4f4012b3bebac33ea4db5c56105dd2fd33da",
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.15.0",
7+
"@autorest/modelerfour@4.27.0"
88
],
9-
"autorest_command": "autorest specification/redhatopenshift/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/[email protected] --use=@autorest/[email protected] --version=3.9.7 --version-tolerant=False",
10-
"readme": "specification/redhatopenshift/resource-manager/readme.md",
11-
"package-2020-04-30": "2022-03-13 20:06:12 -0700 b0a0fccef5bfe412614343ef20a5be7427661330 Microsoft.RedHatOpenShift/stable/2020-04-30/redhatopenshift.json",
12-
"package-2021-09-01-preview": "2021-09-08 03:37:58 +0300 b9e1a57680ad54fd555bce727702550aefcd2d47 Microsoft.RedHatOpenShift/preview/2021-09-01-preview/redhatopenshift.json",
13-
"package-2022-04-01": "2022-04-26 20:09:23 -0700 3c622a337592e7debc58b09a9fdc3aa275ba808f Microsoft.RedHatOpenShift/stable/2022-04-01/redhatopenshift.json",
14-
"package-2022-09-04": "2022-12-06 18:13:21 -0800 1be09531e4c6edeafde41d6562371566d39669e8 Microsoft.RedHatOpenShift/stable/2022-09-04/redhatopenshift.json",
15-
"package-2023-04-01": "2023-07-24 17:12:10 +1000 db80d2c04a9e7ecd7d1fee6da42fe5b825fabf4b Microsoft.RedHatOpenShift/stable/2023-04-01/redhatopenshift.json",
16-
"package-2023-09-04": "2023-09-28 19:57:42 -0500 6941a3d632bf05aac1f38a0db8fb51d04102d49b Microsoft.RedHatOpenShift/stable/2023-09-04/redhatopenshift.json"
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 --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --use=@autorest/[email protected] --use=@autorest/[email protected] --version=3.10.2 --version-tolerant=False",
10+
"readme": "specification/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/openshiftclusters/readme.md",
11+
"package-2020-04-30": "2024-05-15 18:25:55 +0200 7dae1e5f45f91ec89d16a628e102341490ced849 stable/2020-04-30/redhatopenshift.json",
12+
"package-2021-09-01-preview": "2024-05-15 18:25:55 +0200 7dae1e5f45f91ec89d16a628e102341490ced849 preview/2021-09-01-preview/redhatopenshift.json",
13+
"package-2022-04-01": "2024-05-15 18:25:55 +0200 7dae1e5f45f91ec89d16a628e102341490ced849 stable/2022-04-01/redhatopenshift.json",
14+
"package-2022-09-04": "2024-05-15 18:25:55 +0200 7dae1e5f45f91ec89d16a628e102341490ced849 stable/2022-09-04/redhatopenshift.json",
15+
"package-2023-04-01": "2024-05-15 18:25:55 +0200 7dae1e5f45f91ec89d16a628e102341490ced849 stable/2023-04-01/redhatopenshift.json",
16+
"package-2023-09-04": "2024-05-15 18:25:55 +0200 7dae1e5f45f91ec89d16a628e102341490ced849 stable/2023-09-04/redhatopenshift.json",
17+
"package-2023-11": "2024-05-15 18:25:55 +0200 7dae1e5f45f91ec89d16a628e102341490ced849 stable/2023-11-22/redhatopenshift.json"
1718
}
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/redhatopenshift/azure-mgmt-redhatopenshift",
5+
"Tag": "python/redhatopenshift/azure-mgmt-redhatopenshift_8a51d0a696"
6+
}

sdk/redhatopenshift/azure-mgmt-redhatopenshift/azure/mgmt/redhatopenshift/_azure_red_hat_open_shift_client.py

Lines changed: 48 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,11 @@
1010
# --------------------------------------------------------------------------
1111

1212
from typing import Any, Optional, TYPE_CHECKING
13+
from typing_extensions import Self
1314

15+
from azure.core.pipeline import policies
1416
from azure.mgmt.core import ARMPipelineClient
17+
from azure.mgmt.core.policies import ARMAutoResourceProviderRegistrationPolicy
1518
from azure.profiles import KnownProfiles, ProfileDefinition
1619
from azure.profiles.multiapiclient import MultiApiClientMixin
1720

@@ -53,7 +56,7 @@ class AzureRedHatOpenShiftClient(MultiApiClientMixin, _SDKClient):
5356
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
5457
"""
5558

56-
DEFAULT_API_VERSION = '2023-09-04'
59+
DEFAULT_API_VERSION = '2023-11-22'
5760
_PROFILE_TAG = "azure.mgmt.redhatopenshift.AzureRedHatOpenShiftClient"
5861
LATEST_PROFILE = ProfileDefinition({
5962
_PROFILE_TAG: {
@@ -74,7 +77,25 @@ def __init__(
7477
if api_version:
7578
kwargs.setdefault('api_version', api_version)
7679
self._config = AzureRedHatOpenShiftClientConfiguration(credential, subscription_id, **kwargs)
77-
self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
80+
_policies = kwargs.pop("policies", None)
81+
if _policies is None:
82+
_policies = [
83+
policies.RequestIdPolicy(**kwargs),
84+
self._config.headers_policy,
85+
self._config.user_agent_policy,
86+
self._config.proxy_policy,
87+
policies.ContentDecodePolicy(**kwargs),
88+
ARMAutoResourceProviderRegistrationPolicy(),
89+
self._config.redirect_policy,
90+
self._config.retry_policy,
91+
self._config.authentication_policy,
92+
self._config.custom_hook_policy,
93+
self._config.logging_policy,
94+
policies.DistributedTracingPolicy(**kwargs),
95+
policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None,
96+
self._config.http_logging_policy,
97+
]
98+
self._client = ARMPipelineClient(base_url=base_url, policies=_policies, **kwargs)
7899
super(AzureRedHatOpenShiftClient, self).__init__(
79100
api_version=api_version,
80101
profile=profile
@@ -94,6 +115,7 @@ def models(cls, api_version=DEFAULT_API_VERSION):
94115
* 2022-09-04: :mod:`v2022_09_04.models<azure.mgmt.redhatopenshift.v2022_09_04.models>`
95116
* 2023-04-01: :mod:`v2023_04_01.models<azure.mgmt.redhatopenshift.v2023_04_01.models>`
96117
* 2023-09-04: :mod:`v2023_09_04.models<azure.mgmt.redhatopenshift.v2023_09_04.models>`
118+
* 2023-11-22: :mod:`v2023_11_22.models<azure.mgmt.redhatopenshift.v2023_11_22.models>`
97119
"""
98120
if api_version == '2020-04-30':
99121
from .v2020_04_30 import models
@@ -113,6 +135,9 @@ def models(cls, api_version=DEFAULT_API_VERSION):
113135
elif api_version == '2023-09-04':
114136
from .v2023_09_04 import models
115137
return models
138+
elif api_version == '2023-11-22':
139+
from .v2023_11_22 import models
140+
return models
116141
raise ValueError("API version {} is not available".format(api_version))
117142

118143
@property
@@ -122,6 +147,7 @@ def machine_pools(self):
122147
* 2022-09-04: :class:`MachinePoolsOperations<azure.mgmt.redhatopenshift.v2022_09_04.operations.MachinePoolsOperations>`
123148
* 2023-04-01: :class:`MachinePoolsOperations<azure.mgmt.redhatopenshift.v2023_04_01.operations.MachinePoolsOperations>`
124149
* 2023-09-04: :class:`MachinePoolsOperations<azure.mgmt.redhatopenshift.v2023_09_04.operations.MachinePoolsOperations>`
150+
* 2023-11-22: :class:`MachinePoolsOperations<azure.mgmt.redhatopenshift.v2023_11_22.operations.MachinePoolsOperations>`
125151
"""
126152
api_version = self._get_api_version('machine_pools')
127153
if api_version == '2022-09-04':
@@ -130,6 +156,8 @@ def machine_pools(self):
130156
from .v2023_04_01.operations import MachinePoolsOperations as OperationClass
131157
elif api_version == '2023-09-04':
132158
from .v2023_09_04.operations import MachinePoolsOperations as OperationClass
159+
elif api_version == '2023-11-22':
160+
from .v2023_11_22.operations import MachinePoolsOperations as OperationClass
133161
else:
134162
raise ValueError("API version {} does not have operation group 'machine_pools'".format(api_version))
135163
self._config.api_version = api_version
@@ -145,6 +173,7 @@ def open_shift_clusters(self):
145173
* 2022-09-04: :class:`OpenShiftClustersOperations<azure.mgmt.redhatopenshift.v2022_09_04.operations.OpenShiftClustersOperations>`
146174
* 2023-04-01: :class:`OpenShiftClustersOperations<azure.mgmt.redhatopenshift.v2023_04_01.operations.OpenShiftClustersOperations>`
147175
* 2023-09-04: :class:`OpenShiftClustersOperations<azure.mgmt.redhatopenshift.v2023_09_04.operations.OpenShiftClustersOperations>`
176+
* 2023-11-22: :class:`OpenShiftClustersOperations<azure.mgmt.redhatopenshift.v2023_11_22.operations.OpenShiftClustersOperations>`
148177
"""
149178
api_version = self._get_api_version('open_shift_clusters')
150179
if api_version == '2020-04-30':
@@ -159,6 +188,8 @@ def open_shift_clusters(self):
159188
from .v2023_04_01.operations import OpenShiftClustersOperations as OperationClass
160189
elif api_version == '2023-09-04':
161190
from .v2023_09_04.operations import OpenShiftClustersOperations as OperationClass
191+
elif api_version == '2023-11-22':
192+
from .v2023_11_22.operations import OpenShiftClustersOperations as OperationClass
162193
else:
163194
raise ValueError("API version {} does not have operation group 'open_shift_clusters'".format(api_version))
164195
self._config.api_version = api_version
@@ -171,6 +202,7 @@ def open_shift_versions(self):
171202
* 2022-09-04: :class:`OpenShiftVersionsOperations<azure.mgmt.redhatopenshift.v2022_09_04.operations.OpenShiftVersionsOperations>`
172203
* 2023-04-01: :class:`OpenShiftVersionsOperations<azure.mgmt.redhatopenshift.v2023_04_01.operations.OpenShiftVersionsOperations>`
173204
* 2023-09-04: :class:`OpenShiftVersionsOperations<azure.mgmt.redhatopenshift.v2023_09_04.operations.OpenShiftVersionsOperations>`
205+
* 2023-11-22: :class:`OpenShiftVersionsOperations<azure.mgmt.redhatopenshift.v2023_11_22.operations.OpenShiftVersionsOperations>`
174206
"""
175207
api_version = self._get_api_version('open_shift_versions')
176208
if api_version == '2022-09-04':
@@ -179,6 +211,8 @@ def open_shift_versions(self):
179211
from .v2023_04_01.operations import OpenShiftVersionsOperations as OperationClass
180212
elif api_version == '2023-09-04':
181213
from .v2023_09_04.operations import OpenShiftVersionsOperations as OperationClass
214+
elif api_version == '2023-11-22':
215+
from .v2023_11_22.operations import OpenShiftVersionsOperations as OperationClass
182216
else:
183217
raise ValueError("API version {} does not have operation group 'open_shift_versions'".format(api_version))
184218
self._config.api_version = api_version
@@ -194,6 +228,7 @@ def operations(self):
194228
* 2022-09-04: :class:`Operations<azure.mgmt.redhatopenshift.v2022_09_04.operations.Operations>`
195229
* 2023-04-01: :class:`Operations<azure.mgmt.redhatopenshift.v2023_04_01.operations.Operations>`
196230
* 2023-09-04: :class:`Operations<azure.mgmt.redhatopenshift.v2023_09_04.operations.Operations>`
231+
* 2023-11-22: :class:`Operations<azure.mgmt.redhatopenshift.v2023_11_22.operations.Operations>`
197232
"""
198233
api_version = self._get_api_version('operations')
199234
if api_version == '2020-04-30':
@@ -208,6 +243,8 @@ def operations(self):
208243
from .v2023_04_01.operations import Operations as OperationClass
209244
elif api_version == '2023-09-04':
210245
from .v2023_09_04.operations import Operations as OperationClass
246+
elif api_version == '2023-11-22':
247+
from .v2023_11_22.operations import Operations as OperationClass
211248
else:
212249
raise ValueError("API version {} does not have operation group 'operations'".format(api_version))
213250
self._config.api_version = api_version
@@ -220,6 +257,7 @@ def secrets(self):
220257
* 2022-09-04: :class:`SecretsOperations<azure.mgmt.redhatopenshift.v2022_09_04.operations.SecretsOperations>`
221258
* 2023-04-01: :class:`SecretsOperations<azure.mgmt.redhatopenshift.v2023_04_01.operations.SecretsOperations>`
222259
* 2023-09-04: :class:`SecretsOperations<azure.mgmt.redhatopenshift.v2023_09_04.operations.SecretsOperations>`
260+
* 2023-11-22: :class:`SecretsOperations<azure.mgmt.redhatopenshift.v2023_11_22.operations.SecretsOperations>`
223261
"""
224262
api_version = self._get_api_version('secrets')
225263
if api_version == '2022-09-04':
@@ -228,6 +266,8 @@ def secrets(self):
228266
from .v2023_04_01.operations import SecretsOperations as OperationClass
229267
elif api_version == '2023-09-04':
230268
from .v2023_09_04.operations import SecretsOperations as OperationClass
269+
elif api_version == '2023-11-22':
270+
from .v2023_11_22.operations import SecretsOperations as OperationClass
231271
else:
232272
raise ValueError("API version {} does not have operation group 'secrets'".format(api_version))
233273
self._config.api_version = api_version
@@ -240,6 +280,7 @@ def sync_identity_providers(self):
240280
* 2022-09-04: :class:`SyncIdentityProvidersOperations<azure.mgmt.redhatopenshift.v2022_09_04.operations.SyncIdentityProvidersOperations>`
241281
* 2023-04-01: :class:`SyncIdentityProvidersOperations<azure.mgmt.redhatopenshift.v2023_04_01.operations.SyncIdentityProvidersOperations>`
242282
* 2023-09-04: :class:`SyncIdentityProvidersOperations<azure.mgmt.redhatopenshift.v2023_09_04.operations.SyncIdentityProvidersOperations>`
283+
* 2023-11-22: :class:`SyncIdentityProvidersOperations<azure.mgmt.redhatopenshift.v2023_11_22.operations.SyncIdentityProvidersOperations>`
243284
"""
244285
api_version = self._get_api_version('sync_identity_providers')
245286
if api_version == '2022-09-04':
@@ -248,6 +289,8 @@ def sync_identity_providers(self):
248289
from .v2023_04_01.operations import SyncIdentityProvidersOperations as OperationClass
249290
elif api_version == '2023-09-04':
250291
from .v2023_09_04.operations import SyncIdentityProvidersOperations as OperationClass
292+
elif api_version == '2023-11-22':
293+
from .v2023_11_22.operations import SyncIdentityProvidersOperations as OperationClass
251294
else:
252295
raise ValueError("API version {} does not have operation group 'sync_identity_providers'".format(api_version))
253296
self._config.api_version = api_version
@@ -260,6 +303,7 @@ def sync_sets(self):
260303
* 2022-09-04: :class:`SyncSetsOperations<azure.mgmt.redhatopenshift.v2022_09_04.operations.SyncSetsOperations>`
261304
* 2023-04-01: :class:`SyncSetsOperations<azure.mgmt.redhatopenshift.v2023_04_01.operations.SyncSetsOperations>`
262305
* 2023-09-04: :class:`SyncSetsOperations<azure.mgmt.redhatopenshift.v2023_09_04.operations.SyncSetsOperations>`
306+
* 2023-11-22: :class:`SyncSetsOperations<azure.mgmt.redhatopenshift.v2023_11_22.operations.SyncSetsOperations>`
263307
"""
264308
api_version = self._get_api_version('sync_sets')
265309
if api_version == '2022-09-04':
@@ -268,6 +312,8 @@ def sync_sets(self):
268312
from .v2023_04_01.operations import SyncSetsOperations as OperationClass
269313
elif api_version == '2023-09-04':
270314
from .v2023_09_04.operations import SyncSetsOperations as OperationClass
315+
elif api_version == '2023-11-22':
316+
from .v2023_11_22.operations import SyncSetsOperations as OperationClass
271317
else:
272318
raise ValueError("API version {} does not have operation group 'sync_sets'".format(api_version))
273319
self._config.api_version = api_version

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
# --------------------------------------------------------------------------
1111
from typing import Any, TYPE_CHECKING
1212

13-
from azure.core.configuration import Configuration
1413
from azure.core.pipeline import policies
1514
from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy
1615

@@ -20,7 +19,7 @@
2019
# pylint: disable=unused-import,ungrouped-imports
2120
from azure.core.credentials import TokenCredential
2221

23-
class AzureRedHatOpenShiftClientConfiguration(Configuration):
22+
class AzureRedHatOpenShiftClientConfiguration:
2423
"""Configuration for AzureRedHatOpenShiftClient.
2524
2625
Note that all parameters used to create this instance are saved as instance
@@ -42,12 +41,12 @@ def __init__(
4241
raise ValueError("Parameter 'credential' must not be None.")
4342
if subscription_id is None:
4443
raise ValueError("Parameter 'subscription_id' must not be None.")
45-
super(AzureRedHatOpenShiftClientConfiguration, self).__init__(**kwargs)
4644

4745
self.credential = credential
4846
self.subscription_id = subscription_id
4947
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
5048
kwargs.setdefault('sdk_moniker', 'azure-mgmt-redhatopenshift/{}'.format(VERSION))
49+
self.polling_interval = kwargs.get("polling_interval", 30)
5150
self._configure(**kwargs)
5251

5352
def _configure(

0 commit comments

Comments
 (0)