Apache Libcloud is a standard Python library that abstracts away differences among multiple cloud provider APIs. Currently Libcloud has a big limitation, you can only use it with Python and you have to write code for each task, So a CLI for Libcloud will bring up lot of new possibilities to its users and will allow users and system administrators to perform commonly used operations (listing servers, rebooting servers etc.) easily via command line without writing a single line of code.
Command line client is not currently available on PyPi and so it can be installed using setup.py:
pip install -r requirements.txt
python setup.py install
Credentials can be set (in order of precedence) as environment variables in a configuration file or you can pass them manually to each command.
Default configuration file path is ~/.libcloudcli/config.ini
but you can overrride it by
setting the LibcloudCLI_
environment variable
Example configuration files can be found in the examples/
directory.
Note: currently only compute commands works. I am trying to add more and more commands to it.
libcloudcli <api> <resource> <action> [options]
For example:
libcloudcli compute node create --id="hello" --size=""
To specify a custom formatter, use -f
option. For example:
libcloudcli compute node destroy -f json
id="hello"
- table
- csv
- json
- yaml
- html
Running lint
tox