Revision 03d661d8

b/docs/index.rst
8 8

  
9 9
.. image:: /images/kamaki-logo.png
10 10

  
11
./kamaki is a simple, yet intuitive, command-line tool for managing clouds. Run
12
it without arguments to see a list of available commands.
11
./kamaki is a simple, yet intuitive, multipurpose command-line tool and client API for managing clouds.
13 12

  
14 13
It is an initial implementation of the OpenStack Compute API, v1.1, with custom
15 14
extensions specific to the Synnefo IaaS cloud management software.
b/docs/installation.rst
36 36
.. code-block:: console
37 37

  
38 38
    $ virtualenv kamaki-env
39

  
40 39
    $ source kamaki-env/bin/activate
41 40

  
42 41
A more detailed example of using virtual env can be found at the `snf-image-creator setup guide <http://docs.dev.grnet.gr/snf-image-creator/latest/install.html#python-virtual-environment>`_
......
49 48
.. code-block:: console
50 49

  
51 50
    $ git clone http://code.grnet.gr/git/synnefo
52

  
53 51
    $ cd synnefo/snf-common
54

  
55 52
    $ ./setup build install
56

  
57 53
    $ cd -
58 54

  
59 55
3. Install kamaki
......
62 58
.. code-block:: console
63 59

  
64 60
    $ git clone http://code.grnet.gr/git/kamaki
65

  
66 61
    $ cd kamaki
67

  
68 62
    $ ./setup build install
69 63

  
70 64
4. Install progress and/or ansicolors (optional)
......
77 71
.. code-block:: console
78 72

  
79 73
    $ pip install progress
80

  
81 74
    $ pip install ansicolors
82 75

  
83 76
Ubuntu and Debian packages
......
122 115
.. code-block:: console
123 116

  
124 117
    $ sudo apt-get install python-ansicolors
125

  
126 118
    $ sudo apt-get install python-progress
127 119

  
128 120
Mac OS X
b/docs/overview.rst
27 27
Community & Support
28 28
-------------------
29 29

  
30
For any problems you may bump into while using *kamaki* or for help from the development team please contact us at:
30
For any problems you may bump into while using *kamaki* or for help from the development team please contact us at::
31 31

  
32
* synnefo@lists.grnet.gr
32
    synnefo@lists.grnet.gr
33 33

  
34 34
Please be sure to have read the Documentation and check the known issues before contacting the team.
35

  
b/docs/setup.rst
32 32

  
33 33
If a user needs to switch between different setups, Kamaki can explicitly load configuration files with the --config option:
34 34

  
35
*kamaki --config <custom_config_file_path> [other options]*
35
.. code-block:: console
36

  
37
    $ kamaki --config <custom_config_file_path> [other options]
36 38

  
37 39
Using many different configuration files for different cloud services is encouraged.
38 40

  
......
41 43

  
42 44
All kamaki commands can be used with the -o option in order to override configuration options at runtime. For example::
43 45

  
44
    kamaki store list -o global.account=anotheraccount -o global.token=aT0k3n==
46
.. code-block:: console
47

  
48
    $ kamaki store list -o global.account=anotheraccount -o global.token=aT0k3n==
45 49

  
46 50
will invoke *kamaki store list* with the specified options, but the initial global.account and global.token values will be restored to initial values afterwards.
47 51

  
......
69 73

  
70 74
The configuration file is a simple text file that can be created by the user.
71 75

  
72
A simple way to create the configuration file is to set a configuration option using the kamaki config command. For example::
76
A simple way to create the configuration file is to set a configuration option using the kamaki config command. For example:
77

  
78
.. code-block:: console
73 79

  
74
    kamaki config set account myusername@mydomain.com
80
    $ kamaki config set account myusername@mydomain.com
75 81

  
76 82
In the above example, if the kamaki configuration file does not exist, it will be created with all the default values plus the *global.account* option set to *myusername@mydomain.com* value.
77 83

  
......
135 141
Hidden features
136 142
^^^^^^^^^^^^^^^
137 143

  
138
Since version 0.6.1 kamaki contains a test suite for the kamaki.clients API. The test suite can be activated with the following option on the configuration file:
144
Since version 0.6.1 kamaki contains a test suite for the kamaki.clients API. The test suite can be activated with the following option on the configuration file::
139 145

  
140
[test]
141
cli=test_cli
146
    [test]
147
    cli=test_cli
142 148

  
143 149
After that, users can run "kamaki test" commands to unit-test the prepackaged client APIs. Unit-tests are still experimental and there is a high probability of false alarms due to some of the expected values being hard-coded in the testing code.
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