Skip to content

Commit 353743e

Browse files
azclibotmsyyc
andauthored
[AutoRelease] t2-redhatopenshift-2022-05-05-85576(Do not merge) (Azure#24302)
* code and test * Update CHANGELOG.md Co-authored-by: PythonSdkPipelines <PythonSdkPipelines> Co-authored-by: Yuchao Yan <[email protected]>
1 parent 41bd866 commit 353743e

File tree

72 files changed

+9246
-1514
lines changed

Some content is hidden

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

72 files changed

+9246
-1514
lines changed

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

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

3+
## 1.1.0 (2022-05-10)
4+
5+
**Features**
6+
7+
- Added operation OpenShiftClustersOperations.list_admin_credentials
8+
- Model ClusterProfile has a new parameter fips_validated_modules
9+
- Model MasterProfile has a new parameter disk_encryption_set_id
10+
- Model MasterProfile has a new parameter encryption_at_host
11+
- Model OpenShiftCluster has a new parameter system_data
12+
- Model OpenShiftClusterUpdate has a new parameter system_data
13+
- Model WorkerProfile has a new parameter disk_encryption_set_id
14+
- Model WorkerProfile has a new parameter encryption_at_host
15+
316
## 1.0.0 (2021-05-20)
417

518
- GA release
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"autorest": "3.4.2",
2+
"autorest": "3.7.2",
33
"use": [
4-
"@autorest/python@5.8.0",
5-
"@autorest/[email protected].1"
4+
"@autorest/python@5.13.0",
5+
"@autorest/[email protected].3"
66
],
7-
"commit": "790522f1d12ec3de2274bd65bd623e99399571b9",
7+
"commit": "50ed15bd61ac79f2368d769df0c207a00b9e099f",
88
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
9-
"autorest_command": "autorest specification/redhatopenshift/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.8.0 --use=@autorest/[email protected].1 --version=3.4.2",
9+
"autorest_command": "autorest specification/redhatopenshift/resource-manager/readme.md --multiapi --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --python3-only --use=@autorest/python@5.13.0 --use=@autorest/[email protected].3 --version=3.7.2",
1010
"readme": "specification/redhatopenshift/resource-manager/readme.md"
1111
}

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

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

9-
from ._azure_red_hat_open_shift4_client import AzureRedHatOpenShift4Client
10-
__all__ = ['AzureRedHatOpenShift4Client']
9+
from ._azure_red_hat_open_shift_client import AzureRedHatOpenShiftClient
10+
__all__ = ['AzureRedHatOpenShiftClient']
1111

1212
try:
1313
from ._patch import patch_sdk # type: ignore
Lines changed: 29 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,19 @@
1111

1212
from typing import TYPE_CHECKING
1313

14+
from msrest import Deserializer, Serializer
15+
1416
from azure.mgmt.core import ARMPipelineClient
1517
from azure.profiles import KnownProfiles, ProfileDefinition
1618
from azure.profiles.multiapiclient import MultiApiClientMixin
17-
from msrest import Deserializer, Serializer
1819

19-
from ._configuration import AzureRedHatOpenShift4ClientConfiguration
20+
from ._configuration import AzureRedHatOpenShiftClientConfiguration
2021

2122
if TYPE_CHECKING:
2223
# pylint: disable=unused-import,ungrouped-imports
2324
from typing import Any, Optional
2425

2526
from azure.core.credentials import TokenCredential
26-
from azure.core.pipeline.transport import HttpRequest, HttpResponse
2727

2828
class _SDKClient(object):
2929
def __init__(self, *args, **kwargs):
@@ -32,7 +32,7 @@ def __init__(self, *args, **kwargs):
3232
"""
3333
pass
3434

35-
class AzureRedHatOpenShift4Client(MultiApiClientMixin, _SDKClient):
35+
class AzureRedHatOpenShiftClient(MultiApiClientMixin, _SDKClient):
3636
"""Rest API for Azure Red Hat OpenShift 4.
3737
3838
This ready contains multiple API versions, to help you deal with all of the Azure clouds
@@ -56,8 +56,8 @@ class AzureRedHatOpenShift4Client(MultiApiClientMixin, _SDKClient):
5656
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
5757
"""
5858

59-
DEFAULT_API_VERSION = '2020-04-30'
60-
_PROFILE_TAG = "azure.mgmt.redhatopenshift.AzureRedHatOpenShift4Client"
59+
DEFAULT_API_VERSION = '2022-04-01'
60+
_PROFILE_TAG = "azure.mgmt.redhatopenshift.AzureRedHatOpenShiftClient"
6161
LATEST_PROFILE = ProfileDefinition({
6262
_PROFILE_TAG: {
6363
None: DEFAULT_API_VERSION,
@@ -70,15 +70,13 @@ def __init__(
7070
credential, # type: "TokenCredential"
7171
subscription_id, # type: str
7272
api_version=None, # type: Optional[str]
73-
base_url=None, # type: Optional[str]
73+
base_url="https://management.azure.com", # type: str
7474
profile=KnownProfiles.default, # type: KnownProfiles
7575
**kwargs # type: Any
7676
):
77-
if not base_url:
78-
base_url = 'https://management.azure.com'
79-
self._config = AzureRedHatOpenShift4ClientConfiguration(credential, subscription_id, **kwargs)
77+
self._config = AzureRedHatOpenShiftClientConfiguration(credential, subscription_id, **kwargs)
8078
self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
81-
super(AzureRedHatOpenShift4Client, self).__init__(
79+
super(AzureRedHatOpenShiftClient, self).__init__(
8280
api_version=api_version,
8381
profile=profile
8482
)
@@ -92,21 +90,35 @@ def models(cls, api_version=DEFAULT_API_VERSION):
9290
"""Module depends on the API version:
9391
9492
* 2020-04-30: :mod:`v2020_04_30.models<azure.mgmt.redhatopenshift.v2020_04_30.models>`
93+
* 2021-09-01-preview: :mod:`v2021_09_01_preview.models<azure.mgmt.redhatopenshift.v2021_09_01_preview.models>`
94+
* 2022-04-01: :mod:`v2022_04_01.models<azure.mgmt.redhatopenshift.v2022_04_01.models>`
9595
"""
9696
if api_version == '2020-04-30':
9797
from .v2020_04_30 import models
9898
return models
99+
elif api_version == '2021-09-01-preview':
100+
from .v2021_09_01_preview import models
101+
return models
102+
elif api_version == '2022-04-01':
103+
from .v2022_04_01 import models
104+
return models
99105
raise ValueError("API version {} is not available".format(api_version))
100106

101107
@property
102108
def open_shift_clusters(self):
103109
"""Instance depends on the API version:
104110
105111
* 2020-04-30: :class:`OpenShiftClustersOperations<azure.mgmt.redhatopenshift.v2020_04_30.operations.OpenShiftClustersOperations>`
112+
* 2021-09-01-preview: :class:`OpenShiftClustersOperations<azure.mgmt.redhatopenshift.v2021_09_01_preview.operations.OpenShiftClustersOperations>`
113+
* 2022-04-01: :class:`OpenShiftClustersOperations<azure.mgmt.redhatopenshift.v2022_04_01.operations.OpenShiftClustersOperations>`
106114
"""
107115
api_version = self._get_api_version('open_shift_clusters')
108116
if api_version == '2020-04-30':
109117
from .v2020_04_30.operations import OpenShiftClustersOperations as OperationClass
118+
elif api_version == '2021-09-01-preview':
119+
from .v2021_09_01_preview.operations import OpenShiftClustersOperations as OperationClass
120+
elif api_version == '2022-04-01':
121+
from .v2022_04_01.operations import OpenShiftClustersOperations as OperationClass
110122
else:
111123
raise ValueError("API version {} does not have operation group 'open_shift_clusters'".format(api_version))
112124
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
@@ -116,10 +128,16 @@ def operations(self):
116128
"""Instance depends on the API version:
117129
118130
* 2020-04-30: :class:`Operations<azure.mgmt.redhatopenshift.v2020_04_30.operations.Operations>`
131+
* 2021-09-01-preview: :class:`Operations<azure.mgmt.redhatopenshift.v2021_09_01_preview.operations.Operations>`
132+
* 2022-04-01: :class:`Operations<azure.mgmt.redhatopenshift.v2022_04_01.operations.Operations>`
119133
"""
120134
api_version = self._get_api_version('operations')
121135
if api_version == '2020-04-30':
122136
from .v2020_04_30.operations import Operations as OperationClass
137+
elif api_version == '2021-09-01-preview':
138+
from .v2021_09_01_preview.operations import Operations as OperationClass
139+
elif api_version == '2022-04-01':
140+
from .v2022_04_01.operations import Operations as OperationClass
123141
else:
124142
raise ValueError("API version {} does not have operation group 'operations'".format(api_version))
125143
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
from azure.core.configuration import Configuration
1414
from azure.core.pipeline import policies
15-
from azure.mgmt.core.policies import ARMHttpLoggingPolicy
15+
from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy
1616

1717
from ._version import VERSION
1818

@@ -22,8 +22,8 @@
2222

2323
from azure.core.credentials import TokenCredential
2424

25-
class AzureRedHatOpenShift4ClientConfiguration(Configuration):
26-
"""Configuration for AzureRedHatOpenShift4Client.
25+
class AzureRedHatOpenShiftClientConfiguration(Configuration):
26+
"""Configuration for AzureRedHatOpenShiftClient.
2727
2828
Note that all parameters used to create this instance are saved as instance
2929
attributes.
@@ -45,7 +45,7 @@ def __init__(
4545
raise ValueError("Parameter 'credential' must not be None.")
4646
if subscription_id is None:
4747
raise ValueError("Parameter 'subscription_id' must not be None.")
48-
super(AzureRedHatOpenShift4ClientConfiguration, self).__init__(**kwargs)
48+
super(AzureRedHatOpenShiftClientConfiguration, self).__init__(**kwargs)
4949

5050
self.credential = credential
5151
self.subscription_id = subscription_id
@@ -68,4 +68,4 @@ def _configure(
6868
self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs)
6969
self.authentication_policy = kwargs.get('authentication_policy')
7070
if self.credential and not self.authentication_policy:
71-
self.authentication_policy = policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs)
71+
self.authentication_policy = ARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs)

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

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

9-
VERSION = "1.0.0"
9+
VERSION = "1.1.0"
1010

sdk/redhatopenshift/azure-mgmt-redhatopenshift/azure/mgmt/redhatopenshift/aio/__init__.py

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

9-
from ._azure_red_hat_open_shift4_client import AzureRedHatOpenShift4Client
10-
__all__ = ['AzureRedHatOpenShift4Client']
9+
from ._azure_red_hat_open_shift_client import AzureRedHatOpenShiftClient
10+
__all__ = ['AzureRedHatOpenShiftClient']
Lines changed: 30 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,17 @@
1111

1212
from typing import Any, Optional, TYPE_CHECKING
1313

14-
from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest
14+
from msrest import Deserializer, Serializer
15+
1516
from azure.mgmt.core import AsyncARMPipelineClient
1617
from azure.profiles import KnownProfiles, ProfileDefinition
1718
from azure.profiles.multiapiclient import MultiApiClientMixin
18-
from msrest import Deserializer, Serializer
1919

20-
from ._configuration import AzureRedHatOpenShift4ClientConfiguration
20+
from ._configuration import AzureRedHatOpenShiftClientConfiguration
2121

2222
if TYPE_CHECKING:
2323
# pylint: disable=unused-import,ungrouped-imports
24+
from azure.core.credentials import TokenCredential
2425
from azure.core.credentials_async import AsyncTokenCredential
2526

2627
class _SDKClient(object):
@@ -30,7 +31,7 @@ def __init__(self, *args, **kwargs):
3031
"""
3132
pass
3233

33-
class AzureRedHatOpenShift4Client(MultiApiClientMixin, _SDKClient):
34+
class AzureRedHatOpenShiftClient(MultiApiClientMixin, _SDKClient):
3435
"""Rest API for Azure Red Hat OpenShift 4.
3536
3637
This ready contains multiple API versions, to help you deal with all of the Azure clouds
@@ -54,8 +55,8 @@ class AzureRedHatOpenShift4Client(MultiApiClientMixin, _SDKClient):
5455
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
5556
"""
5657

57-
DEFAULT_API_VERSION = '2020-04-30'
58-
_PROFILE_TAG = "azure.mgmt.redhatopenshift.AzureRedHatOpenShift4Client"
58+
DEFAULT_API_VERSION = '2022-04-01'
59+
_PROFILE_TAG = "azure.mgmt.redhatopenshift.AzureRedHatOpenShiftClient"
5960
LATEST_PROFILE = ProfileDefinition({
6061
_PROFILE_TAG: {
6162
None: DEFAULT_API_VERSION,
@@ -68,15 +69,13 @@ def __init__(
6869
credential: "AsyncTokenCredential",
6970
subscription_id: str,
7071
api_version: Optional[str] = None,
71-
base_url: Optional[str] = None,
72+
base_url: str = "https://management.azure.com",
7273
profile: KnownProfiles = KnownProfiles.default,
7374
**kwargs # type: Any
7475
) -> None:
75-
if not base_url:
76-
base_url = 'https://management.azure.com'
77-
self._config = AzureRedHatOpenShift4ClientConfiguration(credential, subscription_id, **kwargs)
76+
self._config = AzureRedHatOpenShiftClientConfiguration(credential, subscription_id, **kwargs)
7877
self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
79-
super(AzureRedHatOpenShift4Client, self).__init__(
78+
super(AzureRedHatOpenShiftClient, self).__init__(
8079
api_version=api_version,
8180
profile=profile
8281
)
@@ -90,21 +89,35 @@ def models(cls, api_version=DEFAULT_API_VERSION):
9089
"""Module depends on the API version:
9190
9291
* 2020-04-30: :mod:`v2020_04_30.models<azure.mgmt.redhatopenshift.v2020_04_30.models>`
92+
* 2021-09-01-preview: :mod:`v2021_09_01_preview.models<azure.mgmt.redhatopenshift.v2021_09_01_preview.models>`
93+
* 2022-04-01: :mod:`v2022_04_01.models<azure.mgmt.redhatopenshift.v2022_04_01.models>`
9394
"""
9495
if api_version == '2020-04-30':
9596
from ..v2020_04_30 import models
9697
return models
98+
elif api_version == '2021-09-01-preview':
99+
from ..v2021_09_01_preview import models
100+
return models
101+
elif api_version == '2022-04-01':
102+
from ..v2022_04_01 import models
103+
return models
97104
raise ValueError("API version {} is not available".format(api_version))
98105

99106
@property
100107
def open_shift_clusters(self):
101108
"""Instance depends on the API version:
102109
103110
* 2020-04-30: :class:`OpenShiftClustersOperations<azure.mgmt.redhatopenshift.v2020_04_30.aio.operations.OpenShiftClustersOperations>`
111+
* 2021-09-01-preview: :class:`OpenShiftClustersOperations<azure.mgmt.redhatopenshift.v2021_09_01_preview.aio.operations.OpenShiftClustersOperations>`
112+
* 2022-04-01: :class:`OpenShiftClustersOperations<azure.mgmt.redhatopenshift.v2022_04_01.aio.operations.OpenShiftClustersOperations>`
104113
"""
105114
api_version = self._get_api_version('open_shift_clusters')
106115
if api_version == '2020-04-30':
107116
from ..v2020_04_30.aio.operations import OpenShiftClustersOperations as OperationClass
117+
elif api_version == '2021-09-01-preview':
118+
from ..v2021_09_01_preview.aio.operations import OpenShiftClustersOperations as OperationClass
119+
elif api_version == '2022-04-01':
120+
from ..v2022_04_01.aio.operations import OpenShiftClustersOperations as OperationClass
108121
else:
109122
raise ValueError("API version {} does not have operation group 'open_shift_clusters'".format(api_version))
110123
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
@@ -114,10 +127,16 @@ def operations(self):
114127
"""Instance depends on the API version:
115128
116129
* 2020-04-30: :class:`Operations<azure.mgmt.redhatopenshift.v2020_04_30.aio.operations.Operations>`
130+
* 2021-09-01-preview: :class:`Operations<azure.mgmt.redhatopenshift.v2021_09_01_preview.aio.operations.Operations>`
131+
* 2022-04-01: :class:`Operations<azure.mgmt.redhatopenshift.v2022_04_01.aio.operations.Operations>`
117132
"""
118133
api_version = self._get_api_version('operations')
119134
if api_version == '2020-04-30':
120135
from ..v2020_04_30.aio.operations import Operations as OperationClass
136+
elif api_version == '2021-09-01-preview':
137+
from ..v2021_09_01_preview.aio.operations import Operations as OperationClass
138+
elif api_version == '2022-04-01':
139+
from ..v2022_04_01.aio.operations import Operations as OperationClass
121140
else:
122141
raise ValueError("API version {} does not have operation group 'operations'".format(api_version))
123142
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,16 @@
1212

1313
from azure.core.configuration import Configuration
1414
from azure.core.pipeline import policies
15-
from azure.mgmt.core.policies import ARMHttpLoggingPolicy
15+
from azure.mgmt.core.policies import ARMHttpLoggingPolicy, AsyncARMChallengeAuthenticationPolicy
1616

1717
from .._version import VERSION
1818

1919
if TYPE_CHECKING:
2020
# pylint: disable=unused-import,ungrouped-imports
2121
from azure.core.credentials_async import AsyncTokenCredential
2222

23-
class AzureRedHatOpenShift4ClientConfiguration(Configuration):
24-
"""Configuration for AzureRedHatOpenShift4Client.
23+
class AzureRedHatOpenShiftClientConfiguration(Configuration):
24+
"""Configuration for AzureRedHatOpenShiftClient.
2525
2626
Note that all parameters used to create this instance are saved as instance
2727
attributes.
@@ -42,7 +42,7 @@ def __init__(
4242
raise ValueError("Parameter 'credential' must not be None.")
4343
if subscription_id is None:
4444
raise ValueError("Parameter 'subscription_id' must not be None.")
45-
super(AzureRedHatOpenShift4ClientConfiguration, self).__init__(**kwargs)
45+
super(AzureRedHatOpenShiftClientConfiguration, self).__init__(**kwargs)
4646

4747
self.credential = credential
4848
self.subscription_id = subscription_id
@@ -64,4 +64,4 @@ def _configure(
6464
self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs)
6565
self.authentication_policy = kwargs.get('authentication_policy')
6666
if self.credential and not self.authentication_policy:
67-
self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs)
67+
self.authentication_policy = AsyncARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs)

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
# Licensed under the MIT License. See License.txt in the project root for
55
# license information.
66
# --------------------------------------------------------------------------
7-
from .v2020_04_30.models import *
7+
from .v2022_04_01.models import *

0 commit comments

Comments
 (0)