From 763e7b82a8d2df34f9688fd36e44d80607a5d6bc Mon Sep 17 00:00:00 2001 From: Stavros Sachtouris Date: Wed, 12 Jun 2013 16:55:20 +0300 Subject: [PATCH] Use the default_cloud global option Refs: #3934 #3979 Conflicts: kamaki/cli/__init__.py --- kamaki/cli/__init__.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/kamaki/cli/__init__.py b/kamaki/cli/__init__.py index 955a491..f29ca39 100644 --- a/kamaki/cli/__init__.py +++ b/kamaki/cli/__init__.py @@ -255,13 +255,10 @@ def _init_session(arguments, is_non_API=False): cloud = _cnf.value.keys('cloud')[0] else: raise CLIError( - 'Found %s clouds but none of them is set as default' % ( - num_of_clouds), + 'Found %s clouds but none of them is set as default', importance=2, details=[ 'Please, choose one of the following cloud names:', ', '.join(_cnf.value.keys('cloud')), - 'To see all cloud settings:', - ' kamaki config get cloud.', 'To set a default cloud:', ' kamaki config set default_cloud ', 'To pick a cloud for the current session, use --cloud:', @@ -285,8 +282,7 @@ def _init_session(arguments, is_non_API=False): 'No authentication %s provided for cloud "%s"' % (term, cloud), importance=3, details=[ 'Set a %s for cloud %s:' % (term, cloud), - ' kamaki config set cloud.%s.%s <%s>' % ( - cloud, term, term)]) + ' kamaki config set cloud.%s.%s ' % (cloud, term)]) from kamaki.clients.astakos import AstakosClient as AuthCachedClient try: -- 1.7.10.4