Contribute to the vss-cli

First time setup

  1. Download and install the Latest version of git.

  2. Configure git with your username and email matching your GitLab account:

git config --global user.name 'your name' git config --global user.email 'your email'
  1. Fork the vss-cli repository by clicking the Fork button.

  2. Clone your fork locally:

git clone git@gitlab-ee.eis.utoronto.ca:{username}/vss-cli.git cd vss-cli
  1. Add the main repository as a remote to update later:

git remote add vss git@gitlab-ee.eis.utoronto.ca:vss/vss-cli.git git fetch vss
  1. Create virtual environment:

Start Coding

1. Create a branch to identify the issue you would like to work on (e.g. issue-999):

  1. Using your favorite editor, make your changes, committing as you go.

  2. Follow PEP8.

  1. Push your commits to GitLab and create a merge request.

  1. Celebrate 🎉

Build docs

  1. Install requirements:

  1. Build the html and man pages with distutils:

  1. Or to the docs folder and run make to start the build:

In any case, the resulting files are located in docs/_build.

Developing Plugins

Plugin developers need to register their sub-commands or sub-groups to either of the following entry-points in their setup.py that is loaded by the vss-cli core package:

  • vss_cli.contrib.plugins: scope at vss-cli plugins command group.

  • vss_cli.contrib.compute: scope at vss-cli compute command group.

  • vss_cli.contrib.compute.vm: scope at vss-cli compute vm command group.

For example, if someone wanted to make a plugin package called new_plugin which adds a sub-command at vss-cli compute report and another one at vss-cli compute vm report, they would create their custom python package with the vss-cli as a dependency, and add the following to their package’s setuptools entry-points in setup.py:

Now, the plugin package new_plugin contains __init__.py and core.py:

After installing the plugin, the vss-cli will load the plugin in the defined scope:

University of Toronto - Since 1827