Julien Vey b74ea2e4f8 Add rally use command
This adds a new group of commands : 'rally use'
the first implemented is 'rally use deployment <deploy_id>'

As it is not possible in python to export globaly an env var,it saves the
variable in a file at ~/.rally/deployment like :
RALLY_DEPLOYMENT=1234abcd

For each command that takes a deploy_id as parameter, this
parameter is now optional.

The algorithm to find the deploy_id is as follows :
- If the --deploy-id param is set, use it
- If the environ contains the key 'RALLY_DEPLOYMENT', use it
- load the content of ~/.rally/deployment and if it contains the key
RALLY_DEPLOYMENT, use it
- Else, raise an InvalidArgumentException

Note that I have not been able to use the default arg in @cliutils.args
because it is called before the effective method call. Setting
deploy_id=envutils.default_deployment_id() has the same problem

Partially implements blueprint: rally-use-command

Change-Id: I1e62e26d259bd9e81f1c008058ee9ce91cc3290c
2014-01-23 22:14:01 +01:00
..
2013-09-05 10:50:16 +04:00
2014-01-23 22:14:01 +01:00
2014-01-23 22:14:01 +01:00
2014-01-06 16:24:00 +00:00