Revision 03d661d8 kamaki/cli/commands/pithos_cli.py
b/kamaki/cli/commands/pithos_cli.py | ||
---|---|---|
36 | 36 |
from kamaki.cli.errors import CLIError, raiseCLIError |
37 | 37 |
from kamaki.cli.utils import format_size, print_dict, pretty_keys |
38 | 38 |
from kamaki.cli.argument import FlagArgument, ValueArgument, IntArgument |
39 |
from kamaki.cli.argument import KeyValueArgument |
|
39 | 40 |
from kamaki.cli.argument import ProgressBarArgument |
40 | 41 |
from kamaki.cli.commands import _command_init |
41 | 42 |
from kamaki.clients.pithos import PithosClient, ClientError |
... | ... | |
53 | 54 |
|
54 | 55 |
|
55 | 56 |
class DelimiterArgument(ValueArgument): |
57 |
"""Set a custom delimiter, default is '/' |
|
58 |
""" |
|
59 |
|
|
56 | 60 |
def __init__(self, caller_obj, help='', parsed_name=None, default=None): |
57 | 61 |
super(DelimiterArgument, self).__init__(help, parsed_name, default) |
58 | 62 |
self.caller_obj = caller_obj |
... | ... | |
67 | 71 |
def value(self, newvalue): |
68 | 72 |
self._value = newvalue |
69 | 73 |
|
70 |
|
|
71 |
class MetaArgument(ValueArgument): |
|
72 | 74 |
@property |
73 | 75 |
def value(self): |
74 | 76 |
if self._value is None: |
... | ... | |
398 | 400 |
self.arguments['quota'] =\ |
399 | 401 |
IntArgument('set default container quota', '--quota') |
400 | 402 |
self.arguments['meta'] =\ |
401 |
MetaArgument('set container metadata', '--meta') |
|
403 |
KeyValueArgument( |
|
404 |
'set container metadata (can be repeated)', '--meta') |
|
405 |
# MetaArgument('set container metadata', '--meta') |
|
402 | 406 |
|
403 | 407 |
def main(self, container____directory__): |
404 | 408 |
super(self.__class__, self).main(container____directory__) |
Also available in: Unified diff