Indigo Command Line Interface

Presentation

The Indigo Command Line Interface is a client project written in Python that can be installed on any machine. It accesses an Indigo cluster through its RESTful APIs (CDMI and Admin interface).

Installation

Create And Activate A Virtual Environment

$ virtualenv ~/ve/indigo/cli-1.2
...
$ source ~/ve/indigo/cli-1.2/bin/activate

Clone the indigo-cli project

$ git clone https://github.com/Indigo-Uliv/indigo-cli.git
$ cd indigo-cli

Install Dependencies

$ pip install -r requirements.txt

Install Indigo Client

$ pip install -e .

Detailed OSX install commands

$ sudo easy_install virtualenv      # virtualenv installs pip
$ python -m virtualenv ~/ve/indigoclient-1.2
$ source ~/ve/indigoclient-1.2/bin/activate
$ pip install -r requirements.txt
$ pip install -e .

Usage

Don’t forget to activate the virtual environment which has been created during install. It will provide the indigo command.

$ source ~/ve/indigo/cli-1.2/bin/activate

Commands

Connection

$ indigo init --url=http://indigo.example.com
$ indigo init --url=http://indigo.example.com --username=USER [--password=PASS]
$ indigo exit
$ indigo whoami

Manage Collections and Data Objects

$ indigo pwd
$ indigo ls <path>
$ indigo ls -a <path>
$ indigo cd <path>
$ indigo cd ..
$ indigo mkdir <path>
$ indigo put <src> [<dst>]
$ indigo put --ref <url> <dest>
$ indigo put --mimetype="text/plain" <src>
$ indigo get [--force] <src> [<dst>]
$ indigo cdmi <path>
$ indigo rm <src>
$ indigo chmod <path> (read|write|null) <group>

Manage Metadata

$ indigo meta set <path> "org.dublincore.creator" "S M Body"
$ indigo meta set . "org.dublincore.title" "My Collection"
$ indigo meta add <path> "org.dublincore.creator" "A N Other"

$ List metadata values for all fields

$ indigo meta ls <path>
$ indigo meta ls <path> org.dublincore.creator
$ indigo meta rm <path> "org.dublincore.creator"
$ indigo meta rm <path> "org.dublincore.creator" "A N Other"

Manage Users and Groups

$ iadmin mkuser <username>
$ iadmin lu
$ iadmin lu <username>
$ iadmin moduser <username> (email | administrator | active | password) [<value>]

For instance to change the email of the user user10

$ iadmin moduser user10 email user10@indigo.com
$ iadmin rmuser <username>
$ iadmin mkgroup <groupname>
$ iadmin lg
$ iadmin lg <groupname>
$ iadmin atg <groupname> <userlist> ...
$ iadmin rfg <groupname> <userlist> ...
$ iadmin rmgroup <groupname>