A command line tool to talk with RHV environment
Project description
Install our code
pip install titan-rhv
pycurl (which is one of the dependencies) is not easy to install for both MacOS and Linux. Use google :)
Create a titanrc to load the environment variables. You can appened the content in your ~/.bash_profile (MacOS) or ~/.bashrc (Linux)
export TITAN_URL='https://lab-rhevm.microsoft.rdu.com/ovirt-engine/api' export TITAN_USERNAME='adminuser@your_domain' export TITAN_PASSWORD='password' export TITAN_CA_FILE='ca.pem' export TITAN_VM_PREFIX='your_user' export TITAN_DEFAULT_TEMPLATE='your_preferred_template'
Download ca.pem. Save the ca.pem to your preferred path and set TITAN_CA_FILE correctly. For example, export TITAN_CA_FILE=‘/root/ca.pem’
$ wget '<Your RHV URL>/ovirt-engine/services/pki-resource?resource=ca-certificate&format=X509-PEM-CA' --no-check-certificate $ mv pki-resource\?resource\=ca-certificate\&format\=X509-PEM-CA ca.pem
Some examples
$ titan -h
usage: titan [-h] {start,test,stop,show,delete,list,boot,console} ...
positional arguments:
{start,test,stop,show,delete,list,boot,console}
optional arguments:
-h, --help show this help message and exit
# To list the VMs which filters by TITAN_VM_PREFIX environment variable
$ titan list
+--------------------------------------+--------------------------+--------+----------------+-----------------------------+
| ID | Name | Status | Networks | Comment |
+--------------------------------------+--------------------------+--------+----------------+-----------------------------+
| cd8212b3-f208-40b0-8f31-4140d57eac9b | cchen-7u4 | DOWN | | DNS server for all gss user |
| 89c9976f-fe53-49b4-b1fd-1e7a4b86a0e1 | cchen-7u5-template | DOWN | | |
| 7f4ef4f8-1641-4145-8812-234dcec478e0 | cchen-desktop | UP | 10.72.37.242 | |
+--------------------------------------+--------------------------+--------+----------------+-----------------------------+
$ titan show cchen-desktop
+-------------+---------------------------------------------------------------------------------------+
| Item | Value |
+-------------+---------------------------------------------------------------------------------------+
| Name | cchen-desktop |
| ID | 7f4ef4f8-1641-4145-8812-234dcec478e0 |
| Memory | 8192M |
| CPU | 4 |
| Disks | ['cchen-7u5-template_Disk1', 'ee9e366f-6930-4ab2-9eb7-095e4c22b0c7', '40G'] |
| Active Nics | ['nic1', '00:1a:4a:16:02:41', 'bcda0f88-eae7-4234-a897-5dafecc5856b', '10.72.37.242'] |
+-------------+---------------------------------------------------------------------------------------+
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
titan-rhv-0.15.tar.gz
(9.0 kB
view details)
File details
Details for the file titan-rhv-0.15.tar.gz.
File metadata
- Download URL: titan-rhv-0.15.tar.gz
- Upload date:
- Size: 9.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.19.1 setuptools/18.5 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/2.7.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f75616bb4803171ed6fd5dbdb3496f327e19f2460d54191bd9ef0a0d5c8df9d4
|
|
| MD5 |
60a001365fd61a0c7db85e5c064277e3
|
|
| BLAKE2b-256 |
9ea6bac0a6b77776326c740fa9a4fa82033958bcc2f7e253ac0ad7ce8e0d8d21
|