commit ca5b92612e823745c2d4a8a6bbfda84b767b8edd
Author: Stavros Sachtouris <saxtouri@admin.grnet.gr>
Date:   Fri Jun 7 15:41:00 2013 +0300

    Adjust help messages to configuration changes
    
    Refs:#3934

diff --git a/kamaki/cli/commands/astakos.py b/kamaki/cli/commands/astakos.py
index bdf4cdf..5bf5528 100644
--- a/kamaki/cli/commands/astakos.py
+++ b/kamaki/cli/commands/astakos.py
@@ -72,9 +72,10 @@ class user_authenticate(_user_init, _optional_json):
     """Authenticate a user
     Get user information (e.g. unique account name) from token
     Token should be set in settings:
-    *  check if a token is set    /config get token
-    *  permanently set a token    /config set token <token>
+    *  check if a token is set    /config get remote.default.token
+    *  permanently set a token    /config set remote.default.token <token>
     Token can also be provided as a parameter
+    (In case of another named cloud remote, use its name instead of default)
     """
 
     @staticmethod
diff --git a/kamaki/cli/commands/config.py b/kamaki/cli/commands/config.py
index 925e211..225419d 100644
--- a/kamaki/cli/commands/config.py
+++ b/kamaki/cli/commands/config.py
@@ -44,12 +44,18 @@ _commands = [config_cmds]
 
 about_options = '\nAbout options:\
     \n. syntax: [group.]option\
-    \n. example: file.uuid\
+    \n. example: global.log_file\
     \n. special case: <option> is equivalent to global.<option>\
     \n. configuration file syntax:\
     \n.   [group]\
     \n.   option=value\
-    \n.   (more options can be set per group)'
+    \n.   (more options can be set per group)\
+    \n. special case: named cloud remotes.\
+    \n. E.g. for a cloud "demo":\
+    \n.   [remote "demo"]\
+    \n.   url = <http://single/authentication/url/for/demo/site>\
+    \n.   token = <auth_token_from_demo_site>\
+    \n. which are referenced as remote.demo.url , remote.demo.token'
 
 
 @command(config_cmds)
diff --git a/kamaki/cli/commands/cyclades.py b/kamaki/cli/commands/cyclades.py
index 2ee068a..48252ca 100644
--- a/kamaki/cli/commands/cyclades.py
+++ b/kamaki/cli/commands/cyclades.py
@@ -53,7 +53,7 @@ _commands = [server_cmds, flavor_cmds, network_cmds]
 
 about_authentication = '\nUser Authentication:\
     \n* to check authentication: /user authenticate\
-    \n* to set authentication token: /config set token <token>'
+    \n* to set authentication token: /config set remote.default.token <token>'
 
 howto_personality = [
     'Defines a file to be injected to VMs personality.',
diff --git a/kamaki/cli/commands/errors.py b/kamaki/cli/commands/errors.py
index fbc97a7..7d17856 100644
--- a/kamaki/cli/commands/errors.py
+++ b/kamaki/cli/commands/errors.py
@@ -38,6 +38,10 @@ from kamaki.cli.errors import CLIError, raiseCLIError, CLISyntaxError
 from kamaki.cli import _debug, kloger
 from kamaki.cli.utils import format_size
 
+CLOUDNAME = [
+    'Note: If you use a named cloud remote, use its name',
+    'instead of "default"']
+
 
 class generic(object):
 
@@ -66,8 +70,10 @@ class generic(object):
                     raiseCLIError(ce, 'Authorization failed', details=[
                         'Make sure a valid token is provided:',
                         '  to check if token is valid: /user authenticate',
-                        '  to set token: /config set [.server.]token <token>',
-                        '  to get current token: /config get [server.]token'])
+                        '  to set token:',
+                        '    /config set remote.default.token <token>',
+                        '  to get current token:',
+                        '    /config get remote.default.token'] + CLOUDNAME)
                 elif ce.status in range(-12, 200) + [302, 401, 403, 500]:
                     raiseCLIError(ce, importance=3, details=[
                         'Check if service is up'])
@@ -79,8 +85,10 @@ class generic(object):
                     msg = 'Invalid service url %s' % url
                     raiseCLIError(ce, msg, details=[
                         'Check if authentication url is correct',
-                        '  check current url:   /config get url',
-                        '  set new auth. url:   /config set url'])
+                        '  check current url:',
+                        '    /config get remote.default.url',
+                        '  set new auth. url:',
+                        '    /config set remote.default.url'] + CLOUDNAME)
                 raise
         return _raise
 
@@ -88,10 +96,10 @@ class generic(object):
 class user(object):
 
     _token_details = [
-        'To check default token: /config get token',
+        'To check default token: /config get remote.default.token',
         'If set/update a token:',
-        '*  (permanent):  /config set token <token>',
-        '*  (temporary):  re-run with <token> parameter']
+        '*  (permanent):  /config set remote.default.token <token>',
+        '*  (temporary):  re-run with <token> parameter'] + CLOUDNAME
 
     @classmethod
     def load(this, foo):
@@ -103,13 +111,16 @@ class user(object):
                 raiseCLIError(ae, 'Client setup failure', importance=3)
             if not getattr(client, 'token', False):
                 kloger.warning(
-                    'No permanent token (try: kamaki config set token <tkn>)')
+                    'No permanent token (try:'
+                    ' kamaki config set remote.default.token <tkn>)')
             if not getattr(client, 'base_url', False):
-                msg = 'Missing synnefo URL'
+                msg = 'Missing synnefo authentication URL'
                 raise CLIError(msg, importance=3, details=[
                     'Check if authentication url is correct',
-                        '  check current url:  /config get url',
-                        '  set new auth. url:  /config set url'])
+                        '  check current url:',
+                        '    /config get remote.default.url',
+                        '  set new auth. url:',
+                        '    /config set remote.default.url'] + CLOUDNAME)
             return r
         return _raise
 
@@ -401,10 +412,10 @@ class plankton(object):
 class pithos(object):
     container_howto = [
         'To specify a container:',
-        '  1. Set file.container variable (permanent)',
-        '     /config set file.container <container>',
-        '  2. --container=<container> (temporary, overrides 1)',
-        '  3. Use the container:path format (temporary, overrides all)',
+        '  1. --container=<container> (temporary, overrides all)',
+        '  2. Use the container:path format (temporary, overrides 3)',
+        '  3. Set pithos_container variable (permanent)',
+        '     /config set pithos_container <container>',
         'For a list of containers: /file list']
 
     @classmethod
@@ -435,10 +446,10 @@ class pithos(object):
                     raiseCLIError(ce, 'User quota exceeded', details=[
                         '* get quotas:',
                         '  * upper total limit:      /file quota',
-                        '  * container limit:  /file quota <container>',
-                        '* set a higher quota (if permitted):',
-                        '    /file setquota <quota>[unit] <container>'
-                        '    as long as <container quota> <= <total quota>'])
+                        '  * container limit:',
+                        '    /file containerlimit get <container>',
+                        '* set a higher container limit:',
+                        '    /file containerlimit set <limit> <container>'])
                 raise
         return _raise
 
diff --git a/kamaki/cli/commands/image.py b/kamaki/cli/commands/image.py
index fbc6772..558bbb4 100644
--- a/kamaki/cli/commands/image.py
+++ b/kamaki/cli/commands/image.py
@@ -59,7 +59,7 @@ _commands = [image_cmds]
 
 howto_image_file = [
     'Kamaki commands to:',
-    ' get current user uuid: /user authenticate',
+    ' get current user id: /user authenticate',
     ' check available containers: /file list',
     ' create a new container: /file create <container>',
     ' check container contents: /file list <container>',
@@ -153,9 +153,9 @@ def _load_image_meta(filepath):
 
 def _validate_image_location(location):
     """
-    :param location: (str) pithos://<uuid>/<container>/<img-file-path>
+    :param location: (str) pithos://<user-id>/<container>/<img-file-path>
 
-    :returns: (<uuid>, <container>, <img-file-path>)
+    :returns: (<user-id>, <container>, <img-file-path>)
 
     :raises AssertionError: if location is invalid
     """
@@ -163,7 +163,7 @@ def _validate_image_location(location):
     msg = 'Invalid prefix for location %s , try: %s' % (location, prefix)
     assert location.startswith(prefix), msg
     service, sep, rest = location.partition('://')
-    assert sep and rest, 'Location %s is missing uuid' % location
+    assert sep and rest, 'Location %s is missing user-id' % location
     uuid, sep, rest = rest.partition('/')
     assert sep and rest, 'Location %s is missing container' % location
     container, sep, img_path = rest.partition('/')
@@ -380,7 +380,7 @@ class image_register(_init_image, _optional_json):
                 'No image file location provided',
                 importance=2, details=[
                     'An image location is needed. Image location format:',
-                    '  pithos://<uuid>/<container>/<path>',
+                    '  pithos://<user-id>/<container>/<path>',
                     ' an image file at the above location must exist.'
                     ] + howto_image_file)
         try:
@@ -390,7 +390,7 @@ class image_register(_init_image, _optional_json):
                 ae, 'Invalid image location format',
                 importance=1, details=[
                     'Valid image location format:',
-                    '  pithos://<uuid>/<container>/<img-file-path>'
+                    '  pithos://<user-id>/<container>/<img-file-path>'
                     ] + howto_image_file)
 
     @errors.generic.all
diff --git a/kamaki/cli/commands/pithos.py b/kamaki/cli/commands/pithos.py
index 726cf22..3f710f6 100644
--- a/kamaki/cli/commands/pithos.py
+++ b/kamaki/cli/commands/pithos.py
@@ -1219,7 +1219,7 @@ class file_download(_file_container_command):
     If local destination is a directory:
     *   download <container>:<path> <local dir> -R
     will download all files on <container> prefixed as <path>,
-    to <local dir>/<full path>
+    to <local dir>/<full path> (or <local dir>\<full path> in windows)
     *   download <container>:<path> <local dir> --exact-match
     will download only one file, exactly matching <path>
     ATTENTION: to download cont:dir1/dir2/file there must exist objects
@@ -1733,7 +1733,7 @@ class file_metadata_get(_file_container_command, _optional_json):
         detail=FlagArgument('show detailed output', ('-l', '--details')),
         until=DateArgument('show metadata until then', '--until'),
         object_version=ValueArgument(
-            'show specific version \ (applies only for objects)',
+            'show specific version (applies only for objects)',
             ('-O', '--object-version'))
     )
 
diff --git a/kamaki/cli/commands/snf-astakos.py b/kamaki/cli/commands/snf-astakos.py
index e12917c..e2bf4dc 100644
--- a/kamaki/cli/commands/snf-astakos.py
+++ b/kamaki/cli/commands/snf-astakos.py
@@ -82,9 +82,10 @@ class astakos_authenticate(_astakos_init, _optional_json):
     """Authenticate a user
     Get user information (e.g. unique account name) from token
     Token should be set in settings:
-    *  check if a token is set    /config get token
-    *  permanently set a token    /config set token <token>
+    *  check if a token is set    /config get remote.default.token
+    *  permanently set a token    /config set remote.default.token <token>
     Token can also be provided as a parameter
+    (To use a named cloud remote, use its name instead of "default")
     """
 
     arguments = dict(
