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

[AutoPR azure-mgmt-redhatopenshift] Update readme.python.md #7688

Closed
wants to merge 1 commit into from
Closed
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
4 changes: 2 additions & 2 deletions sdk/redhatopenshift/azure-mgmt-redhatopenshift/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Microsoft Azure SDK for Python

This is the Microsoft Azure Red Hat Openshift Management Client Library.
This package has been tested with Python 3.7+.
This package has been tested with Python 3.8+.
For a more complete view of Azure libraries, see the [azure sdk python release](https://aka.ms/azsdk/python/all).

## _Disclaimer_
Expand All @@ -12,7 +12,7 @@ _Azure SDK Python packages support for Python 2.7 has ended 01 January 2022. For

### Prerequisites

- Python 3.7+ is required to use this package.
- Python 3.8+ is required to use this package.
- [Azure subscription](https://azure.microsoft.com/free/)

### Install the package
Expand Down
25 changes: 13 additions & 12 deletions sdk/redhatopenshift/azure-mgmt-redhatopenshift/_meta.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
{
"commit": "c280892951a9e45c059132c05aace25a9c752d48",
"commit": "d39e49ca2506b2ba5bfbfa4656ca6ac3ed35b014",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest": "3.9.7",
"autorest": "3.10.2",
"use": [
"@autorest/python@6.7.1",
"@autorest/modelerfour@4.26.2"
"@autorest/python@6.15.0",
"@autorest/modelerfour@4.27.0"
],
"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/python@6.7.1 --use=@autorest/modelerfour@4.26.2 --version=3.9.7 --version-tolerant=False",
"readme": "specification/redhatopenshift/resource-manager/readme.md",
"package-2020-04-30": "2022-03-13 20:06:12 -0700 b0a0fccef5bfe412614343ef20a5be7427661330 Microsoft.RedHatOpenShift/stable/2020-04-30/redhatopenshift.json",
"package-2021-09-01-preview": "2021-09-08 03:37:58 +0300 b9e1a57680ad54fd555bce727702550aefcd2d47 Microsoft.RedHatOpenShift/preview/2021-09-01-preview/redhatopenshift.json",
"package-2022-04-01": "2022-04-26 20:09:23 -0700 3c622a337592e7debc58b09a9fdc3aa275ba808f Microsoft.RedHatOpenShift/stable/2022-04-01/redhatopenshift.json",
"package-2022-09-04": "2022-12-06 18:13:21 -0800 1be09531e4c6edeafde41d6562371566d39669e8 Microsoft.RedHatOpenShift/stable/2022-09-04/redhatopenshift.json",
"package-2023-04-01": "2023-07-24 17:12:10 +1000 db80d2c04a9e7ecd7d1fee6da42fe5b825fabf4b Microsoft.RedHatOpenShift/stable/2023-04-01/redhatopenshift.json",
"package-2023-09-04": "2023-09-28 19:57:42 -0500 6941a3d632bf05aac1f38a0db8fb51d04102d49b Microsoft.RedHatOpenShift/stable/2023-09-04/redhatopenshift.json"
"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=/mnt/vss/_work/1/s/azure-sdk-for-python/sdk --use=@autorest/python@6.15.0 --use=@autorest/modelerfour@4.27.0 --version=3.10.2 --version-tolerant=False",
"readme": "specification/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/openshiftclusters/readme.md",
"package-2020-04-30": "2024-05-15 18:25:55 +0200 7dae1e5f45f91ec89d16a628e102341490ced849 stable/2020-04-30/redhatopenshift.json",
"package-2021-09-01-preview": "2024-05-15 18:25:55 +0200 7dae1e5f45f91ec89d16a628e102341490ced849 preview/2021-09-01-preview/redhatopenshift.json",
"package-2022-04-01": "2024-05-15 18:25:55 +0200 7dae1e5f45f91ec89d16a628e102341490ced849 stable/2022-04-01/redhatopenshift.json",
"package-2022-09-04": "2024-05-15 18:25:55 +0200 7dae1e5f45f91ec89d16a628e102341490ced849 stable/2022-09-04/redhatopenshift.json",
"package-2023-04-01": "2024-05-15 18:25:55 +0200 7dae1e5f45f91ec89d16a628e102341490ced849 stable/2023-04-01/redhatopenshift.json",
"package-2023-09-04": "2024-05-15 18:25:55 +0200 7dae1e5f45f91ec89d16a628e102341490ced849 stable/2023-09-04/redhatopenshift.json",
"package-2023-11": "2024-05-15 18:25:55 +0200 7dae1e5f45f91ec89d16a628e102341490ced849 stable/2023-11-22/redhatopenshift.json"
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,11 @@
# --------------------------------------------------------------------------

from typing import Any, Optional, TYPE_CHECKING
from typing_extensions import Self

from azure.core.pipeline import policies
from azure.mgmt.core import ARMPipelineClient
from azure.mgmt.core.policies import ARMAutoResourceProviderRegistrationPolicy
from azure.profiles import KnownProfiles, ProfileDefinition
from azure.profiles.multiapiclient import MultiApiClientMixin

Expand Down Expand Up @@ -53,7 +56,7 @@ class AzureRedHatOpenShiftClient(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 = '2023-09-04'
DEFAULT_API_VERSION = '2023-11-22'
_PROFILE_TAG = "azure.mgmt.redhatopenshift.AzureRedHatOpenShiftClient"
LATEST_PROFILE = ProfileDefinition({
_PROFILE_TAG: {
Expand All @@ -74,7 +77,25 @@ def __init__(
if api_version:
kwargs.setdefault('api_version', api_version)
self._config = AzureRedHatOpenShiftClientConfiguration(credential, subscription_id, **kwargs)
self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
_policies = kwargs.pop("policies", None)
if _policies is None:
_policies = [
policies.RequestIdPolicy(**kwargs),
self._config.headers_policy,
self._config.user_agent_policy,
self._config.proxy_policy,
policies.ContentDecodePolicy(**kwargs),
ARMAutoResourceProviderRegistrationPolicy(),
self._config.redirect_policy,
self._config.retry_policy,
self._config.authentication_policy,
self._config.custom_hook_policy,
self._config.logging_policy,
policies.DistributedTracingPolicy(**kwargs),
policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None,
self._config.http_logging_policy,
]
self._client = ARMPipelineClient(base_url=base_url, policies=_policies, **kwargs)
super(AzureRedHatOpenShiftClient, self).__init__(
api_version=api_version,
profile=profile
Expand All @@ -94,6 +115,7 @@ def models(cls, api_version=DEFAULT_API_VERSION):
* 2022-09-04: :mod:`v2022_09_04.models<azure.mgmt.redhatopenshift.v2022_09_04.models>`
* 2023-04-01: :mod:`v2023_04_01.models<azure.mgmt.redhatopenshift.v2023_04_01.models>`
* 2023-09-04: :mod:`v2023_09_04.models<azure.mgmt.redhatopenshift.v2023_09_04.models>`
* 2023-11-22: :mod:`v2023_11_22.models<azure.mgmt.redhatopenshift.v2023_11_22.models>`
"""
if api_version == '2020-04-30':
from .v2020_04_30 import models
Expand All @@ -113,6 +135,9 @@ def models(cls, api_version=DEFAULT_API_VERSION):
elif api_version == '2023-09-04':
from .v2023_09_04 import models
return models
elif api_version == '2023-11-22':
from .v2023_11_22 import models
return models
raise ValueError("API version {} is not available".format(api_version))

@property
Expand All @@ -122,6 +147,7 @@ def machine_pools(self):
* 2022-09-04: :class:`MachinePoolsOperations<azure.mgmt.redhatopenshift.v2022_09_04.operations.MachinePoolsOperations>`
* 2023-04-01: :class:`MachinePoolsOperations<azure.mgmt.redhatopenshift.v2023_04_01.operations.MachinePoolsOperations>`
* 2023-09-04: :class:`MachinePoolsOperations<azure.mgmt.redhatopenshift.v2023_09_04.operations.MachinePoolsOperations>`
* 2023-11-22: :class:`MachinePoolsOperations<azure.mgmt.redhatopenshift.v2023_11_22.operations.MachinePoolsOperations>`
"""
api_version = self._get_api_version('machine_pools')
if api_version == '2022-09-04':
Expand All @@ -130,6 +156,8 @@ def machine_pools(self):
from .v2023_04_01.operations import MachinePoolsOperations as OperationClass
elif api_version == '2023-09-04':
from .v2023_09_04.operations import MachinePoolsOperations as OperationClass
elif api_version == '2023-11-22':
from .v2023_11_22.operations import MachinePoolsOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'machine_pools'".format(api_version))
self._config.api_version = api_version
Expand All @@ -145,6 +173,7 @@ def open_shift_clusters(self):
* 2022-09-04: :class:`OpenShiftClustersOperations<azure.mgmt.redhatopenshift.v2022_09_04.operations.OpenShiftClustersOperations>`
* 2023-04-01: :class:`OpenShiftClustersOperations<azure.mgmt.redhatopenshift.v2023_04_01.operations.OpenShiftClustersOperations>`
* 2023-09-04: :class:`OpenShiftClustersOperations<azure.mgmt.redhatopenshift.v2023_09_04.operations.OpenShiftClustersOperations>`
* 2023-11-22: :class:`OpenShiftClustersOperations<azure.mgmt.redhatopenshift.v2023_11_22.operations.OpenShiftClustersOperations>`
"""
api_version = self._get_api_version('open_shift_clusters')
if api_version == '2020-04-30':
Expand All @@ -159,6 +188,8 @@ def open_shift_clusters(self):
from .v2023_04_01.operations import OpenShiftClustersOperations as OperationClass
elif api_version == '2023-09-04':
from .v2023_09_04.operations import OpenShiftClustersOperations as OperationClass
elif api_version == '2023-11-22':
from .v2023_11_22.operations import OpenShiftClustersOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'open_shift_clusters'".format(api_version))
self._config.api_version = api_version
Expand All @@ -171,6 +202,7 @@ def open_shift_versions(self):
* 2022-09-04: :class:`OpenShiftVersionsOperations<azure.mgmt.redhatopenshift.v2022_09_04.operations.OpenShiftVersionsOperations>`
* 2023-04-01: :class:`OpenShiftVersionsOperations<azure.mgmt.redhatopenshift.v2023_04_01.operations.OpenShiftVersionsOperations>`
* 2023-09-04: :class:`OpenShiftVersionsOperations<azure.mgmt.redhatopenshift.v2023_09_04.operations.OpenShiftVersionsOperations>`
* 2023-11-22: :class:`OpenShiftVersionsOperations<azure.mgmt.redhatopenshift.v2023_11_22.operations.OpenShiftVersionsOperations>`
"""
api_version = self._get_api_version('open_shift_versions')
if api_version == '2022-09-04':
Expand All @@ -179,6 +211,8 @@ def open_shift_versions(self):
from .v2023_04_01.operations import OpenShiftVersionsOperations as OperationClass
elif api_version == '2023-09-04':
from .v2023_09_04.operations import OpenShiftVersionsOperations as OperationClass
elif api_version == '2023-11-22':
from .v2023_11_22.operations import OpenShiftVersionsOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'open_shift_versions'".format(api_version))
self._config.api_version = api_version
Expand All @@ -194,6 +228,7 @@ def operations(self):
* 2022-09-04: :class:`Operations<azure.mgmt.redhatopenshift.v2022_09_04.operations.Operations>`
* 2023-04-01: :class:`Operations<azure.mgmt.redhatopenshift.v2023_04_01.operations.Operations>`
* 2023-09-04: :class:`Operations<azure.mgmt.redhatopenshift.v2023_09_04.operations.Operations>`
* 2023-11-22: :class:`Operations<azure.mgmt.redhatopenshift.v2023_11_22.operations.Operations>`
"""
api_version = self._get_api_version('operations')
if api_version == '2020-04-30':
Expand All @@ -208,6 +243,8 @@ def operations(self):
from .v2023_04_01.operations import Operations as OperationClass
elif api_version == '2023-09-04':
from .v2023_09_04.operations import Operations as OperationClass
elif api_version == '2023-11-22':
from .v2023_11_22.operations import Operations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'operations'".format(api_version))
self._config.api_version = api_version
Expand All @@ -220,6 +257,7 @@ def secrets(self):
* 2022-09-04: :class:`SecretsOperations<azure.mgmt.redhatopenshift.v2022_09_04.operations.SecretsOperations>`
* 2023-04-01: :class:`SecretsOperations<azure.mgmt.redhatopenshift.v2023_04_01.operations.SecretsOperations>`
* 2023-09-04: :class:`SecretsOperations<azure.mgmt.redhatopenshift.v2023_09_04.operations.SecretsOperations>`
* 2023-11-22: :class:`SecretsOperations<azure.mgmt.redhatopenshift.v2023_11_22.operations.SecretsOperations>`
"""
api_version = self._get_api_version('secrets')
if api_version == '2022-09-04':
Expand All @@ -228,6 +266,8 @@ def secrets(self):
from .v2023_04_01.operations import SecretsOperations as OperationClass
elif api_version == '2023-09-04':
from .v2023_09_04.operations import SecretsOperations as OperationClass
elif api_version == '2023-11-22':
from .v2023_11_22.operations import SecretsOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'secrets'".format(api_version))
self._config.api_version = api_version
Expand All @@ -240,6 +280,7 @@ def sync_identity_providers(self):
* 2022-09-04: :class:`SyncIdentityProvidersOperations<azure.mgmt.redhatopenshift.v2022_09_04.operations.SyncIdentityProvidersOperations>`
* 2023-04-01: :class:`SyncIdentityProvidersOperations<azure.mgmt.redhatopenshift.v2023_04_01.operations.SyncIdentityProvidersOperations>`
* 2023-09-04: :class:`SyncIdentityProvidersOperations<azure.mgmt.redhatopenshift.v2023_09_04.operations.SyncIdentityProvidersOperations>`
* 2023-11-22: :class:`SyncIdentityProvidersOperations<azure.mgmt.redhatopenshift.v2023_11_22.operations.SyncIdentityProvidersOperations>`
"""
api_version = self._get_api_version('sync_identity_providers')
if api_version == '2022-09-04':
Expand All @@ -248,6 +289,8 @@ def sync_identity_providers(self):
from .v2023_04_01.operations import SyncIdentityProvidersOperations as OperationClass
elif api_version == '2023-09-04':
from .v2023_09_04.operations import SyncIdentityProvidersOperations as OperationClass
elif api_version == '2023-11-22':
from .v2023_11_22.operations import SyncIdentityProvidersOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'sync_identity_providers'".format(api_version))
self._config.api_version = api_version
Expand All @@ -260,6 +303,7 @@ def sync_sets(self):
* 2022-09-04: :class:`SyncSetsOperations<azure.mgmt.redhatopenshift.v2022_09_04.operations.SyncSetsOperations>`
* 2023-04-01: :class:`SyncSetsOperations<azure.mgmt.redhatopenshift.v2023_04_01.operations.SyncSetsOperations>`
* 2023-09-04: :class:`SyncSetsOperations<azure.mgmt.redhatopenshift.v2023_09_04.operations.SyncSetsOperations>`
* 2023-11-22: :class:`SyncSetsOperations<azure.mgmt.redhatopenshift.v2023_11_22.operations.SyncSetsOperations>`
"""
api_version = self._get_api_version('sync_sets')
if api_version == '2022-09-04':
Expand All @@ -268,6 +312,8 @@ def sync_sets(self):
from .v2023_04_01.operations import SyncSetsOperations as OperationClass
elif api_version == '2023-09-04':
from .v2023_09_04.operations import SyncSetsOperations as OperationClass
elif api_version == '2023-11-22':
from .v2023_11_22.operations import SyncSetsOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'sync_sets'".format(api_version))
self._config.api_version = api_version
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
# --------------------------------------------------------------------------
from typing import Any, TYPE_CHECKING

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

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

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

Note that all parameters used to create this instance are saved as instance
Expand All @@ -42,12 +41,12 @@ 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(AzureRedHatOpenShiftClientConfiguration, self).__init__(**kwargs)

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

def _configure(
Expand Down
Loading