# 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
```
Raw data
{
"_id": null,
"home_page": "https://github.com/RedHatQE/openshift-cluster-management-python-wrapper",
"name": "openshift-cluster-management-python-wrapper",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.8",
"maintainer_email": null,
"keywords": "Openshift, OCM",
"author": "Meni Yakove",
"author_email": "myakove@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/9f/0b/0f28d7bbfae99eddb1bba432ed2a7b5ad667b0b8e610e08477e9cbae9403/openshift_cluster_management_python_wrapper-1.0.111.tar.gz",
"platform": null,
"description": "# openshift-cluster-management-python-wrapper\nWrapper for [openshift-cluster-management-python client](https://github.com/RedHatQE/openshift-cluster-management-python-client)\n\n## Release new version\n### requirements:\n* Export GitHub token\n```bash\nexport GITHUB_TOKEN=<your_github_token>\n```\n* [release-it](https://github.com/release-it/release-it)\n\nRun the following once (execute outside repository dir, for example `~/`):\n```bash\nsudo npm install --global release-it\nnpm install --save-dev @release-it/bumper\n```\n### usage:\n* Create a release, run from the relevant branch. \nTo create a 1.0 release, run:\n```bash\ngit checkout v1.0\ngit pull\nrelease-it # Follow the instructions\n```\n\n## Installation\nFrom source:\n```bash\ngit clone https://github.com/RedHatQE/openshift-cluster-management-python-client.git\ncd openshift-cluster-management-python-client\npython setup.py install --user\n```\n\n## Examples\n### Client\n```python\nfrom ocm_python_wrapper.ocm_client import OCMPythonClient\nocm_client = OCMPythonClient(\n token=<ocm api token>>,\n endpoint=<endpoint url>,\n api_host=<production or stage>,\n discard_unknown_keys=True,\n)\nreturn ocm_client.client\n```\n### Cluster\n```python\nfrom ocm_python_wrapper.cluster import Cluster\ncluster = Cluster(client=client, name=<cluster name>)\ncluster_ocp_version = cluster.instance.version.raw_id\n```\n\n",
"bugtrack_url": null,
"license": "Apache-2.0",
"summary": "Wrapper around https://github.com/openshift/openshift-cluster-management-python-client",
"version": "1.0.111",
"project_urls": {
"Bug Tracker": "https://github.com/RedHatQE/openshift-cluster-management-python-wrapper/issues",
"Documentation": "https://github.com/RedHatQE/openshift-cluster-management-python-wrapper/blob/main/README.md",
"Download": "https://pypi.org/project/openshift-cluster-management-python-wrapper/",
"Homepage": "https://github.com/RedHatQE/openshift-cluster-management-python-wrapper"
},
"split_keywords": [
"openshift",
" ocm"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "9f0b0f28d7bbfae99eddb1bba432ed2a7b5ad667b0b8e610e08477e9cbae9403",
"md5": "8306010399acadeaf9a2f29bb079d86c",
"sha256": "9b75188380a3fd19d19d7acdb3ac97dd5db02793b1437240162911d5df6e59dc"
},
"downloads": -1,
"filename": "openshift_cluster_management_python_wrapper-1.0.111.tar.gz",
"has_sig": false,
"md5_digest": "8306010399acadeaf9a2f29bb079d86c",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.8",
"size": 15887,
"upload_time": "2024-05-19T07:26:33",
"upload_time_iso_8601": "2024-05-19T07:26:33.408800Z",
"url": "https://files.pythonhosted.org/packages/9f/0b/0f28d7bbfae99eddb1bba432ed2a7b5ad667b0b8e610e08477e9cbae9403/openshift_cluster_management_python_wrapper-1.0.111.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-05-19 07:26:33",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "RedHatQE",
"github_project": "openshift-cluster-management-python-wrapper",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"tox": true,
"lcname": "openshift-cluster-management-python-wrapper"
}