Package: vss-cli
ITS Private Cloud Command Line Interfacevss-cliThe ITS Private Cloud Command-Line Interfacevss-clisimplifies the interaction with the
[ITS Private Cloud API][ITS Private Cloud API] to manage your virtual machines and other services.DocumentationPackage documentation is now available atdocs.InstallationWindows users, follow the installation instructions [Installing Python on Windows][Installing Python on Windows] and
add%USERPROFILE%\AppData\Roaming\Python\Python37\ScriptstoPATHenvironment variable prior runningpip.PIPThe fastest way to install VSS CLI is to usepip:pipinstallvss-cliIf you are planning to interact withvskey-storexecute the following commandpipinstall'vss-cli[stor]'The command will installminiopackage from PyPI.Windows users, please installwindows-cursesandvss-clias follows:pip install --user vss-cli windows-curses.If you have the VSS CLI installed and want to upgrade to the latest version
you can run:pipinstall--upgradevss-cliHomebrewUseHomebrewto install thevss-clion macOS:brewtapvss/vss-clihttps://github.com/EIS-ITS/vss-cli
brewinstallvss-cliUsing Homebrew will automatically setup autocompletion based on your current shell.From SourceYou can also justdownload the tarball.
Once you have thevss-clidirectory structure on your workstation, you can just run:cdpath_to_vss-cli
pythonsetup.pyinstallDockerIf you do not have a Python setup you can try usingvss-clivia a container using Docker.dockerrunuofteis/vss-clidocker-vss-cliis a helpful script to run thevss-cliwithin a
docker container. Just download or move the file and update the environment variables if required,
give execution permission and move it to your$PATH:# U of Tcurlhttps://gitlab-ee.eis.utoronto.ca/vss/vss-cli/raw/main/docker/docker-vss-cli>vss-cli
chmod+xvss-cli# Publiccurlhttps://raw.githubusercontent.com/EIS-ITS/vss-cli/main/docker/docker-vss-cli>vss-cli
chmod+xvss-cliCLI ReleasesThe release notes for the VSS CLI can be foundCHANGELOGin the gitlab repo.Getting StartedBefore using VSS CLI, you need setup your VSS credentials. You can do this in a couple of ways:Configuration fileEnvironment variablesCommand Line InputThe quickest way to get started is to run thevss-cli configure mkcommand:vss-cliconfiguremk

Endpoint[https://cloud-api.eis.utoronto.ca]:Username:jm
Password:Repeatforconfirmation:To use environment variables, setVSS_USERandVSS_USER_PASSorVSS_TOKEN:exportVSS_USER=USERexportVSS_USER_PASS=superstrongpassword# orexportVSS_TOKEN=JWT_TOKENFor detailed information about thevss-cliconfiguration, please refer to theofficial documentation site.JSON/YAML Parameter InputVSS CLI options vary from simple string, boolean, numeric values,
JSON data structures and file in both JSON and YAML
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:vsscomputevmmkfrom-template--sourceVM-Template\--description'New virtual machine'\--custom-spec'{"hostname": "fe1", "domain": "eis.utoronto.ca", "interfaces": [{"dhcp": true}]}'However, if a file is provided instead with a JSON or YAML structure,
the CLI will take it as valid such asnew-vm-custom-spec.jsonornew-vm-custom-spec.yamlshown below:{"hostname":"fe1","domain":"eis.utoronto.ca","interfaces":[{"dhcp":true}]}orhostname:fe1domain:eis.utoronto.cainterfaces:-dhcp:truevsscomputevmmkfrom-template--sourceVM-Template\--description'New virtual machine'\--custom-specnew-vm-custom-spec.jsonAuto-completionBash completion support is provided byClickand will complete
sub commands and parameters. Sub commands are always listed whereas parameters
only if at least a dash has been provided. Example:vss-clicompute<TAB><TAB>
accountcomputeconfigurerequeststortoken

vss-cli-<TAB><TAB>
--config--no-verbose--output--verbose--version-c-oActivatingbashorzshcompletion can be done by executing the following commands:Forbash:source<(vss-clicompletionbash)Forzsh:source<(vss-clicompletionzsh)Forfish_VSS_CLI_COMPLETE=fish_sourcevss-cli>~/.config/fish/completions/vss-cli-complete.fishIf you do it from your.bashrcor.zshrcit is recommended to use the following method
since avoids triggering a run of vss-cli itself.Forbash:eval"$(_VSS_CLI_COMPLETE=bash_sourcevss-cli)"Forzsh:eval"$(_VSS_CLI_COMPLETE=zsh_sourcevss-cli)"Forfish:eval(env_VSS_CLI_COMPLETE=fish_sourcevss-cli)VSS ShellThe VSS CLI provides a REPL interactive shell with tab-completion, suggestions and
command history.Usage:vssshell[OPTIONS]REPLinteractiveshell.

Options:-i,--historyTEXTFilepathtosavehistory--helpShowthismessageandexit.To enter the shell just execute vss shell and you will get the following welcome message:__________\ \//__/__|APIEndpoint:https://cloud-api.eis.utoronto.ca/v2\V/\__\__\Tab-completion&suggestions\_/|___/___/Prefixexternalcommandswith"!"CLIv20xx.0.0Historyissaved:/Users/user/.vss-cli/historyExitshellwith:exit,:q,:quit,ctrl+d

vss(cloud-api)>Getting HelpWe use GitLab issues for tracking bugs, enhancements and feature requests.
If it turns out that you may have found a bug, pleaseopen a new issue.vss-cli--help
Usage:vss-cli[OPTIONS]COMMAND[ARGS]...CommandlineinterfacefortheITSPrivateCloud.

Options:-e,--endpointTEXTTheCloudAPIendpointURL-c,--configTEXTConfigurationfile-t,--tokenTEXTTheBearertokenfortheVSSAPI.-u,--usernameTEXTTheAPIusernameforVSSAPI.-p,--passwordTEXTTheAPIpasswordforVSSAPI.--totpTEXTTimedOneTimePassword.--timeoutINTEGERTimeoutfornetworkoperations.-l,--loglevelLVLEitherCRITICAL,ERROR,WARNING,INFOorDEBUG-v,--verboseEnablesverbosemode.--debugEnablesdebugmode.-xPrintbacktraceswhenexceptionoccurs.-o,--output[json|yaml|table|auto|ndjson]Outputformat(default:auto).--table-formatTEXTWhichtableformattouse(default:simple)--columnsTEXTCustomcolumnskey=valuelist.Example:VM=moref,PROVISIONED=storage.provisionedGB--columns-widthINTEGERTruncatescolumnvalues(0:auto,-1:disable).--wait/--no-waitwaitforrequest(s)tocomplete-n,--no-headersWhenprintingtablesdon'tuseheaders(default:printheaders)-s,--sort-byTEXTSorttablebythejsonpathexpression.Example:updated_on-w,--s3-serverTEXTTheWebdavserver.--versionShowtheversionandexit.--helpShowthismessageandexit.

Commands:accountManageyourVSSaccountcompletionOutputshellcompletioncodeforthespecifiedshell(bashorzshorfish).computeManageVMs,networks,folders,etc.configureConfigureVSS-CLIoptions.keyManageyourSSHPublicKeys.messageManageVSSMessages.miscMiscellaneousutilities.ovfOVFToolpluginsExternalplugins.rawMakearawcalltotheAPIrequestManagevariousrequestsserviceITSServicecatalog.shellREPLinteractiveshell.statusCheckITSPrivateCloudStatus.storManageyourVSSstorageaccount.tokenManageaccesstokensupgradeUpgradeVSSCLIanddependencies.VersioningThevss-cliversions are tagged based onCalendar Versioning. Versions available in thetags sectionorPyPI package section.ContributingRefer to theContributing GuideandContributorsfor details on our code
of conduct and the process of submitting code to the repository.Changelog 📝Refer to theChangelogfor details.