Metadata-Version: 2.1
Name: openshift-cluster-management-python-wrapper
Version: 1.0.62
Summary: Wrapper around https://github.com/openshift/openshift-cluster-management-python-client
Home-page: https://github.com/RedHatQE/openshift-cluster-management-python-wrapper
License: Apache-2.0
Keywords: Openshift,OCM
Author: Meni Yakove
Author-email: myakove@gmail.com
Requires-Python: >=3.8,<4.0
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Dist: colorlog (>=6.7.0,<7.0.0)
Requires-Dist: importlib (>=1.0.4,<2.0.0)
Requires-Dist: openshift-cluster-management-python-client (>=1.0.23,<2.0.0)
Requires-Dist: openshift-python-utilities (>=5.0.0,<6.0.0)
Requires-Dist: openshift-python-wrapper (>=4.15.13,<5.0.0)
Requires-Dist: python-benedict (==0.32.1)
Requires-Dist: python-simple-logger (>=1.0.5,<2.0.0)
Requires-Dist: pyyaml (>=6.0.1,<7.0.0)
Requires-Dist: redhat-qe-cloud-tools (>=1.0.10,<2.0.0)
Requires-Dist: requests (>=2.31.0,<3.0.0)
Requires-Dist: rosa-python-client (>=1.0.28,<2.0.0)
Requires-Dist: timeout-sampler (>=0.0.1,<0.0.2)
Project-URL: Bug Tracker, https://github.com/RedHatQE/openshift-cluster-management-python-wrapper/issues
Project-URL: Documentation, https://github.com/RedHatQE/openshift-cluster-management-python-wrapper/blob/main/README.md
Project-URL: Download, https://pypi.org/project/openshift-cluster-management-python-wrapper/
Description-Content-Type: text/markdown

# openshift-cluster-management-python-wrapper
Wrapper for [openshift-cluster-management-python client](https://github.com/RedHatQE/openshift-cluster-management-python-client)

## Release new version
### requirements:
* Export GitHub token
```bash
export GITHUB_TOKEN=<your_github_token>
```
* [release-it](https://github.com/release-it/release-it)

Run the following once (execute outside repository dir, for example `~/`):
```bash
sudo npm install --global release-it
npm install --save-dev @release-it/bumper
```
### usage:
* Create a release, run from the relevant branch.  
To create a 1.0 release, run:
```bash
git checkout v1.0
git pull
release-it # Follow the instructions
```

## Installation
From source:
```bash
git clone https://github.com/RedHatQE/openshift-cluster-management-python-client.git
cd openshift-cluster-management-python-client
python setup.py install --user
```

## Examples
### Client
```python
from ocm_python_wrapper.ocm_client import OCMPythonClient
ocm_client = OCMPythonClient(
    token=<ocm api token>>,
    endpoint=<endpoint url>,
    api_host=<production or stage>,
    discard_unknown_keys=True,
)
return ocm_client.client
```
### Cluster
```python
from ocm_python_wrapper.cluster import Cluster
cluster = Cluster(client=client, name=<cluster name>)
cluster_ocp_version = cluster.instance.version.raw_id
```

