- 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>
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>
Use partition instead of splitting on whitespace. This is little robust, but
may still fail for parameters whose values have whitespaces such as names etc.
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
- autocompletions for help docs
- more verbose doc strings with __doc__ import from the module and list of
required args and all args
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
cached verb dictionary stores the following as a list:
- name of the API
- params (list of args)
- docstring
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
Search verb in apis takes more time than filtering out apis that start with
that verb from the grammar.
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
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>
cloudmonkey
-----------
Apache CloudStack's very own monkey powered command line interface based on Marvin.
The neglected robot and monkey should rule the world!
Features:
- it's a shell and also a terminal tool
- scalable to find and run old and new APIs
- intuitive grammar and verbs
- autocompletion (functional hack)
- shell execution using ! or shell
- cfg support: user defined variables, like prompt, ruler, host, port etc.
- history
- colors
- dynamic API loading and rule generation
- leverages Marvin to get latest autogenerated APIs
- emacs like shortcuts on prompt
- uses apiKey and secretKey to interact with mgmt server
- logs all client commands
- PEP-8 compliant code
TODOs:
- Reverse search
- Fix input and output processing
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
Detail: Integration tests use these libraries (base,utils,common) for
simplifying the usage of the API. These define the verbs of each
entity's usage (create, delete, add etc). For the CLI to present the
simplified API we'll leverage the integration libraries.
+ Fixes to setup-test-data.sh - kvm and xen each use a different version
of the built-in Cent OS template, 5.5 and 5.3 namely.
At a later point the setup-test-data script needs to be obsoleted.
ostypeids in tests should directly be determined from listOsTypes API
calls
Signed-off-by: Prasanna Santhanam <tsp@apache.org> 1351520707 +0530
- Fix the default builtin template url. The previous url is not reachable by
public network.
- Remove INSERT statement which already gets inserted in cloud.configuration
by mvn -P developer -Ddeploydb
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
Detail: Create tarball of apidocs for distribution from jenkins
% mvn -Pdeveloper package
Signed-off-by: Prasanna Santhanam <tsp@apache.org> 1351321002 +0530
It seems that all the work is going into the installation guide instead
of the "-all" docs.
With this commit we build the installation guide documentation.
Detail: mysql-connector-python developed by Oracle will replace the MIT
licensed pymysql. mysql-connector-python is developed by Oracle and is
more favourable, faster and actively developed.
With this commit - the dbConnection object is also auto managed by
contextlib. Each transaction requests its own connection rather than
sharing one single connection for all the test runs.
BUG-ID : None
Reviewed-by: timeit comparison of pymysql and mysql-connector-python
Reported-by: dbExceptions and timeouts from Marvin test runs
Signed-off-by: Prasanna Santhanam <tsp@apache.org> 1350732083 +0530
Detail:
Sometimes tests need ssh access to the management server to perform
verification such as:
1. Pings from mgmt_server to agents
2. snapshots exist on secondary storage - mountable from mgmt server
For these the tests will need access to the config of the deployment and
the ip address of the mgmt server.
Egs: integration/component/test_egress.py and integration/component/test_snapshots.py
BUG-ID : CLOUDSTACK-377
Reported-by: Prasanna Santhanam
Signed-off-by: Prasanna Santhanam <tsp@apache.org> 1350624903 +0530
Detail: prepare-commit-msg now is skipped if -m flag is supplied, if user has
a template defined, if commit is a squash or a merge.
BUG-ID : none
Reviewed-by: Marcus Sorensen <marcus@betterservers.com>
Reported-by: Marcus Sorensen <marcus@betterservers.com>
Signed-off-by: Marcus Sorensen <marcus@betterservers.com> 1350600822 -0600
Detail: CloudStack committers can optionally use this file to prepopulate their
commits with a standard form. The idea was that it would help us get better
commit messages. It is set up locally up by running the following from the root
of the repo:
'ln -s ../../tools/git/prepare-commit-msg .git/hooks/prepare-commit-msg'
Additionally, a different prepare-commit-msg could potentially be committed for
each branch and the link will always point to the one that's checked out.
BUG-ID : none
Reviewed-by: Marcus Sorensen <marcus@betterservers.com>
Reported-by: Rohit Yadav <rohit.yadav@citrix.com>
Signed-off-by: Marcus Sorensen <marcus@betterservers.com> 1350596087 -0600
This is due to the nature of ASF release votes,
and the desire to see each individual artifact be tested.
Signed-off-by: Chip Childers <chip.childers@gmail.com>
There are various READMEs under Cloudstack. This makes it confusing for
finding the purpose of each directory and tool within the project. All
the necessary information can now be found in the top-level README.tools
that is markdown editable. For the most updated information however it
is best to provide a wiki link to the tool you have added. Each tool
lies in a seperate section, please keep formatting unchanged.