EIS Virtual Cloud Command Line Interface
Project description
This package provides a unified command line interface to the EIS Virtual Cloud.
Installation
The easiest way to install vss-cli is to use pip:
$ pip install vsscli
or, if you are not installing in a virtualenv:
$ sudo pip install vsscli
If you have the vss-cli installed and want to upgrade to the latest version you can run:
$ pip install --upgrade vsscli
This will install the vss-cli package as well as all dependencies. You can also just download the tarball. Once you have the vsscli directory structure on your workstation, you can just run:
$ cd <path_to_vsscli> $ python setup.py install
CLI Releases
The release notes for the VSS CLI can be found here. You can also find a CHANGELOG in the gitlab repo.
Getting Started
Before using vss-cli, you need to tell it about your VSS credentials. You can do this in a couple of ways:
Environment variables
Config file
The quickest way to get started is to run the vss configure command:
$ vss configure vss configure Username []: foo Password: Repeat for confirmation:
To use environment variables, set VSS_API_USER and VSS_API_USER_PASS or VSS_API_TOKEN:
$ export VSS_API_USER=<vss_user> $ export VSS_API_USER_PASS=<vss_user_pass> # or $ export VSS_API_TOKEN=<vss_api_token>
To use a config file, create a configuration as follows:
{ "https://vss-api.eis.utoronto.ca": { "auth": "<encoded_creds>", "token": "<access_token" } }
and place it in ~/.vss/config.json (or in %UserProfile%\.vss\config.json on Windows). If you place the config file in a different location than ~/.vss/config.json you need to inform vss-cli the full path. Do this by setting the appropriate environment variable:
$ export VSS_CONFIG_FILE=/path/to/config_file.json
or use the -c/--config option in the vss command as follows:
$ vss -c ~/.secret/vss-config.json
By default vss-cli output is text, and this can be configured either by -o/--output option or the VSS_DEFAULT_OUTPUT environment variable as follows:
$ export VSS_DEFAULT_OUTPUT=json #or $ export VSS_DEFAULT_OUTPUT=text
JSON Parameter Input
VSS CLI options vary from simple string, boolean or numeric values to JSON data structures as input parameters on the command line.
For example, consider the following command to deploy a new virtual machine from a given template and provide a guest operating system specification to reconfigure hostname, domain, dns, ip, subnet and gateway:
$ vss compute vm mk from-template --source $TEMPLATE_UUID \ --description 'New virtual machine' \ --custom-spec '{"dhcp": false, "ip": "192.168.1.23", "gateway": ["192.168.1.1"], "dns": ["192.168.1.1"], "hostname": "vm1", "domain": "utoronto.ca"}'
Where $TEMPLATE_UUID is an environment variable storing the UUID of the source template.
Getting Help
We use GitLab issues for tracking bugs, enhancements and feature requests. If it turns out that you may have found a bug, please open an issue
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.