https://github.com/redhatqe/openshift-cluster-management-python-wrapper
https://github.com/redhatqe/openshift-cluster-management-python-wrapper
Last synced: 8 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/redhatqe/openshift-cluster-management-python-wrapper
- Owner: RedHatQE
- License: apache-2.0
- Created: 2022-07-17T11:19:06.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2025-05-05T08:16:19.000Z (8 months ago)
- Last Synced: 2025-05-05T08:25:38.115Z (8 months ago)
- Language: Python
- Size: 1.24 MB
- Stars: 1
- Watchers: 5
- Forks: 7
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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=
```
* [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=>,
endpoint=,
api_host=,
discard_unknown_keys=True,
)
return ocm_client.client
```
### Cluster
```python
from ocm_python_wrapper.cluster import Cluster
cluster = Cluster(client=client, name=)
cluster_ocp_version = cluster.instance.version.raw_id
```