https://github.com/platform9/qbertclient
https://github.com/platform9/qbertclient
Last synced: 21 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/platform9/qbertclient
- Owner: platform9
- License: apache-2.0
- Created: 2019-10-02T20:31:55.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-12-10T21:58:56.000Z (about 5 years ago)
- Last Synced: 2025-09-29T09:15:12.697Z (5 months ago)
- Language: Python
- Size: 43.9 KB
- Stars: 1
- Watchers: 7
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Platform9 Qbert client
This implementation of the Qbert client is an amalgam of various implementations in Platform9's internal tooling.
At the moment the goal is to get something out as quickly as possible.
# How to install
`pip install qbertclient`
# Usage
```
from qbertclient import qbert
qb = qbert.Qbert(token, 'https:///qbert/v3/)
```
The client also exposes a simple Keystone client which allows users to get a Keystone token:
```
from qbertclient import qbert
from qbertclient import keystone
du_fqdn = "endpoint.platform9.net"
username = "username@platform9.net"
password = "hunter2"
project_name = "service"
ks = keystone.Keystone(du_fqdn, username, password, project_name)
token = ks.get_token()
project_id = ks.get_project_id(project_name)
qb = qbert.Qbert(token, "https://{}/qbert/v3/{}".format(du_fqdn, project_id))
print(qb.list_clusters())
```