Revision fa382f9e docs/usage.rst
b/docs/usage.rst | ||
---|---|---|
22 | 22 |
.. code-block:: console |
23 | 23 |
:emphasize-lines: 1 |
24 | 24 |
|
25 |
Example 1.1: Set default authentication user and token
|
|
25 |
Example 1.1: Set authentication URL, user token and cloud alias "default"
|
|
26 | 26 |
|
27 |
$ kamaki config set remote.default.url <authentication URL> |
|
28 |
$ kamaki config set remote.default.token myt0k3n== |
|
27 |
$ kamaki config set cloud.default.url <authentication URL> |
|
28 |
$ kamaki config set cloud.default.token myt0k3n== |
|
29 |
|
|
30 |
.. note:: The term *default* can be replaced by any arbitary term chosen by |
|
31 |
the user. This term will serve as a cloud alias for kamaki users, and can |
|
32 |
be easily modified. |
|
29 | 33 |
|
30 | 34 |
Shell vs one-command |
31 | 35 |
-------------------- |
... | ... | |
36 | 40 |
|
37 | 41 |
In favor of interactive shell behavior: |
38 | 42 |
|
39 |
* tab completion for commands (if supported by host OS)
|
|
40 |
* session history with ↑ or ↓ keys |
|
43 |
* tab completion for commands (if supported by host command line shell)
|
|
44 |
* session history with ↑ or ↓ keys (if supported by host command line shell)
|
|
41 | 45 |
* shorter commands with command context switching |
42 | 46 |
* re-run old commands with /history |
43 | 47 |
|
... | ... | |
67 | 71 |
|
68 | 72 |
Example 2.2.2: Run kamaki shell with custom configuration file |
69 | 73 |
|
70 |
$ kamaki --config myconfig.file
|
|
74 |
$ kamaki -c myconfig.file
|
|
71 | 75 |
|
72 | 76 |
|
73 | 77 |
Run as one-command |
... | ... | |
126 | 130 |
Path to configuration file |
127 | 131 |
-o OPTIONS, --options OPTIONS |
128 | 132 |
Override a config value |
129 |
--cloud CLOUD Chose a remote cloud to connect to
|
|
133 |
--cloud CLOUD Chose a cloud to connect to |
|
130 | 134 |
-h, --help Show help message |
131 | 135 |
|
132 | 136 |
Options: |
133 | 137 |
- - - - |
134 |
config : Kamaki configurations
|
|
135 |
file : Pithos+/Storage API commands
|
|
136 |
flavor : Cyclades/Compute API flavor commands
|
|
137 |
history : Kamaki command history
|
|
138 |
image : Cyclades/Plankton API image commands
|
|
138 |
config : Kamaki configurations |
|
139 |
file : Pithos+/Storage API commands |
|
140 |
flavor : Cyclades/Compute API flavor commands |
|
141 |
history: Kamaki command history |
|
142 |
image : Cyclades/Plankton API image commands |
|
139 | 143 |
image compute: Cyclades/Compute API image commands |
140 |
network : Cyclades/Compute API network commands
|
|
141 |
server : Cyclades/Compute API server commands
|
|
142 |
user : Astakos API commands
|
|
144 |
network: Cyclades/Compute API network commands |
|
145 |
server : Cyclades/Compute API server commands |
|
146 |
user : Astakos API commands |
|
143 | 147 |
|
144 | 148 |
.. code-block:: console |
145 | 149 |
:emphasize-lines: 1,2 |
... | ... | |
161 | 165 |
Path to configuration file |
162 | 166 |
-o OPTIONS, --options OPTIONS |
163 | 167 |
Override a config value |
164 |
--cloud CLOUD Chose a remote cloud to connect to
|
|
168 |
--cloud CLOUD Chose a cloud to connect to |
|
165 | 169 |
-h, --help Show help message |
166 | 170 |
|
167 | 171 |
Options: |
... | ... | |
195 | 199 |
List Virtual Machines accessible by user |
196 | 200 |
User Authentication: |
197 | 201 |
* to check authentication: /user authenticate |
198 |
* to set authentication token: /config set remote.default.token <token>
|
|
202 |
* to set authentication token: /config set cloud.default.token <token>
|
|
199 | 203 |
|
200 | 204 |
optional arguments: |
201 | 205 |
-v, --verbose More info at response |
... | ... | |
207 | 211 |
Path to configuration file |
208 | 212 |
-o OPTIONS, --options OPTIONS |
209 | 213 |
Override a config value |
210 |
--cloud CLOUD Chose a remote cloud to connect to
|
|
214 |
--cloud CLOUD Chose a cloud to connect to |
|
211 | 215 |
-h, --help Show help message |
212 | 216 |
--since SINCE show only items since date (' d/m/Y H:M:S ') |
213 | 217 |
--enumerate Enumerate results |
... | ... | |
333 | 337 |
Example 3.4.1: List the trash container contents, containing c1_ |
334 | 338 |
|
335 | 339 |
|
336 |
$ kamaki file list -o global.pithos_container=trash| grep c1_
|
|
340 |
$ kamaki file list -o cloud.default.pithos_container=trash| grep c1_
|
|
337 | 341 |
c1_1370859409.0 20KB |
338 | 342 |
c1_1370859414.0 9MB |
339 | 343 |
c1_1370859409.1 110B |
... | ... | |
610 | 614 |
[file]: /user authenticate |
611 | 615 |
(401) UNAUTHORIZED Invalid X-Auth-Token |
612 | 616 |
|
613 |
[file]: /config get remote.default.token
|
|
617 |
[file]: /config get cloud.default.token
|
|
614 | 618 |
my3xp1r3dt0k3n== |
615 | 619 |
|
616 |
[file]: /config set remote.default.token myfr35ht0k3n==
|
|
620 |
[file]: /config set cloud.default.token myfr35ht0k3n==
|
|
617 | 621 |
|
618 |
[file]: /config get remote.default
|
|
619 |
remote.default.url = https://astakos.example.com/astakos/identity/2.0/
|
|
620 |
remote.default.token = myfr35ht0k3n==
|
|
622 |
[file]: /config get cloud.default
|
|
623 |
cloud.default.url = https://astakos.example.com/astakos/identity/2.0/
|
|
624 |
cloud.default.token = myfr35ht0k3n==
|
|
621 | 625 |
|
622 | 626 |
[file]: list |
623 | 627 |
1. pithos (10MB, 2 objects) |
624 | 628 |
2. trash (0B, 0 objects) |
625 | 629 |
|
626 | 630 |
.. note:: The error messages on this example where shortened for clarity. |
627 |
Actual kamaki error messages are more helpful and descriptive. |
|
631 |
Actual kamaki error messages are more helpful and descriptive.
|
|
628 | 632 |
|
629 | 633 |
The following example compares some equivalent calls that run |
630 | 634 |
*user-authenticate* after a *file-list* 401 failure. |
... | ... | |
669 | 673 |
Using config |
670 | 674 |
^^^^^^^^^^^^ |
671 | 675 |
|
672 |
The configuration mechanism of kamaki is detailed at the
|
|
676 |
The configuration mechanism of kamaki is detailed in the
|
|
673 | 677 |
`setup section <setup.html>`_ and it is common for both interaction modes. In |
674 | 678 |
specific, the configuration mechanism is implemented as a command group, namely |
675 | 679 |
`config`. Using the config commands is as straightforward as any other kamaki |
... | ... | |
693 | 697 |
.. code-block:: console |
694 | 698 |
:emphasize-lines: 1 |
695 | 699 |
|
696 |
Example 4.4.1: Set default storage container |
|
700 |
Example 4.4.1: Set default storage container (cloud: default)
|
|
697 | 701 |
|
698 | 702 |
|
699 | 703 |
[file]: list |
... | ... | |
705 | 709 |
1. D mydir/ |
706 | 710 |
2. 20M mydir/rndm_local.file |
707 | 711 |
|
708 |
[file]: /config set pithos_container mycontainer |
|
712 |
[file]: /config set cloud.default.pithos_container mycontainer
|
|
709 | 713 |
|
710 | 714 |
[file]: list |
711 | 715 |
1. D mydir/ |
... | ... | |
718 | 722 |
.. code-block:: console |
719 | 723 |
:emphasize-lines: 1 |
720 | 724 |
|
721 |
Example 4.4.2: Delete a setting option |
|
725 |
Example 4.4.2: Delete a setting option (cloud: default)
|
|
722 | 726 |
|
723 | 727 |
|
724 |
[file]: /config delete pithos_container |
|
728 |
[file]: /config delete cloud.default.pithos_container
|
|
725 | 729 |
|
726 | 730 |
[file]: list |
727 | 731 |
1. mycontainer (32MB, 2 objects) |
Also available in: Unified diff