Registry / azure / azure-mgmt-redhatopenshift

azure-mgmt-redhatopenshift

JSON →
library4.0.0pypypi✓ verified 25d ago

The Microsoft Azure Red Hat OpenShift Management Client Library for Python (azure-mgmt-redhatopenshift) provides an interface to programmatically manage Azure Red Hat OpenShift resources. Currently at version 3.0.0, this library is part of the larger Azure SDK for Python ecosystem and is actively maintained with regular updates, often aligning with new OpenShift minor versions. It requires Python 3.9 or higher for operation.

pip install azure-mgmt-redhatopenshift azure-identity
INSTALL
IMPORT
SIG · AZURE-MGMT-REDHATO
A
azure-mgmt-redhatopenshift
azurepythonv4.0.0
Install
3.7s avg
Import
574ms
Disk
43MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v4.0.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.610s · 43.8MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 3.7s · import 0.538s · 44MB
43MB installed
● package 43MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

AzureRedHatOpenShiftClient
from azure.mgmt.redhatopenshift import AzureRedHatOpenShiftClient
DefaultAzureCredential
from azure.identity import DefaultAzureCredential

This quickstart demonstrates how to initialize the `AzureRedHatOpenShiftClient` using `DefaultAzureCredential` for authentication. It assumes necessary Azure environment variables (AZURE_CLIENT_ID, AZURE_TENANT_ID, AZURE_CLIENT_SECRET, AZURE_SUBSCRIPTION_ID) are configured. The client can then be used to interact with Azure Red Hat OpenShift resources. An example to list clusters is commented out as it requires specific Azure resources and permissions to run successfully.

import os from azure.identity import DefaultAzureCredential from azure.mgmt.redhatopenshift import AzureRedHatOpenShiftClient # Ensure environment variables are set for authentication: # AZURE_CLIENT_ID, AZURE_TENANT_ID, AZURE_CLIENT_SECRET # AZURE_SUBSCRIPTION_ID # For demonstration, using os.getenv with a placeholder subscription ID. # In a production environment, ensure these are securely configured. subscription_id = os.getenv("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") # Authenticate using DefaultAzureCredential # This attempts to authenticate via environment variables, managed identity, etc. credential = DefaultAzureCredential() # Create a client client = AzureRedHatOpenShiftClient(credential=credential, subscription_id=subscription_id) print(f"AzureRedHatOpenShiftClient initialized for subscription: {subscription_id}") # Example: List OpenShift clusters in the subscription (requires existing clusters and permissions) # try: # for cluster in client.open_shift_clusters.list(): # print(f"Found cluster: {cluster.name} in resource group: {cluster.resource_group_name}") # except Exception as e: # print(f"Could not list clusters: {e}") print("To list clusters, ensure you have the necessary permissions and uncomment the example code.")
Debug
Known issues
breakingStarting with version 1.5.0, this package exclusively targets the latest Azure API-Version, removing APIs for older versions. Applications requiring a specific, non-latest API-Version should pin to an earlier package version.
fix
If your application relies on a specific older API version, pin the `azure-mgmt-redhatopenshift` package to a version prior to 1.5.0. Otherwise, ensure your code is compatible with the latest API version.
affects: >=1.5.0
breakingThe credential system was completely revamped. Old `azure.common.credentials` or `msrestazure.azure_active_directory` instances are no longer supported. The `credentials` parameter was renamed to `credential`.
fix
Migrate your authentication to use classes from the `azure-identity` library (e.g., `DefaultAzureCredential`). Update client instantiation to use the `credential` parameter instead of `credentials`.
affects: >=1.0.0b1 (fully effective in 1.x.x GA)
breakingOperations that previously returned `msrest.polling.LROPoller` now return `azure.core.polling.LROPoller` and are prefixed with `begin_` (e.g., `create_or_update` becomes `begin_create_or_update`).
fix
Adjust method calls to use the `begin_` prefix for long-running operations and expect `azure.core.polling.LROPoller` as the return type.
affects: >=1.0.0b1 (fully effective in 1.x.x GA)
gotchaAzure Red Hat OpenShift cluster creation typically requires a minimum of 44 vCPUs (or 40 cores in some older documentation) across various VM families. Default Azure subscription quotas are often lower, leading to deployment failures if not increased.
fix
Before creating an ARO cluster, request an increase in your Azure subscription's vCPU quota for the relevant VM families (e.g., Standard DSv3/DSv5/Dxv6) through the Azure portal support request.
affects: All
gotchaThis library (and the broader Azure SDK for Python) requires Python 3.9+. Support for Python 2.7 officially ended on January 01, 2022.
fix
Ensure your development and deployment environments are running Python 3.9 or a newer supported version.
affects: All
gotchaCertain operation groups (e.g., `OpenShiftClustersOperations`, `OpenShiftVersionsOperations`) should not be instantiated directly. Instead, they are accessed as attributes of the `AzureRedHatOpenShiftClient` instance.
fix
Always access operation groups through the client object, e.g., `client.open_shift_clusters.list()` instead of `OpenShiftClustersOperations().list()`.
affects: All
Upgrade
Version history
4.0.0latest on PyPI · released Jul 14, 2026
Audit
Dependencies
azure-identityrequiredRequired for Azure Active Directory token authentication.
PythonrequiredRequires Python 3.9 or higher.
Agent activity
19 hits · last 30 days
node
16
OpenAI (training)
1
Resources
azure-mgmt-redhatopenshift — pip install azure-mgmt-redhatopenshift · libregistry