Manage resources in the vmpooler service from the command-line.
Project description
To get help on the command-line for the script use the command:
vmpooler_client_app.py -h
Quickstart
# Create a token (only on first run) $ ./vmpooler_client_app.py token create Please provide LDAP credentials for the VM pooler Username: bob.smith Password: Token: <token> # List available templates $ ./vmpooler_client_app.py vm list redhat redhat-4-x86_64 redhat-5-i386 redhat-5-x86_64 redhat-6-i386 redhat-6-x86_64 redhat-7-x86_64 # Grab a VM $ ./vmpooler_client_app.py vm get redhat-6-x86_64 Hostname: h2qbe7c29ix2w1r # Login and do work $ ssh root@h2qbe7c29ix2w1r # Logout # Give vm back to the pool $ ./vmpooler_client_app.py vm destroy h2qbe7c29ix2w1r
Examples
vmpooler_client_app.py is separated into a few subcommands:
vmpooler_client_app.py * vm * list * get * destroy * destroy_all * info * running * lifetime * get * extend * set * token * create * validate * revoke * config * get * set * list * unset
Help is available for each subcommand by appending -h to the command:
vmpooler_client_app.py lifetime set -h
List vmpooler templates
This will list all the available templates.
Usage
vmpooler_client_app.py vm list
Filter the list vmpooler templates
Filter available templates via a fuzzy matching pattern.
Usage
vmpooler_client_app.py vm list PATTERN
Example
vmpooler_client_app.py vm list win
Get a VM from the vmpooler
Usage
vmpooler_client_app.py vm get TEMPLATE_NAME
Example
vmpooler_client_app.py vm get ubuntu-1404-x86_64
List all of your running VMs
This gives you a concise list of what VMs you have running
Usage
vmpooler_client_app.py vm running
Example Output
l2l7jdlpt6xlptq | Running: 4.27 hours | centos-6-i386 etcgjzxks2vtw9t | Running: 0.15 hours | centos-5-i386
Hand a VM back to the vmpooler for destruction
Usage
vmpooler_client_app.py vm destroy VM_NAME
Example
vmpooler_client_app.py vm destroy skj3k4hahdk
Hand all active VMs back to the vmpooler for destruction
Be careful, this will destroy every active VM associate with your token
Usage
vmpooler_client_app.py vm destroy_all
Example Output
Destroying etcgjzxks2vtw9t Destroying l2l7jdlpt6xlptq
Get the time to live for a VM in the vmpooler
Usage
vmpooler_client_app.py lifetime get VM_NAME
Example
vmpooler_client_app.py lifetime get skj3k4hahdk
Extend the time to live for a VM in the vmpooler
This command will add a certain number of hours to the lifetime of a VM Usage
vmpooler_client_app.py lifetime extend VM_NAME LIFETIME
Example
vmpooler_client_app.py lifetime extend skj3k4hahdk 2 > Lifetime extended to 10 hours
Set the total time to live for a VM in the vmpooler to a certain number of hours
This command will overwrite the time to live for a VM
Usage
vmpooler_client_app.py lifetime set VM_NAME LIFETIME
Example
vmpooler_client_app.py lifetime set skj3k4hahdk 24
Get information on a VM in the vmpooler
This will work on running and destroyed VMs in the vmpooler.
Usage
vmpooler_client_app.py vm info VM_NAME
Example
vmpooler_client_app.py vm info skj3k4hahdk
Read a config setting
Usage
vmpooler_client_app.py config get SETTING_NAME
Example
vmpooler_client_app.py config get username
Modify/create a config setting
Modify an existing setting or create add a new setting if it doesn’t exist yet.
Usage
vmpooler_client_app.py config set SETTING_NAME VALUE
Examples
vmpooler_client_app.py config set username bob.smith vmpooler_client_app.py config set a_new_setting some_value
Remove a config setting
Usage
vmpooler_client_app.py config unset SETTING_NAME
Example
vmpooler_client_app.py config unset auth_token
List all config settings
vmpooler_client_app.py config list
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 Distributions
Built Distribution
Hashes for vmpooler_client-3.1.0-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9da161f316f5447d075b13a5c38946419527b11c2e574858233fc68ce5875890 |
|
MD5 | c9443c512633349f3f10301deb0d07f4 |
|
BLAKE2b-256 | 33d45f70916c841a69dfcf1c4af14a4c29cfe13044278a223bf99cb02b2219e9 |