commit a6d2ad784b1e720fc6b6f67002b422f714ed901e
Author: Stavros Sachtouris <saxtouri@admin.grnet.gr>
Date:   Thu Nov 28 15:58:05 2013 +0200

    Fix required argument inconsistency with lists

diff --git a/kamaki/cli/argument/__init__.py b/kamaki/cli/argument/__init__.py
index a496c93..14000a4 100644
--- a/kamaki/cli/argument/__init__.py
+++ b/kamaki/cli/argument/__init__.py
@@ -68,7 +68,7 @@ class Argument(object):
                     self, name)
             assert name.startswith('-'), msg
 
-        self.default = default if (default or self.arity) else False
+        self.default = default or None
 
     @property
     def value(self):
@@ -176,7 +176,7 @@ class FlagArgument(Argument):
     :value: true if set, false otherwise
     """
 
-    def __init__(self, help='', parsed_name=None, default=False):
+    def __init__(self, help='', parsed_name=None, default=None):
         super(FlagArgument, self).__init__(0, help, parsed_name, default)
 
 
@@ -322,10 +322,18 @@ class VersionArgument(FlagArgument):
 class RepeatableArgument(Argument):
     """A value argument that can be repeated"""
 
-    def __init__(self, help='', parsed_name=None, default=[]):
+    def __init__(self, help='', parsed_name=None, default=None):
         super(RepeatableArgument, self).__init__(
             -1, help, parsed_name, default)
 
+    @property
+    def value(self):
+        return getattr(self, '_value', [])
+
+    @value.setter
+    def value(self, newvalue):
+        self._value = newvalue
+
 
 class KeyValueArgument(Argument):
     """A Key=Value Argument that can be repeated
@@ -333,7 +341,7 @@ class KeyValueArgument(Argument):
     :syntax: --<arg> key1=value1 --<arg> key2=value2 ...
     """
 
-    def __init__(self, help='', parsed_name=None, default=[]):
+    def __init__(self, help='', parsed_name=None, default=None):
         super(KeyValueArgument, self).__init__(-1, help, parsed_name, default)
 
     @property
@@ -341,21 +349,23 @@ class KeyValueArgument(Argument):
         """
         :returns: (dict) {key1: val1, key2: val2, ...}
         """
-        return super(KeyValueArgument, self).value
+        return getattr(self, '_value', {})
 
     @value.setter
     def value(self, keyvalue_pairs):
         """
         :param keyvalue_pairs: (str) ['key1=val1', 'key2=val2', ...]
         """
-        self._value = getattr(self, '_value', self.value) or {}
-        try:
-            for pair in keyvalue_pairs:
-                key, sep, val = pair.partition('=')
-                assert sep, ' %s misses a "=" (usage: key1=val1 )\n' % (pair)
-                self._value[key] = val
-        except Exception as e:
-            raiseCLIError(e, 'KeyValueArgument Syntax Error')
+        if keyvalue_pairs:
+            self._value = self.value
+            try:
+                for pair in keyvalue_pairs:
+                    key, sep, val = pair.partition('=')
+                    assert sep, ' %s misses a "=" (usage: key1=val1 )\n' % (
+                        pair)
+                    self._value[key] = val
+            except Exception as e:
+                raiseCLIError(e, 'KeyValueArgument Syntax Error')
 
 
 class ProgressBarArgument(FlagArgument):
@@ -484,11 +494,11 @@ class ArgumentParseManager(object):
     @staticmethod
     def required2str(required, arguments, tab=''):
         if isinstance(required, list):
-            return ' %sat least one:\n%s' % (tab, ''.join(
+            return ' %sat least one of the following:\n%s' % (tab, ''.join(
                 [ArgumentParseManager.required2str(
                     r, arguments, tab + '  ') for r in required]))
         elif isinstance(required, tuple):
-            return ' %sall:\n%s' % (tab, ''.join(
+            return ' %sall of the following:\n%s' % (tab, ''.join(
                 [ArgumentParseManager.required2str(
                     r, arguments, tab + '  ') for r in required]))
         else:
diff --git a/kamaki/cli/commands/pithos.py b/kamaki/cli/commands/pithos.py
index 60c00a3..1c76c2e 100644
--- a/kamaki/cli/commands/pithos.py
+++ b/kamaki/cli/commands/pithos.py
@@ -818,7 +818,6 @@ class file_upload(_pithos_container, _optional_output_cmd):
             'Use * for all users',
             '--write-permission'),
         public=FlagArgument('make object publicly accessible', '--public'),
-        max_threads=IntArgument('set max threads (default 5)', '--threads'),
         progress_bar=ProgressBarArgument(
             'do not show progress bar',
             ('-N', '--no-progress-bar'),
diff --git a/kamaki/clients/network/__init__.py b/kamaki/clients/network/__init__.py
index b94205b..68dc370 100644
--- a/kamaki/clients/network/__init__.py
+++ b/kamaki/clients/network/__init__.py
@@ -357,7 +357,7 @@ class NetworkClient(NetworkRestClient):
             floatingip['fixed_ip_address'] = fixed_ip_address
         r = self.floatingips_put(
             floatingip_id, json_data=dict(floatingip=floatingip), success=200)
-        return r['floatingip']
+        return r.json['floatingip']
 
     def delete_floatingip(self, floatingip_id):
         r = self.floatingips_delete(floatingip_id, success=204)
