Overview
Client library for JCS
Installation
Installation from source
git clone https://github.com/jiocloudservices/jcsclient.git cd jcsclient sudo pip install -r requirements.txt # Can use virtual environment too sudo python setup.py develop
Installation as a pip package
pip install -e git+https://github.com/jiocloudservices/jcsclient.git#egg=jcsclient
Configuration
Copy openrc.sample to create openrc file, put your actual credentials in this file and then source this file Edit the src/client/config.py to include your credentials.
cp openrc.sample openrc # Update openrc now, and add your access/secret keys source openrc
If you are from your local machine, you might need to add entries to /etc/hosts file to map an IP to the endpoint. No need to do the same if you are using this library from a staging machien.
NOTE: Never ever commit your access and secret keys and push to a public repository. You have been warned.
CLI
You can use CLI to make an API request, or just get the input which you can use with 'curl' command.
$ jcs compute describe-instances
First argument is service name (one of 'compute', 'vpc', 'dss', 'iam' and 'rds'). To get help on a service, execute:
jcs <service> --help
To get helptext for a particular command, execute:
jcs <service> <command> --help