diff options
-rw-r--r-- | requirements.txt | 11 | ||||
-rw-r--r-- | saharaclient/api/base.py | 11 | ||||
-rw-r--r-- | saharaclient/api/shell.py | 1 | ||||
-rw-r--r-- | saharaclient/shell.py | 2 | ||||
-rw-r--r-- | test-requirements.txt | 8 | ||||
-rw-r--r-- | tox.ini | 6 |
6 files changed, 29 insertions, 10 deletions
diff --git a/requirements.txt b/requirements.txt index 6727c47..6b77d39 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,9 +1,14 @@ -Babel>=1.3 +# The order of packages is significant, because pip processes them in the order +# of appearance. Changing the order has an impact on the overall integration +# process, which may cause wedges in the gate later. + pbr>=0.6,!=0.7,<1.0 + +Babel>=1.3 netaddr>=0.7.6 oslo.i18n>=0.1.0 # Apache-2.0 -python-keystoneclient>=0.9.0 -requests>=1.1 +python-keystoneclient>=0.10.0 +requests>=1.2.1 six>=1.7.0 PrettyTable>=0.7,<0.8 argparse diff --git a/saharaclient/api/base.py b/saharaclient/api/base.py index 24be257..c2c9c36 100644 --- a/saharaclient/api/base.py +++ b/saharaclient/api/base.py @@ -18,6 +18,8 @@ import logging import six +from saharaclient.openstack.common.gettextutils import _ + LOG = logging.getLogger(__name__) @@ -130,7 +132,14 @@ class ResourceManager(object): return self.resource_class.resource_name + 's' def _raise_api_exception(self, resp): - error_data = get_json(resp) + try: + error_data = get_json(resp) + except Exception: + raise APIException( + error_code=resp.status_code, + error_message=_("Failed to parse response from Sahara. Check " + "if service catalog configured properly.")) + raise APIException(error_code=error_data.get("error_code"), error_name=error_data.get("error_name"), error_message=error_data.get("error_message")) diff --git a/saharaclient/api/shell.py b/saharaclient/api/shell.py index 2728206..2eac129 100644 --- a/saharaclient/api/shell.py +++ b/saharaclient/api/shell.py @@ -561,7 +561,6 @@ def do_job_binary_data_list(cs, args): def do_job_binary_data_create(cs, args): """Store data in the internal DB. - Store data in the internal DB. Use 'swift upload' instead of this command. Use this command only if Swift is not available. """ diff --git a/saharaclient/shell.py b/saharaclient/shell.py index f1d7c55..6d546df 100644 --- a/saharaclient/shell.py +++ b/saharaclient/shell.py @@ -719,7 +719,7 @@ class OpenStackSaharaShell(object): extension.run_hooks(hook_type, *args, **kwargs) def do_bash_completion(self, _args): - """Prints all of the commands to stdout to support bash completion. + """Prints arguments for bash-completion. Prints all of the commands and options to stdout so that the sahara.bash_completion script doesn't have to hard code them. diff --git a/test-requirements.txt b/test-requirements.txt index b626969..730675b 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,3 +1,7 @@ +# The order of packages is significant, because pip processes them in the order +# of appearance. Changing the order has an impact on the overall integration +# process, which may cause wedges in the gate later. + hacking>=0.9.2,<0.10 coverage>=3.6 mock>=1.0 @@ -5,7 +9,7 @@ discover oslosphinx testrepository>=0.0.18 sphinx>=1.1.2,!=1.2.0,<1.3 -python-swiftclient>=2.0.2 +python-swiftclient>=2.2.0 python-novaclient>=2.17.0 -python-neutronclient>=2.3.5,<3 +python-neutronclient>=2.3.6,<3 oslo.config>=1.4.0.0a3 @@ -1,5 +1,5 @@ [tox] -envlist = py26,py27,py33,pypy,pep8 +envlist = py26,py27,py33,py34,pypy,pep8 minversion = 1.6 skipsdist = True @@ -19,7 +19,7 @@ commands = python setup.py test --slowest --testr-args="{posargs}" setenv = VIRTUAL_ENV={envdir} DISCOVER_DIRECTORY=saharaclient/tests/integration/ - commands = python setup.py test --slowest --testr-args="{posargs}" +commands = python setup.py test --slowest --testr-args="{posargs}" [testenv:cover] commands = python setup.py test --coverage --testr-args='{posargs}' @@ -46,3 +46,5 @@ show-source = true builtins = _ exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,tools +[hacking] +import_exceptions = saharaclient.openstack.common.gettextutils._ |