Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoRelease] t2-redhatopenshift-2022-05-05-85576(Do not merge) #24302

Merged
merged 3 commits into from
May 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions sdk/redhatopenshift/azure-mgmt-redhatopenshift/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Release History

## 1.1.0 (2022-05-10)

**Features**

- Added operation OpenShiftClustersOperations.list_admin_credentials
- Model ClusterProfile has a new parameter fips_validated_modules
- Model MasterProfile has a new parameter disk_encryption_set_id
- Model MasterProfile has a new parameter encryption_at_host
- Model OpenShiftCluster has a new parameter system_data
- Model OpenShiftClusterUpdate has a new parameter system_data
- Model WorkerProfile has a new parameter disk_encryption_set_id
- Model WorkerProfile has a new parameter encryption_at_host

## 1.0.0 (2021-05-20)

- GA release
Expand Down
10 changes: 5 additions & 5 deletions sdk/redhatopenshift/azure-mgmt-redhatopenshift/_meta.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"autorest": "3.4.2",
"autorest": "3.7.2",
"use": [
"@autorest/python@5.8.0",
"@autorest/[email protected].1"
"@autorest/python@5.13.0",
"@autorest/[email protected].3"
],
"commit": "790522f1d12ec3de2274bd65bd623e99399571b9",
"commit": "50ed15bd61ac79f2368d769df0c207a00b9e099f",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"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",
"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",
"readme": "specification/redhatopenshift/resource-manager/readme.md"
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

from ._azure_red_hat_open_shift4_client import AzureRedHatOpenShift4Client
__all__ = ['AzureRedHatOpenShift4Client']
from ._azure_red_hat_open_shift_client import AzureRedHatOpenShiftClient
__all__ = ['AzureRedHatOpenShiftClient']

try:
from ._patch import patch_sdk # type: ignore
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@

from typing import TYPE_CHECKING

from msrest import Deserializer, Serializer

from azure.mgmt.core import ARMPipelineClient
from azure.profiles import KnownProfiles, ProfileDefinition
from azure.profiles.multiapiclient import MultiApiClientMixin
from msrest import Deserializer, Serializer

from ._configuration import AzureRedHatOpenShift4ClientConfiguration
from ._configuration import AzureRedHatOpenShiftClientConfiguration

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

from azure.core.credentials import TokenCredential
from azure.core.pipeline.transport import HttpRequest, HttpResponse

class _SDKClient(object):
def __init__(self, *args, **kwargs):
Expand All @@ -32,7 +32,7 @@ def __init__(self, *args, **kwargs):
"""
pass

class AzureRedHatOpenShift4Client(MultiApiClientMixin, _SDKClient):
class AzureRedHatOpenShiftClient(MultiApiClientMixin, _SDKClient):
"""Rest API for Azure Red Hat OpenShift 4.

This ready contains multiple API versions, to help you deal with all of the Azure clouds
Expand All @@ -56,8 +56,8 @@ class AzureRedHatOpenShift4Client(MultiApiClientMixin, _SDKClient):
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
"""

DEFAULT_API_VERSION = '2020-04-30'
_PROFILE_TAG = "azure.mgmt.redhatopenshift.AzureRedHatOpenShift4Client"
DEFAULT_API_VERSION = '2022-04-01'
_PROFILE_TAG = "azure.mgmt.redhatopenshift.AzureRedHatOpenShiftClient"
LATEST_PROFILE = ProfileDefinition({
_PROFILE_TAG: {
None: DEFAULT_API_VERSION,
Expand All @@ -70,15 +70,13 @@ def __init__(
credential, # type: "TokenCredential"
subscription_id, # type: str
api_version=None, # type: Optional[str]
base_url=None, # type: Optional[str]
base_url="https://management.azure.com", # type: str
profile=KnownProfiles.default, # type: KnownProfiles
**kwargs # type: Any
):
if not base_url:
base_url = 'https://management.azure.com'
self._config = AzureRedHatOpenShift4ClientConfiguration(credential, subscription_id, **kwargs)
self._config = AzureRedHatOpenShiftClientConfiguration(credential, subscription_id, **kwargs)
self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
super(AzureRedHatOpenShift4Client, self).__init__(
super(AzureRedHatOpenShiftClient, self).__init__(
api_version=api_version,
profile=profile
)
Expand All @@ -92,21 +90,35 @@ def models(cls, api_version=DEFAULT_API_VERSION):
"""Module depends on the API version:

* 2020-04-30: :mod:`v2020_04_30.models<azure.mgmt.redhatopenshift.v2020_04_30.models>`
* 2021-09-01-preview: :mod:`v2021_09_01_preview.models<azure.mgmt.redhatopenshift.v2021_09_01_preview.models>`
* 2022-04-01: :mod:`v2022_04_01.models<azure.mgmt.redhatopenshift.v2022_04_01.models>`
"""
if api_version == '2020-04-30':
from .v2020_04_30 import models
return models
elif api_version == '2021-09-01-preview':
from .v2021_09_01_preview import models
return models
elif api_version == '2022-04-01':
from .v2022_04_01 import models
return models
raise ValueError("API version {} is not available".format(api_version))

@property
def open_shift_clusters(self):
"""Instance depends on the API version:

* 2020-04-30: :class:`OpenShiftClustersOperations<azure.mgmt.redhatopenshift.v2020_04_30.operations.OpenShiftClustersOperations>`
* 2021-09-01-preview: :class:`OpenShiftClustersOperations<azure.mgmt.redhatopenshift.v2021_09_01_preview.operations.OpenShiftClustersOperations>`
* 2022-04-01: :class:`OpenShiftClustersOperations<azure.mgmt.redhatopenshift.v2022_04_01.operations.OpenShiftClustersOperations>`
"""
api_version = self._get_api_version('open_shift_clusters')
if api_version == '2020-04-30':
from .v2020_04_30.operations import OpenShiftClustersOperations as OperationClass
elif api_version == '2021-09-01-preview':
from .v2021_09_01_preview.operations import OpenShiftClustersOperations as OperationClass
elif api_version == '2022-04-01':
from .v2022_04_01.operations import OpenShiftClustersOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'open_shift_clusters'".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
Expand All @@ -116,10 +128,16 @@ def operations(self):
"""Instance depends on the API version:

* 2020-04-30: :class:`Operations<azure.mgmt.redhatopenshift.v2020_04_30.operations.Operations>`
* 2021-09-01-preview: :class:`Operations<azure.mgmt.redhatopenshift.v2021_09_01_preview.operations.Operations>`
* 2022-04-01: :class:`Operations<azure.mgmt.redhatopenshift.v2022_04_01.operations.Operations>`
"""
api_version = self._get_api_version('operations')
if api_version == '2020-04-30':
from .v2020_04_30.operations import Operations as OperationClass
elif api_version == '2021-09-01-preview':
from .v2021_09_01_preview.operations import Operations as OperationClass
elif api_version == '2022-04-01':
from .v2022_04_01.operations import Operations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'operations'".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

from azure.core.configuration import Configuration
from azure.core.pipeline import policies
from azure.mgmt.core.policies import ARMHttpLoggingPolicy
from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy

from ._version import VERSION

Expand All @@ -22,8 +22,8 @@

from azure.core.credentials import TokenCredential

class AzureRedHatOpenShift4ClientConfiguration(Configuration):
"""Configuration for AzureRedHatOpenShift4Client.
class AzureRedHatOpenShiftClientConfiguration(Configuration):
"""Configuration for AzureRedHatOpenShiftClient.

Note that all parameters used to create this instance are saved as instance
attributes.
Expand All @@ -45,7 +45,7 @@ def __init__(
raise ValueError("Parameter 'credential' must not be None.")
if subscription_id is None:
raise ValueError("Parameter 'subscription_id' must not be None.")
super(AzureRedHatOpenShift4ClientConfiguration, self).__init__(**kwargs)
super(AzureRedHatOpenShiftClientConfiguration, self).__init__(**kwargs)

self.credential = credential
self.subscription_id = subscription_id
Expand All @@ -68,4 +68,4 @@ def _configure(
self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs)
self.authentication_policy = kwargs.get('authentication_policy')
if self.credential and not self.authentication_policy:
self.authentication_policy = policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs)
self.authentication_policy = ARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs)
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "1.0.0"
VERSION = "1.1.0"

Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

from ._azure_red_hat_open_shift4_client import AzureRedHatOpenShift4Client
__all__ = ['AzureRedHatOpenShift4Client']
from ._azure_red_hat_open_shift_client import AzureRedHatOpenShiftClient
__all__ = ['AzureRedHatOpenShiftClient']
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,17 @@

from typing import Any, Optional, TYPE_CHECKING

from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest
from msrest import Deserializer, Serializer

from azure.mgmt.core import AsyncARMPipelineClient
from azure.profiles import KnownProfiles, ProfileDefinition
from azure.profiles.multiapiclient import MultiApiClientMixin
from msrest import Deserializer, Serializer

from ._configuration import AzureRedHatOpenShift4ClientConfiguration
from ._configuration import AzureRedHatOpenShiftClientConfiguration

if TYPE_CHECKING:
# pylint: disable=unused-import,ungrouped-imports
from azure.core.credentials import TokenCredential
from azure.core.credentials_async import AsyncTokenCredential

class _SDKClient(object):
Expand All @@ -30,7 +31,7 @@ def __init__(self, *args, **kwargs):
"""
pass

class AzureRedHatOpenShift4Client(MultiApiClientMixin, _SDKClient):
class AzureRedHatOpenShiftClient(MultiApiClientMixin, _SDKClient):
"""Rest API for Azure Red Hat OpenShift 4.

This ready contains multiple API versions, to help you deal with all of the Azure clouds
Expand All @@ -54,8 +55,8 @@ class AzureRedHatOpenShift4Client(MultiApiClientMixin, _SDKClient):
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
"""

DEFAULT_API_VERSION = '2020-04-30'
_PROFILE_TAG = "azure.mgmt.redhatopenshift.AzureRedHatOpenShift4Client"
DEFAULT_API_VERSION = '2022-04-01'
_PROFILE_TAG = "azure.mgmt.redhatopenshift.AzureRedHatOpenShiftClient"
LATEST_PROFILE = ProfileDefinition({
_PROFILE_TAG: {
None: DEFAULT_API_VERSION,
Expand All @@ -68,15 +69,13 @@ def __init__(
credential: "AsyncTokenCredential",
subscription_id: str,
api_version: Optional[str] = None,
base_url: Optional[str] = None,
base_url: str = "https://management.azure.com",
profile: KnownProfiles = KnownProfiles.default,
**kwargs # type: Any
) -> None:
if not base_url:
base_url = 'https://management.azure.com'
self._config = AzureRedHatOpenShift4ClientConfiguration(credential, subscription_id, **kwargs)
self._config = AzureRedHatOpenShiftClientConfiguration(credential, subscription_id, **kwargs)
self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
super(AzureRedHatOpenShift4Client, self).__init__(
super(AzureRedHatOpenShiftClient, self).__init__(
api_version=api_version,
profile=profile
)
Expand All @@ -90,21 +89,35 @@ def models(cls, api_version=DEFAULT_API_VERSION):
"""Module depends on the API version:

* 2020-04-30: :mod:`v2020_04_30.models<azure.mgmt.redhatopenshift.v2020_04_30.models>`
* 2021-09-01-preview: :mod:`v2021_09_01_preview.models<azure.mgmt.redhatopenshift.v2021_09_01_preview.models>`
* 2022-04-01: :mod:`v2022_04_01.models<azure.mgmt.redhatopenshift.v2022_04_01.models>`
"""
if api_version == '2020-04-30':
from ..v2020_04_30 import models
return models
elif api_version == '2021-09-01-preview':
from ..v2021_09_01_preview import models
return models
elif api_version == '2022-04-01':
from ..v2022_04_01 import models
return models
raise ValueError("API version {} is not available".format(api_version))

@property
def open_shift_clusters(self):
"""Instance depends on the API version:

* 2020-04-30: :class:`OpenShiftClustersOperations<azure.mgmt.redhatopenshift.v2020_04_30.aio.operations.OpenShiftClustersOperations>`
* 2021-09-01-preview: :class:`OpenShiftClustersOperations<azure.mgmt.redhatopenshift.v2021_09_01_preview.aio.operations.OpenShiftClustersOperations>`
* 2022-04-01: :class:`OpenShiftClustersOperations<azure.mgmt.redhatopenshift.v2022_04_01.aio.operations.OpenShiftClustersOperations>`
"""
api_version = self._get_api_version('open_shift_clusters')
if api_version == '2020-04-30':
from ..v2020_04_30.aio.operations import OpenShiftClustersOperations as OperationClass
elif api_version == '2021-09-01-preview':
from ..v2021_09_01_preview.aio.operations import OpenShiftClustersOperations as OperationClass
elif api_version == '2022-04-01':
from ..v2022_04_01.aio.operations import OpenShiftClustersOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'open_shift_clusters'".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
Expand All @@ -114,10 +127,16 @@ def operations(self):
"""Instance depends on the API version:

* 2020-04-30: :class:`Operations<azure.mgmt.redhatopenshift.v2020_04_30.aio.operations.Operations>`
* 2021-09-01-preview: :class:`Operations<azure.mgmt.redhatopenshift.v2021_09_01_preview.aio.operations.Operations>`
* 2022-04-01: :class:`Operations<azure.mgmt.redhatopenshift.v2022_04_01.aio.operations.Operations>`
"""
api_version = self._get_api_version('operations')
if api_version == '2020-04-30':
from ..v2020_04_30.aio.operations import Operations as OperationClass
elif api_version == '2021-09-01-preview':
from ..v2021_09_01_preview.aio.operations import Operations as OperationClass
elif api_version == '2022-04-01':
from ..v2022_04_01.aio.operations import Operations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'operations'".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@

from azure.core.configuration import Configuration
from azure.core.pipeline import policies
from azure.mgmt.core.policies import ARMHttpLoggingPolicy
from azure.mgmt.core.policies import ARMHttpLoggingPolicy, AsyncARMChallengeAuthenticationPolicy

from .._version import VERSION

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

class AzureRedHatOpenShift4ClientConfiguration(Configuration):
"""Configuration for AzureRedHatOpenShift4Client.
class AzureRedHatOpenShiftClientConfiguration(Configuration):
"""Configuration for AzureRedHatOpenShiftClient.

Note that all parameters used to create this instance are saved as instance
attributes.
Expand All @@ -42,7 +42,7 @@ def __init__(
raise ValueError("Parameter 'credential' must not be None.")
if subscription_id is None:
raise ValueError("Parameter 'subscription_id' must not be None.")
super(AzureRedHatOpenShift4ClientConfiguration, self).__init__(**kwargs)
super(AzureRedHatOpenShiftClientConfiguration, self).__init__(**kwargs)

self.credential = credential
self.subscription_id = subscription_id
Expand All @@ -64,4 +64,4 @@ def _configure(
self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs)
self.authentication_policy = kwargs.get('authentication_policy')
if self.credential and not self.authentication_policy:
self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs)
self.authentication_policy = AsyncARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs)
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------------
from .v2020_04_30.models import *
from .v2022_04_01.models import *
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
__version__ = VERSION
__all__ = ['AzureRedHatOpenShift4Client']

try:
from ._patch import patch_sdk # type: ignore
patch_sdk()
except ImportError:
pass
# `._patch.py` is used for handwritten extensions to the generated code
# Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md
from ._patch import patch_sdk
patch_sdk()
Loading