10 Commits

Author SHA1 Message Date
Rohit Yadav
19a290500e cli: Import project info from config in setup.py, fix debug msgs
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>

lsdfjk

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-03-19 16:05:11 +05:30
Rohit Yadav
0720d25e12 cli: Get rid of clint, use Pygments
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-28 17:51:34 -08:00
Rohit Yadav
afb7e289fe cli: Fix development status to stable. cloudmonkey v1 at its most stable form
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-23 18:15:51 -08:00
Rohit Yadav
13944a0e5e cli: Cosmetic fixes for cloudmonkey and setup.py dependency version fix
- Fixes shell class name to CloudMonkey
- Fixes prettyprint version req. to 0.6

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-20 16:34:36 -08:00
Rohit Yadav
8f51c630bd CLOUDSTACK-545: Tabularize cloudmonkey's response using filter=<fields,> argument
- Adds new cloudmonkey config field, tabularize
- If tabularize is set to true, all the list of dict in response are printed as
  table
- The columns of the tables can be filtered using the filter= argument, for ex:
  list domains listall=true filter=id,name,path
- filter arg will take comma separated values, if they have space put them under
  quotes
- Empty filter argument will cause it to print the whole table
- Multiple fields with the same name will cause it to print the column again
- In case there is a typo in the field, that column is skipped. It takes an
  intersection of response dict keys and filter keys provided
- Uses opensource prettytable library to pretty print tabular data

TODOs:
- Handle recursive table printing for nested list of dicts
- Colorize table columns if community wants such a feature

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-20 16:33:08 -08:00
Rohit Yadav
3b2e715888 cli: string fixes, use the major,minor version numbers same as CloudStack
<cloudstack major>.<cloudstack minor>.<cloudmonkey increment number>

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-11-20 14:56:34 +05:30
Rohit Yadav
36e7a7884e cli: fix autocompletion binding bug, make all params lowercase
- fix weird autocompletion bug which won't let you enter the letter b [0]
- make set params, api and secret key vars lowercase
- use partition to get strings for do_set
- while installing, check and only then add readline (requires gcc and can fail)
- show monkey prompt by default, let users change if needed

[0] http://superuser.com/questions/297527/cant-type-the-b-letter-in-python-shell-in-os-x

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-11-06 19:41:07 +05:30
Rohit Yadav
77e957c91b cli: fix python sdist, add readline as installation requirement
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-11-06 17:06:11 +05:30
Rohit Yadav
b713865308 cli: pip install cloudmonkey works
Patch makes cloudmonkey installable and redistributable using source dist from
pypi under apache compliant license. Most visible issues have been solved and
cloudmonkey should work well with CloudStack 4.0 and master, also until APIs do
not change.

To install now:
    pip install cloudmonkey

or, if you have to:
    easy_install cloudmonkey

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-11-06 16:07:42 +05:30
Rohit Yadav
b38cf801ac cli: setup.py for cloudmonkey
Version are named in reflection of CloudStack.
<cli major-version>.<cloudstack minor>.<cloudstack.major>
So, for CloudStack 4.1.0, version for cli should be 0.1.4

To create distribution:
  python setup.py sdist
  python setup.py install

Using pip:
  pip install dist/cloudmonkey*

Or pretty soon, from cheese shop:
  pip install cloudmonkey

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-10-31 23:19:21 +05:30