Revision f6822a26

b/docs/commands.rst
450 450
.. warning:: The container:object/path syntax does not function if the
451 451
    container and / or the object path contain one or more : characters. To use
452 452
    containers and objects with : use the --container and --dst-container
453
    arguments, e.g. to copy test.py object from grnet:dev container to
454
    grnet:deploy ::
453
    arguments, e.g. to copy test.py object from example:dev container to
454
    example:deploy ::
455 455

  
456
        $ kamaki file copy --container=grnet:dev test.py --dst-container=grnet:deploy
456
        $ kamaki file copy --container=example:dev test.py --dst-container=example:deploy
b/docs/examplesdir/configuration.rst
1 1
Configuration
2 2
=============
3 3

  
4
Since kamaki 0.9, the format of the configuration file has changed. In this
5
scenario, we have an old configuration file at ${HOME}/.kamakirc that we need
6
to convert. We also create a new one from scratch. In both cases, we have to
7
set up one or more clouds in a single configuration and we also examine a case
8
of multiple configurations.
4
The following refers to the configuration version 0.9 or better. There is also
5
information on how to convert from older configuration files.
6

  
7
In this scenario, we start with an old configuration file at
8
*${HOME}/.kamakirc* that we need to convert. We also create a new one from scratch. In both cases, the second step is the same: set up one or more clouds
9
in a single configuration. Then we examine a case of multiple configuration
10
files.
9 11

  
10 12
Convert old configuration file
11 13
------------------------------
......
45 47
    .     image.url = https://cyclades.example.com/plankton
46 48
    .     store.account = OldForgotenAccountName
47 49
    . Kamaki is ready to convert the config file
48
    . Create (overwrite) file .kamakirc.okeanos ? [y/N]
50
    . Create (overwrite) file .kamakirc ? [y/N]
49 51
    .
50 52
    <y is pressed>
51 53
    .
......
138 140
Failed or incomplete cloud configurations
139 141
-----------------------------------------
140 142

  
141
Now let kamaki use the default configuration ( ${HOME}/.kamakirc ). Let the old
143
Now let kamaki use the default configuration (*${HOME}/.kamakirc*). Let the old
142 144
token be `my0ld70k3n==` and let it be invalid.
143 145

  
144 146
Check for clouds and attempt to authenticate
......
172 174
    . |  UNAUTHORIZED unauthorized (Invalid token)
173 175
    $
174 176

  
175
After some searching at the deployments UI, you found out that the URL/token
177
After some searching at the deployments UI, you find out that the URL/token
176 178
pair you need is::
177 179

  
178 180
    URL: https://accounts.deploymentexample.com/identity/v2.0
......
208 210
        URL: https://accounts.example.com/identity/v2.0/
209 211
        TOKEN: myt35t70k3n==
210 212

  
211
As we can see, the default configuration handles only one cloud, aliased as
213
Obviously the default configuration handles only one cloud, aliased as
212 214
"default". We will add the second cloud as well.
213 215

  
214 216
.. code-block:: console
......
228 230
    . cloud.mytest.token = myt35t70k3n==
229 231
    $
230 232

  
231
Check if kamaki knows one of the clouds to be the default
233
Check if kamaki is confused (is there a default cloud setup?)
232 234

  
233 235
.. code-block:: console
234 236

  
......
298 300
Multiple configurations
299 301
-----------------------
300 302

  
301
In the following example, a user wants to experiment with upload and download
302
for different number of threads. The plan is to contuct a set of tests with 3
303
threads at most and another one with 5. All experiments will be run against the
304
same Synnefo cloud (the "mytest" cloud from the previous example).
303
In the following example, we experiment with the higher number of threads when
304
uploading and downloading. The plan is to contact a set of tests with 3 threads
305
at most and another one with 5. All experiments will be run against the same
306
Synnefo cloud (the "mytest" cloud from the previous example).
305 307

  
306 308
Let's create the 3-threaded configuration first
307 309

  
b/docs/examplesdir/imageregister.rst
14 14

  
15 15
    pithos:debian_base3.diskdump
16 16

  
17
The crussial element in an image location is the container (e.g. `pithos`) and
18
the image object path (e.g. `debian_base3.diskdump`).
17
.. note:: The image API requires the image location in the form
18

  
19
    *pithos://<user uuid>/<container>/<object path>*
20

  
21
    The translation between
22
    the two formats is handled internally by kamaki. The latest format is still
23
    acceptable by kamaki due to backward compatibility but it is going to be deprecated from kamaki 0.12 and on.
19 24

  
20 25

  
21 26
Register an image
......
64 69
the image file and then register it as an image, and is equivalent to manually
65 70
calling **/file upload** and **/image register**.
66 71

  
67
In other words, the example that follows is equivalent to calling the two
68
operations above.
72
In other words, the preceding and following command sequences are equivalent.
69 73

  
70 74
.. code-block:: console
71 75

  
......
168 172
    OS: Linux
169 173
    user: someuser
170 174

  
171
These properties can be added freely by the user, and they have no significance
172
for the image server, but they could be used to help using the image more
173
efficiently.
175
These properties can be added freely by the user, and they are not required by
176
the image server, but they can be used by many applications.
174 177

  
175
Attempt to register with properties
178
Attempt to register an image with custom properties
176 179

  
177 180
.. code-block:: console
178 181

  
......
180 183
    Metadata file pithos:debian_base3.diskdump.meta already exists
181 184
    [kamaki]:
182 185

  
183
It's true that the metafile is already there, but we can override it (**-f**)
186
It's true that a metafile with this name is already there, but we can override
187
it (**-f**)
184 188

  
185 189
.. code-block:: console
186 190

  
......
199 203
    Done
200 204
    [kamaki]:
201 205

  
202
The metadata file can be edited. Let's edit the file, by adding properties::
206
The metadata file can be edited. Let's edit the file to add these properties::
203 207

  
204 208
    OS: Linux
205 209
    user: root
......
272 276
    [kamaki]: image meta set 7h1rd-1m4g3-1d --name='Changed Name'
273 277
    [kamaki]:
274 278

  
275
If we, now, get the image metadata, we will see that the name is changed:
279
A look at the image metadata reveals that the name is changed:
276 280

  
277 281
.. code-block:: console
278 282

  
......
305 309
    [kamaki]: image meta set 7h1rd-1m4g3-1d --unpublish
306 310
    [kamaki]:
307 311

  
308
The first call published the image (set is-public to True) and also restored
309
the name to "Debian Base Gama". The second one unpublished the image (set
312
The first call publishes the image (set is-public to True) and also restores
313
the name to "Debian Base Gama". The second one unpublishes the image (set
310 314
is-public to False).
311 315

  
312
To delete metadata, use the image meta delete method:
316
To delete metadata, use the image meta delete method. For example, the
317
following will set the value of *status* to an empty string:
313 318

  
314 319
.. code-block:: console
315 320

  
316 321
    [kamaki]: image meta delete 7h1rd-1m4g3-1d status
317 322
    [kamaki]:
318 323

  
319
will empty the value of "status".
320 324

  
321 325
These operations can be used for properties with the same semantics:
322 326

  
......
370 374
produced automatically at the server side, was the same. This is due to the
371 375
fact that image ids are 1 to 1 related to image objects uploaded to Pithos+
372 376

  
373
**An explicit name overrides the metafile**
377
**An explicit image name overrides the metafile**
374 378

  
375 379
Each image needs a name and this is given as the first argument of the
376 380
`register` command. This name overrides the name in the metafile.
377 381

  
378
**Reregistration is not update, but an override**
382
**Reregistration is not an update, but an override**
379 383

  
380 384
The property `user: root` won over `user: someuser`, because it was set last.
381 385
Actually, all properties were replaced by the new ones, when the image was
......
560 564
images (all images will be named after their relative paths).
561 565

  
562 566
Also, let the registered images be public (accessible to all users for creating
563
VMs) by adding the **--public** flag argument when calling `image register`.
567
VMs) by adding the **- - public** flag argument when calling `image register`.
564 568

  
565 569
.. code-block:: console
566 570

  
b/docs/examplesdir/listing.rst
9 9
.. code-block:: console
10 10

  
11 11
    $ kamaki
12
    kamaki v0.9 - Interactive Shell
13
    .
12
    kamaki v0.10 - Interactive Shell
13

  
14 14
    /exit       terminate kamaki
15 15
    exit or ^D  exit context
16 16
    ? or help   available commands
17 17
    ?command    help on command
18 18
    !<command>  execute OS shell command
19
    .
19

  
20
    Session user is Tyler Durden <uuid: th3y-4r3-7h3-54m3-p3r50n>
20 21
    [kamaki]:
21 22

  
22 23
Simple listing
23 24
--------------
24 25

  
25
List configuration options, whether in the file or in memory
26
List configuration options, whether in the file or from defaults list
26 27

  
27 28
.. code-block:: console
28 29

  
......
78 79

  
79 80
    [kamaki]: network list
80 81
    1 public_network
81
    42 my_private)network
82
    42 my_private_network
82 83
    [kamaki]:
83 84

  
84 85
List flavors
......
96 97

  
97 98
    [kamaki]: image list
98 99
    f1r57-1m4g3-1d Debian Base Alpha
99
    .container_format: bare
100
    .disk_format:      diskdump
101
    .size:             474066944
102
    .status:           available
100
     container_format: bare
101
     disk_format:      diskdump
102
     size:             474066944
103
     status:           available
103 104
    53c0nd-1m4g3-1d Beta Debian Base
104
    .container_format: bare
105
    .disk_format:      diskdump
106
    .size:             474066944
107
    .status:           available
105
     container_format: bare
106
     disk_format:      diskdump
107
     size:             474066944
108
     status:           available
108 109
    [kamaki]: image compute list
109 110
    f1r57-1m4g3-1d Debian Base Alpha
110 111
    53c0nd-1m4g3-1d Beta Debian Base
......
130 131
    count:    3
131 132
    modified: 2013-06-17T12:35:11.613124+00:00
132 133
    policy:
133
    .       quota:      0
134
    .       versioning: auto
134
            quota:      0
135
            versioning: auto
135 136
    trash
136 137
    bytes:    0 (0B)
137 138
    count:    0
138 139
    modified: 2013-06-06T14:24:23.675891+00:00
139 140
    policy:
140
    .       quota:      0
141
    .       versioning: auto
141
            quota:      0
142
            versioning: auto
142 143
    [file]:
143 144

  
144 145
Create some more pithos container to experiment with
......
191 192
    type:      plan-text/unicode
192 193
    uuid:      0493f1d9-9410-4f4b-a81f-fe42f9cefa70
193 194
    version:   1085
194
    .
195
     
195 196
    video
196 197
    by:        s0m3-u53r-1d
197 198
    bytes:     0
......
201 202
    type:      application/directory
202 203
    uuid:      80e719f5-9d68-4333-9846-9943972ef1fd
203 204
    version:   1086
204
    .
205
     
205 206
    video/tk1.mpg
206 207
    by:        s0m3-u53r-1d
207 208
    bytes:     11000000 (11ΜΒB)
......
211 212
    type:      video/mpeg
212 213
    uuid:      b0b46b39-c59a-4adc-a386-6a169cb9f8a5
213 214
    version:   1079
214
    .
215
     
215 216
    video/tk2.mpg
216 217
    by:        s0m3-u53r-1d
217 218
    bytes:     12000000 (12MB)
......
221 222
    type:      video/mpeg
222 223
    uuid:      12a81309-db3c-4e30-ae9a-4ac2b8289def
223 224
    version:   1081
224
    .
225
     
225 226
    video/tk3.mpg
226 227
    by:        s0m3-u53r-1d
227 228
    bytes:     13000000 (13MB)
......
247 248
    type:      video/mpeg
248 249
    uuid:      b0b46b39-c59a-4adc-a386-6a169cb9f8a5
249 250
    version:   1079
250
    .
251
     
251 252
    video/tk2.mpg
252 253
    by:        s0m3-u53r-1d
253 254
    bytes:     12000000 (12MB)
......
257 258
    type:      video/mpeg
258 259
    uuid:      12a81309-db3c-4e30-ae9a-4ac2b8289def
259 260
    version:   1081
260
    .
261
     
261 262
    video/tk3.mpg
262 263
    by:        s0m3-u53r-1d
263 264
    bytes:     13000000 (13MB)
......
358 359
                           OS-EXT-IPS:type: fixed
359 360
                           addr:            192.168.12.4
360 361
                           version:         4
361
                        . . . . . . .
362
                        
362 363
                           OS-EXT-IPS:type: fixed
363 364
                           addr:            2001:648:2ffc:1222:a800:2ff:fee3:49f1
364 365
                           version:         6
......
383 384
                    links:
384 385
                            href: https://example.com/compute/v2.0/flavors/1
385 386
                            rel:  bookmark
386
                         . . . . . . .
387
                        
387 388
                            href: https://example.com/compute/v2.0/flavors/1
388 389
                            rel:  self
389 390
        hostId:
......
392 393
                    links:
393 394
                            href: https://example.com/compute/v2.0/images/f1r57-1m4g3-1d
394 395
                            rel:  bookmark
395
                         . . . . . . .
396

  
396 397
                            href: https://example.com/compute/v2.0/images/f1r57-1m4g3-1d
397 398
                            rel:  self
398
                         . . . . . . .
399

  
399 400
                            href: https:/example.com/image/v1.0/images/f1r57-1m4g3-1d
400 401
                            rel:  alternate
401 402
        key_name:        None
402 403
        links:
403 404
                       href: https://example.com/compute/v2.0/servers/4201
404 405
                       rel:  bookmark
405
                    . . . . . . .
406

  
406 407
                       href: https://example.com/compute/v2.0/servers/4201
407 408
                       rel:  self
408 409
        metadata:
......
424 425
                           OS-EXT-IPS:type: fixed
425 426
                           addr:            192.168.12.4
426 427
                           version:         4
427
                        . . . . . . .
428

  
428 429
                           OS-EXT-IPS:type: fixed
429 430
                           addr:            2002:648:2ffc:1222:a800:2ff:fee3:49f1
430 431
                           version:         6
......
449 450
                    links:
450 451
                            href: https://example.com/compute/v2.0/flavors/2
451 452
                            rel:  bookmark
452
                         . . . . . . .
453

  
453 454
                            href: https://example.com/compute/v2.0/flavors/2
454 455
                            rel:  self
455 456
        hostId:
......
458 459
                    links:
459 460
                            href: https://example.com/compute/v2.0/images/53c0nd-1m4g3-1d
460 461
                            rel:  bookmark
461
                         . . . . . . .
462
                        
462 463
                            href: https://example.com/compute/v2.0/images/53c0nd-1m4g3-1d
463 464
                            rel:  self
464
                         . . . . . . .
465
                        
465 466
                            href: https:/example.com/image/v1.0/images/53c0nd-1m4g3-1d
466 467
                            rel:  alternate
467 468
        key_name:        None
468 469
        links:
469 470
                       href: https://example.com/compute/v2.0/servers/4202
470 471
                       rel:  bookmark
471
                    . . . . . . .
472
                   
472 473
                       href: https://example.com/compute/v2.0/servers/4202
473 474
                       rel:  self
474 475
        metadata:
......
556 557
        links:
557 558
             href: https://example.com/cyclades/compute/v2.0/images/f1r57-1m4g3-1d
558 559
             rel:  bookmark
559
          . . . . . . .
560
         
560 561
             href: https://example.com/cyclades/compute/v2.0/images/f1r57-1m4g3-1d
561 562
             rel:  self
562
          . . . . . . .
563
         
563 564
             href: https://example.com/cyclades/image/v1.0/images/f1r57-1m4g3-1d
564 565
             rel:  alternate
565 566
        metadata:
......
581 582
        links:
582 583
             href: https://example.com/cyclades/compute/v2.0/images/53c0nd-1m4g3-1d
583 584
             rel:  bookmark
584
          . . . . . . .
585
         
585 586
             href: https://example.com/cyclades/compute/v2.0/images/53c0nd-1m4g3-1d
586 587
             rel:  self
587
          . . . . . . .
588
         
588 589
             href: https://example.com/cyclades/image/v1.0/images/53c0nd-1m4g3-1d
589 590
             rel:  alternate
590 591
        metadata:
b/docs/examplesdir/network.rst
3 3

  
4 4
Users can create private networks between Virtual Machines.
5 5

  
6
In the following we assume that there are two active VMs (ids 141 and 142)
7
connected to one public network with id 1 (default set up).
6
In the following we assume that there are two active virtual servers (ids 141
7
and 142) connected to one public network with id 1 (default set up).
8 8

  
9 9
.. code-block:: console
10 10

  
......
24 24
        network_id:      1
25 25
    $
26 26

  
27
.. note:: In Synnefo, each VM connects to a network through a NIC. The id of a
28
    nic is nic-<server id>-<increment> by convention.
27
.. note:: In Synnefo, each virtual server connects to a network through a nic.
28
    The id of a nic is *nic-<server id>-<increment>* by convention.
29 29

  
30 30
Let's load kamaki for networks and have a look at the current network state. We
31 31
expect to find at least one public network (id: 1)
......
71 71
    user_id:     s0m3-u53r-1d
72 72
    [network]:
73 73

  
74
Let's create two more networks, one for VM 141 and one for Vm 142
74
Let's create two more networks, one for virtual server 141 and one for virtual
75
server 142
75 76

  
76 77
.. code-block:: console
77 78

  
78
    [network]: create 'For VM 141'
79
    [network]: create 'For virtual server 141'
79 80
    ...
80 81
    id:         4
81 82
    ...
82
    [network]: create 'For VM 142'
83
    [network]: create 'For virtual server 142'
83 84
    ...
84 85
    id:         5
85 86
    ...
......
88 89
Connect and disconnect
89 90
----------------------
90 91

  
91
To make a points, the networks should be connected to their respecting VMs
92
To make a point, the networks should be connected to their respecting virtual
93
servers
92 94

  
93 95
.. code-block:: console
94 96

  
......
97 99
    [network]:
98 100

  
99 101
Now, let's check the current network state. We expect to see the servers
100
connected to netowkrd with ids 4 and 5, but not 3.
102
connected to networks with ids 4 and 5, but not 3.
101 103

  
102 104
.. code-block:: console
103 105

  
......
133 135
     type:        MAC_FILTERED
134 136
     updated:     2013-06-19T13:54:57.672744+00:00
135 137
     user_id:     s0m3-u53r-1d
136
    4 For VM 141
138
    4 For virtual server 141
137 139
     attachments:
138 140
                nic-141-1
139 141
     cidr:        192.168.2.0/24
......
148 150
     type:        MAC_FILTERED
149 151
     updated:     2013-06-19T13:54:57.672744+00:00
150 152
     user_id:     s0m3-u53r-1d
151
    5 For VM 142
153
    5 For virtual server 142
152 154
     attachments:
153 155
                nic-141-2
154 156
     cidr:        192.168.3.0/24
......
165 167
     user_id:     s0m3-u53r-1d
166 168
    [network]:
167 169

  
168
It is time to make meaningful connections: connect two servers to a private
170
It is time to make a meaningful connection: connect two servers to a private
169 171
network
170 172

  
171 173
.. code-block:: console
......
174 176
    [network]: connect 142 3
175 177
    [network]:
176 178

  
177
Now the servers can communicate with eachother through their shared private
179
Now the servers can communicate with each other through their shared private
178 180
network. Let's see the network details to confirm that
179 181

  
180 182
.. code-block:: console
......
213 215

  
214 216
.. warning:: Public networks cannot be destroyed in Synnefo
215 217

  
216
Attempt to destroy the useless `For VM 141` network
218
Attempt to destroy the useless `For virtual server 141` network
217 219

  
218 220
.. code-block:: console
219 221

  
......
221 223
    (403) Network with id 4 is in use
222 224
    [network]:
223 225

  
224
The attached VMs should be disconnected first (recall that the nic-141-1
225
connects network with id 4 to VM with id 141)
226
The attached virtual servers should be disconnected first (recall that the
227
nic-141-1 connects network with id 4 to virtual server with id 141)
226 228

  
227 229
.. code-block:: console
228 230

  
......
237 239

  
238 240
    [network]: disconnect nic-142-2
239 241
    [network]: disconnect nic-141-2
240
    (404) No nic nic-141-2 on server(VM) with id 141
241
    |  * check server(VM) with id 142: /server info 141
242
    |  * list nics for server(VM) with id 141:
242
    (404) No nic nic-141-2 on server(virtual server) with id 141
243
    |  * check server(virtual server) with id 142: /server info 141
244
    |  * list nics for server(virtual server) with id 141:
243 245
    |        /server addr 141
244 246
    |  Network Interface nic-141-2 not found on server 141
245 247
    [network]:
246 248

  
247 249
Strangely, kamaki did not find any nic-141-2 nics. Why?
248 250

  
249
Answer: A listing of the 141 nics shows that the network connection to network
250
with id 3 is now renamed as nic-141-1
251
Answer: Get the addresses of server 141 to find out that the nic which connects
252
the server to network 3 is automatically renamed (nic-141-2 --> nic-141-1)
251 253

  
252 254
.. code-block:: console
253 255

  
......
266 268
     network_id:      1
267 269
     [network]:
268 270

  
269
.. warning:: Synnefo network server renames the nics of a VM whenever another
270
    nic is of the same server is deleted
271
.. warning:: Synnefo network server may rename the nics of a virtual server if
272
    another nic on the same server is deleted
271 273

  
272 274
Let's remove the correct nic, then, and check if any other nics are related to
273 275
the network with id 3.
b/docs/examplesdir/server.rst
2 2
===================================
3 3

  
4 4
A `server` (also known as `virtual machine`), is created based on a registered
5
`image` and a reconfigured hardware setup (also known as `flavor`).
5
`image` and a preconfigured hardware setup (also known as `flavor`).
6 6

  
7 7
Create a virtual server
8 8
-----------------------
......
50 50
    [kamaki]:
51 51

  
52 52
Let's pick the `C1R128D1drbd` (id: 1) flavor and the `Debian Base Alpha` (id:
53
f1r57-1m4g3-1d) image to create a new VM called 'My First Server'
53
f1r57-1m4g3-1d) image to create a new virtual server called 'My First Server'
54 54

  
55 55
.. code-block:: console
56 56

  
......
85 85
    [kamaki]:
86 86

  
87 87
.. note:: The adminPass field is not stored anywhere, therefore users would
88
    rather write it down and change it the first time they use the VM
88
    rather write it down and change it the first time they use the virtual server
89 89

  
90
Wait for the VM with id 141 to build (optional)
90
Wait for the virtual server with id 141 to build (optional)
91 91

  
92 92
.. code-block:: console
93 93

  
94 94
    [kamaki]: server wait 141
95 95
    <bar showing build progress, until 100%>
96
    Server 141 is not in ACTIVE mode
96
    Server 141 is now in ACTIVE mode
97 97
    [kamaki]:
98 98

  
99
Destroy the VM (wait is still optional)
99
Destroy the virtual server (wait is still optional)
100 100

  
101 101
.. code-block:: console
102 102

  
103 103
    [kamaki]: server delete 141
104 104
    [kamaki]: server wait 141 ACTIVE
105 105
    <bar showing destruction progress, until 100%>
106
    Server 141 is not in DELETED mode
106
    Server 141 is now in DELETED mode
107 107
    [kamaki]:
108 108

  
109 109
Inject ssh keys to a debian server
110 110
----------------------------------
111 111

  
112 112
Assume that the servers build from the image `Debian Base Alpha` accept ssh
113
connections. We need to build servers that can log us as roots without a
113
connections. We need to build servers that can log us as root without a
114 114
password. This can be achieved if the `/root/.ssh/authorized_keys` file exists
115 115
and contains the public key of the current user.
116 116

  
......
119 119
`/root/.ssh/authorized_keys` while creating the virtual server.
120 120

  
121 121
Luckily, Synnefo fully supports the OpenStack suggestion for file injections on
122
VMs and kamaki allows it by using the **-p** argument (p stands for
122
virtual servers and kamaki allows it by using the **-p** argument (p stands for
123 123
`PERSONALITY` and is the term used in the
124 124
`respective OpenStack <http://docs.openstack.org/api/openstack-compute/2/content/CreateServers.html>`_ description).
125 125

  
......
135 135
    default behavior depends on the remote server, e.g. for a debian image we
136 136
    expect the file to have root ownership, if the ownership is not specified.
137 137

  
138
Create a vm while injecting current users public key to root account
138
Create a virtual server while injecting current user public key to root account
139 139

  
140 140
.. code-block:: console
141 141

  
......
170 170
    user_id:         s0m3-u53r-1d
171 171
    [server]:
172 172

  
173
When the VM is ready, get the VMs external IP from the web UI. Let's assume the
173
When the virtual server is ready, get the virtual servers external IP from the web UI. Let's assume the
174 174
IP is 123.456.78.90 .
175 175

  
176 176
.. code-block:: console
177 177

  
178 178
    [server]: /exit
179 179
    $ ssh 123.456.78.90
180
    Linux remote-vm-4241 2.6.32-5-amd64 #1 SMP XXXX x86_64
180
    Linux remote-virtual server-4241 2.6.32-5-amd64 #1 SMP XXXX x86_64
181 181

  
182 182
    The programs included with the Debian GNU/Linux system are free software;
183 183
    the exact distribution terms for each program are described in the
......
185 185

  
186 186
    Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
187 187
    permitted by applicable law.
188
    root@remote-vm-4241:~# ls -l .ssh/
188
    root@remote-virtual server-4241:~# ls -l .ssh/
189 189
    total 4
190 190
    -rw-r--r-- 1 root root 399 Jun 19 12:34 authorized_keys
191
    root@remote-vm-4241:~#
191
    root@remote-virtual server-4241:~#
192 192

  
193
You can now log to your remote VM as root, without a password. Well done!
193
You can now log to your remote virtual server as root, without a password. Well done!
194 194

  
195 195
.. note:: There is no reason to limit injections to ssh keys. Users with an
196 196
    adequate understanding of the remote OS are encouraged to prepare and
b/docs/examplesdir/sharing.rst
14 14
Publish and unpublish
15 15
---------------------
16 16

  
17
Check publishing for objects `info.txt` and `file2upload.txt`
17
Get publishing information for objects `info.txt` and `file2upload.txt`
18 18

  
19 19
.. code-block:: console
20 20

  
......
28 28
    last-modified:              Mon, 17 Jun 2013 13:09:44 GMT
29 29
    server:                     gunicorn/0.14.5
30 30
    vary:                       X-Auth-Token,Accept-Language,Accept-Encoding
31
    x-object-hash:              e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
31
    x-object-hash:              e3b0c44298fc1c14....ca495991b7852b855
32 32
    x-object-modified-by:       s0m3-u53r-1d
33 33
    x-object-public:            https://example.com/pithos/public/14lhJnAhVU7
34 34
    x-object-uuid:              0493f1d9-9410-4f4b-a81f-fe42f9cefa70
......
44 44
    last-modified:              Mon, 17 Jun 2013 13:09:44 GMT
45 45
    server:                     gunicorn/0.14.5
46 46
    vary:                       X-Auth-Token,Accept-Language,Accept-Encoding
47
    x-object-hash:              f3b0c44298fc1c149afbf4c8996df92427ae41e4649b934ca495991b7852b857
47
    x-object-hash:              f3b0c44298fc1c149af...a495991b7852b857
48 48
    x-object-modified-by:       s0m3-u53r-1d
49 49
    x-object-uuid:              0493f1d9-9410-4f4b-a81f-fe42f9cefa70
50 50
    x-object-version:           1085
51 51
    x-object-version-timestamp: Mon, 17 Jun 2013 13:09:44 GMT
52 52
    [file]:
53 53

  
54
.. note:: The first object contains a "x-object-public" field, therefore is
54
.. note:: The first object contains an "x-object-public" field, therefore is
55 55
    published
56 56

  
57 57
Unpublish info.txt, publish file2upload.txt
......
66 66
Modify permissions
67 67
------------------
68 68

  
69
Check current permissions. If none set, the object is unrestricted
69
Get current permissions. If none set, the object inherits permissions from the
70
container and account (in that order).
70 71

  
71 72
.. code-block:: console
72 73

  
b/docs/examplesdir/updownload.rst
2 2
====================
3 3

  
4 4
The operations of uploading files to pithos as objects, and downloading
5
objects from pithos as a file are presented in this section.
5
objects from pithos as files are presented in this section.
6 6

  
7 7
Enter file context
8 8

  
......
74 74
    [file]:
75 75

  
76 76
.. note:: Try to reupload the files (use the -f option to override) and notice
77
    how much faster is the uploading now. Pithos can determine what parts of
78
    the file are already uploaded so that kamaki won't attempt to upload them
79
    again.
77
    how much faster is the uploading now. Pithos can determine what parts
78
    (blocks) of the file are already uploaded. Kamaki will, then, upload only
79
    the missing pars, if any.
80 80

  
81 81
Download an object or a directory
82 82
---------------------------------
......
113 113
    tk2.mpg 4MB
114 114
    $
115 115

  
116
Let's resume the download uperations (use -r)
116
Let's resume the download (use -r)
117 117

  
118 118
.. code-block:: console
119 119

  
......
135 135
    Done
136 136
    [file]:
137 137

  
138
.. note:: Kamaki calculated that all information is already uploaded, there was
139
    nothing to be done. If there is was a new or modified file, kamaki would
140
    detect and upload it.
138
.. note:: In this case, all files were already uploaded, so kamaki didn't have
139
    to upload anything. If a file was modified, kamaki would sync it with its
140
    remote counterpart.
141 141

  
142 142
Download all
143 143
------------
......
148 148
    Done
149 149
    [file]:
150 150

  
151
.. note:: Kamaki determined that all files have already been calculated. This
152
    operation examines all local files against the remote objects and
153
    downloads only missing data.
151
.. note:: Kamaki determined that all remote objects already exist as local files
152
    too, so there is nothing to be done. If a new remote object was created or
153
    an old one was modified, kamaki would have sync it with a local file.
154 154

  
155 155
Exit Context
156 156
------------
b/docs/usage.rst
103 103
Using help
104 104
^^^^^^^^^^
105 105

  
106
Kamaki help is used to list available commands with description, syntax and
107
corresponding optional arguments.
106
Kamaki help provides information on available commands (description, syntax and
107
corresponding optional arguments).
108 108

  
109
To see the command groups, use -h or --help like in example 1.3.1. In the same
110
way, help information for command groups and commands is printed. In the
111
following examples, the help messages of kamaki, of a command group (server)
112
and of a command in that group (list) are shown.
109
To see the command groups, use -h or --help (example 1.3.1). The
110
following examples demonstrate the help messages of kamaki, in the context of a
111
command group (server) and of a command in that group (list).
113 112

  
114 113
.. code-block:: console
115 114
    :emphasize-lines: 1
......
136 135

  
137 136
    Options:
138 137
     - - - -
139
    config :  Kamaki configurations
140
    file   :  Pithos+/Storage API commands
141
    flavor :  Cyclades/Compute API flavor commands
142
    history:  Kamaki command history
143
    image  :  Cyclades/Plankton API image commands
138
    network: Cyclades/Compute API network commands
139
    user: Astakos API commands
140
    livetest: Client func. tests on live servers
141
    server: Cyclades/Compute API server commands
142
    project: Synnefo project management CLI
143
    file: Pithos+/Storage API commands
144
    flavor: Cyclades/Compute API flavor commands
145
    config: Kamaki configurations
146
    image: Cyclades/Plankton API image commands
144 147
    image compute:  Cyclades/Compute API image commands
145
    network:  Cyclades/Compute API network commands
146
    server :  Cyclades/Compute API server commands
147
    user   :  Astakos API commands
148
    history: Kamaki command history
149

  
148 150

  
149 151
.. code-block:: console
150 152
    :emphasize-lines: 1,2
......
171 173

  
172 174
    Options:
173 175
     - - - -
174
    addr    :  List the addresses of all network interfaces on a server (server)
175
    console :  Get a VNC console to access an existing server (server)
176
    create  :  Create a server (aka Virtual Machine)
177
    delete  :  Delete a server (server)
178
    firewall:  Manage server (server) firewall profiles for public networks
179
    ip      :  Manage floating IPs for the servers
180
    info    :  Detailed information on a Virtual Machine
181
    list    :  List Virtual Machines accessible by user
182
    metadata:  Manage Server metadata (key:value pairs of server attributes)
183
    reboot  :  Reboot a server (server)
184
    rename  :  Set/update a server (server) name
185
    shutdown:  Shutdown an active server (server)
186
    start   :  Start an existing server (server)
187
    stats   :  Get server (server) statistics
188
    resize  :  Set a different flavor for an existing server
189
    wait    :  Wait for server to finish [BUILD, STOPPED, REBOOT, ACTIVE]
176
    info: Detailed information on a Virtual Machine
177
    rename: Set/update a virtual server name
178
    delete: Delete a virtual server
179
    console: Get a VNC console to access an existing virtual server
180
    addr: List the addresses of all network interfaces on a virtual server
181
    firewall: Manage virtual server firewall profiles for public networks
182
    ip: Manage floating IPs for the servers
183
    create: Create a server (aka Virtual Machine)
184
    list: List Virtual Machines accessible by user
185
    reboot: Reboot a virtual server
186
    start: Start an existing virtual server
187
    shutdown: Shutdown an active virtual server
188
    stats: Get virtual server statistics
189
    metadata: Manage Server metadata (key:value pairs of server attributes)
190
    resize: Set a different flavor for an existing server
191
    wait: Wait for server to finish [BUILD, STOPPED, REBOOT, ACTIVE]
190 192

  
191 193
.. code-block:: console
192 194
    :emphasize-lines: 1,2
......
200 202
                              [-l] [--more] [-n LIMIT] [-j]
201 203

  
202 204
    List Virtual Machines accessible by user
203
    User Authentication:    
204
    * to check authentication: /user authenticate    
205
    * to set authentication token: /config set cloud.default.token <token>
206 205

  
207 206
    optional arguments:
208
    -v, --verbose         More info at response
209
    -s, --silent          Do not output anything
210
    -V, --version         Print current version
211
    -d, --debug           Include debug output
212
    -i, --include         Include raw connection data in the output
213
    -c CONFIG, --config CONFIG
214
                          Path to configuration file
215
    -o OPTIONS, --options OPTIONS
216
                          Override a config value
217
    --cloud CLOUD         Chose a cloud to connect to
218
    -h, --help            Show help message
219
    --since SINCE         show only items since date (' d/m/Y H:M:S ')
220
    --enumerate           Enumerate results
221
    -l, --details         show detailed output
222
    --more                output results in pages (-n to set items per page,
223
                          default 10)
224
    -n LIMIT, --number LIMIT
225
                          limit number of listed servers
226
    -j, --json            show headers in json
207
      -v, --verbose         More info at response
208
      -s, --silent          Do not output anything
209
      -V, --version         Print current version
210
      -d, --debug           Include debug output
211
      -i, --include         Include raw connection data in the output
212
      -c CONFIG, --config CONFIG
213
                            Path to config file
214
      -o OPTIONS, --options OPTIONS
215
                            Override a config value
216
      --cloud CLOUD         Chose a cloud to connect to
217
      -h, --help            Show help message
218
      --status STATUS       filter by status (ACTIVE, STOPPED, REBOOT, ERROR,
219
                            etc.)
220
      --enumerate           Enumerate results
221
      --name-suffix NAME_SUFF
222
                            filter by name suffix (case insensitive)
223
      --image-id IMAGE_ID   filter by image id
224
      --metadata META       filter by metadata key=values
225
      -j, --json            show headers in json
226
      --id ID               filter by id
227
      --user-id USER_ID     filter by user id
228
      --id-like ID_LIKE     print only if id contains this (case insensitive)
229
      --id-suffix ID_SUFF   filter by id suffix (case insensitive)
230
      --since SINCE         show only items since date (' d/m/Y H:M:S ')
231
      -l, --details         show detailed output
232
      --name NAME           filter by name
233
      --more                output results in pages (-n to set items per page,
234
                            default 10)
235
      --name-prefix NAME_PREF
236
                            filter by name prefix (case insensitive)
237
      -n LIMIT, --number LIMIT
238
                            limit number of listed virtual servers
239
      --id-prefix ID_PREF   filter by id prefix (case insensitive)
240
      --user-name USER_NAME
241
                            filter by user name
242
      --name-like NAME_LIKE
243
                            print only if name contains this (case insensitive)
244
      --metadata-like META_LIKE
245
                            print only if in key=value, the value is part of
246
                            actual value
247
      --flavor-id FLAVOR_ID
248
                            filter by flavor id
249

  
250
    Details:
251
    Use filtering arguments (e.g. --name-like) to manage long server lists
227 252

  
228 253
.. _using-history-ref:
229 254

  
......
232 257

  
233 258
Kamaki command history is stored in a file at user home (".kamaki.history" by default). To set a custom history file path users must set the history.file config option (see `available config options <setup.html#editing-options>`_).
234 259

  
235
Every syntactically correct command is appended at the end of that file. In order to see how to use history, use the kamaki help system:
260
Every command is appended at the end of that file. In order to see how to use
261
history, use the kamaki help system:
236 262

  
237 263
.. code-block:: console
238 264
    :emphasize-lines: 1
......
271 297
Debug
272 298
"""""
273 299

  
274
In case of errors, kamaki in debug mode shows useful debug information, like
275
the stack trace. Kamaki in debug mode cancels suppression of warning messages.
300
When in debug mode, kamaki outputs some useful debug information (stack trace
301
and http logs). Kamaki in debug mode cancels suppression of warning messages.
302

  
303
To run kamaki in debug mode use the -d or --debug option.
304

  
305

  
306
Verbose
307
"""""""
308

  
309
Most kamaki commands are translated into http requests. Kamaki clients API
310
translated the semantics to REST and handles the response. Users who need to
311
have access to these commands can use the verbose mode that presents the HTTP
312
Request details as well as the full server response.
313

  
314
To run kamaki in verbose mode use the *-v/- - verbose* option
315

  
316
Verbose mode outputs the request and response mode, address and
317
headers as well as the size of the data block, if any. Sensitive information
318
(x-auth-token header and data body) are omitted by default,. Users who need
319
this information may enable it through the log_token and log_data configuration
320
options (see next section)
321

  
322
.. tip:: Use the -o runtime option to enable config options on the fly, e.g, to
323
    include http data:
324

  
325
    .. code-block:: console
326

  
327
        $ kamaki server list -v -o log_data=on
276 328

  
277
To run kamaki in debug mode use the -d or --debug option (can be combined with
278
any other parameters or options)
279 329

  
280 330
Logging
281 331
"""""""
282 332

  
283
Kamaki keeps its logs in a file specified as global.log_file and its value
284
defaults to ${HOME}/.kamaki.log . This value may change with a config setting::
333
Kamaki keeps its logs in a file specified by the *log_file* option and it
334
defaults to *${HOME}/.kamaki.log*. This configuration option can be modified::
285 335

  
286 336
    kamaki config set log_file /new/log/file/path
287 337

  
288
Kamaki logs mostly the http connection requests and responses, including http
289
methods, urls, parameters and headers. There is some special handling in two
290
cases:
338
Kamaki logs http request and response information, namely the method, URL,
339
headers and data size. Sensitive information (data and token header) are
340
omitted by default. There are some configuration options that can switch them
341
on, though:
291 342

  
292
* HTTP bodies are not logged by default
343
* HTTP data blocks are not logged by default
293 344
    to enable logging the full http bodies, set log_data to `on`::
294 345

  
295 346
        kamaki config set log_data on
......
315 366

  
316 367
        kamaki config delete log_token
317 368

  
318
Verbose and Include
319
"""""""""""""""""""
369
* The information (pid, name, date) of the processes that handle http requests
370
    is not logged by default, because if they are, logs are difficult to read.
371
    Still, they are useful for resolving race condition problems, so to enable
372
    logging proccess information::
320 373

  
321
Most kamaki commands are translated into http requests. Kamaki clients API
322
translated the semantics to REST and handles the response. Users who need to
323
have access to these commands can use the verbose mode that presents the HTTP
324
Request details as well as the full server response.
374
        kamaki config set log_pid on
375

  
376
    to disable it, set if to off::
325 377

  
326
To run kamaki in verbose mode use the -v or --verbose option
378
        kamaki config set log_pid off
379

  
380
    or delete it::
327 381

  
328
Be default, kamaki in verbose mode prints down only the headers and the address
329
information, thus hiding the data body of the request or response. To see the
330
data body, the -i option can be used.
382
        kamaki config delete log_pid
331 383

  
332 384
One-command features
333 385
^^^^^^^^^^^^^^^^^^^^
......
355 407
configuration file (it works even if the user has not set the optional
356 408
pithos_account config option).
357 409

  
410
.. tip:: There are better ways to list the contents of a container. Example
411
    3.4.1 is using this method for demonstration purposes only. The suggested
412
    method for listing container contents is *- - container=<container>*
413

  
358 414
Interactive shell
359 415
-----------------
360 416

  
......
364 420
The kamaki interactive shell implements the notion of command contexts. Each
365 421
command group is also a context where the users can **enter** by typing the
366 422
group name. If the context switch is successful, the kamaki shell prompt
367
changes to present the new context ("file" in example 4.1.1).
423
changes to present the new context ("*file*" in example 4.1.1).
368 424

  
369 425
.. code-block:: console
370 426
    :emphasize-lines: 1
371 427

  
372
    Example 4.1.1: Enter file commands context / group
428
    Example 4.1.1: Start kamaki and switch to file context
373 429

  
374 430

  
375 431
    $ kamaki
......
440 496

  
441 497
    * Show available commands in current context *
442 498
    [context]: help
499
    ...
443 500
    [context]: ?
501
    ...
444 502

  
445 503
    * Show help for command cmd *
446 504
    [context]: help cmd
505
    ...
447 506
    [context]: ?cmd
507
    ...
448 508

  
449 509
The context-level help results may change from context to context
450 510

  
......
458 518

  
459 519
    kamaki commands:
460 520
    ================
461
    user  config  flavor  history  image  network  server  file
521
    user  config  flavor  history  image  network  server  file ...
462 522

  
463 523
    interactive shell commands:
464 524
    ===========================
......
567 627
* the flavor id
568 628
* the image id
569 629

  
570
It is often the case that a user who works in the context command, needs to
571
create a new server, but hasn't selected a flavor or an image id, or cannot recall
572
the id of that flavor or image. Therefore, it is necessary to list all
573
available flavors (flavor-list) or images (image-compute-list). Both commands
574
belong to different contexts.
630
An average user would enter the server context and type *create -h* to check the
631
syntax of the command. In that point, it would be nice to have some easy way of
632
accessing the *flavor* and *image* contexts, to list and pick a flavor id and an
633
image id. This is achieved with the / notation, as demonstrated in the following
634
example:
575 635

  
576 636
.. code-block:: console
577 637
    :emphasize-lines: 1
......
608 668
.. code-block:: console
609 669
    :emphasize-lines: 1
610 670

  
611
    Example 4.3.2: Set a new token from file context
671
    Example 4.3.2: Token suddenly expires. Set a new token from file context
612 672

  
613 673

  
614 674
    [file]: list
......
630 690
    1.  pithos (10MB, 2 objects)
631 691
    2.  trash (0B, 0 objects)
632 692

  
633
.. note:: The error messages on this example where shortened for clarity.
634
    Actual kamaki error messages are more helpful and descriptive.
693
.. note:: The error messages on examples are shortened for clarity. Actual error
694
    messages are more helpful and descriptive.
635 695

  
636 696
The following example compares some equivalent calls that run
637 697
*user-authenticate* after a *file-list* 401 failure.
......
641 701

  
642 702
    Example 4.3.3: Equivalent user-authenticate calls after a file-list 401
643 703

  
644
    * without kamaki interactive shell *
704
    * I. without kamaki interactive shell *
645 705
    $ kamaki file list
646 706
    (401) UNAUTHORIZED Access denied
647 707
    $ kamaki user authenticate
648 708
    ...
649 709
    $
650 710

  
651
    * from top-level context *
711
    * II. from top-level context *
652 712
    [kamaki]: file list
653 713
    (401) UNAUTHORIZED Access denied
654 714
    [kamaki]: user authenticate
655 715
    ...
656 716
    [kamaki]
657 717

  
658
    * maximum typing *
718
    * III. maximum typing *
659 719
    [file]: list
660 720
    (401) UNAUTHORIZED Access denied
661 721
    [file]: exit
......
664 724
    ...
665 725
    [user]:
666 726

  
667
    * minimum typing *
727
    * IV. minimum typing *
668 728
    [file]: list
669 729
    (401) UNAUTHORIZED Access denied
670 730
    [file]: /user authenticate
......
677 737
^^^^^^^^^^^^
678 738

  
679 739
The configuration mechanism of kamaki is detailed in the
680
`setup section <setup.html>`_ and it is common for both interaction modes. In
681
specific, the configuration mechanism is implemented as a command group, namely
682
`config`. Using the config commands is as straightforward as any other kamaki
683
commands.
740
`setup section <setup.html>`_, it is accessible as *config* and it is common for
741
both interaction modes. In specific, the configuration mechanism is implemented
742
as  `config`. Using the config commands is as straightforward as in any other
743
group of commands.
684 744

  
685 745
It is often useful to set, delete or update a value. This can be managed either
686 746
inside the config context or from any command context by using the / prefix.
......
694 754

  
695 755
In example 4.4.1 the user is going to work with only one storage container. The
696 756
file commands use the container:path syntax, but if the user sets a container
697
name as default, the container name can be omitted. This is possible by setting
698
a *file.container* setting.
757
name as default, the container name can be omitted.
699 758

  
700 759
.. code-block:: console
701 760
    :emphasize-lines: 1
702 761

  
703
    Example 4.4.1: Set default storage container (cloud: default)
762
    Example 4.4.1: Set default storage container (cloud alias: default)
704 763

  
705 764

  
706 765
    [file]: list
707
    1.  mycontainer (32MB, 2 objects)
708
    2.  pithos (0B, 0 objects)
709
    3.  trash (2MB, 1 objects)
766
      mycontainer (32MB, 2 objects)
767
      pithos (0B, 0 objects)
768
      trash (2MB, 1 objects)
710 769

  
711 770
    [file]: list mycontainer
712
    1.  D mydir/
713
    2.  20M mydir/rndm_local.file
771
      D mydir/
772
      20M mydir/rndm_local.file
714 773
    
715 774
    [file]: /config set cloud.default.pithos_container mycontainer
716 775

  
717 776
    [file]: list
718
    1.  D mydir/
719
    2.  20M mydir/rndm_local.file
777
      D mydir/
778
      20M mydir/rndm_local.file
720 779

  
721 780
After a while, the user needs to work with multiple containers, therefore a
722 781
default container is no longer needed. The *pithos_container* setting can be
......
731 790
    [file]: /config delete cloud.default.pithos_container
732 791

  
733 792
    [file]: list
734
    1.  mycontainer (32MB, 2 objects)
735
    2.  pithos (0B, 0 objects)
736
    3.  trash (2MB, 1 objects)
793
      mycontainer (32MB, 2 objects)
794
      pithos (0B, 0 objects)
795
      trash (2MB, 1 objects)
737 796

  
738
Using history
797
History modes
739 798
^^^^^^^^^^^^^
740 799

  
741 800
There are two history modes: session and permanent. Session history keeps
......
744 803

  
745 804
Session history is only available in interactive shell mode. Users can iterate
746 805
through past commands in the same session with the ↑ and ↓ keys. Session
747
history is not stored, although syntactically correct commands are recorded
748
through the permanent history mechanism.
806
history is not stored, although commands are recorded through the permanent
807
history mechanism.
749 808

  
750 809
Permanent history is implemented as a command group and is common to both the
751
one-command and shell interfaces. In specific, every syntactically correct
752
command is appended in a history file (configured as `history_file` in
753
settings, see `setup section <setup.html>`_ for details). Commands executed in
754
one-command mode are mixed with the ones run in kamaki shell (also
755
see :ref:`using-history-ref` section on this guide).
810
one-command and shell interfaces. In specific, every command is appended in a
811
history file (configured as `history_file` in settings, see
812
`setup section <setup.html>`_ for details). Commands executed in one-command
813
mode are mixed with the ones run in kamaki shell (also see
814
:ref:`using-history-ref` section on this guide).
756 815

  
757 816
Scripting
758 817
^^^^^^^^^
......
767 826
.. code-block:: console
768 827
    :emphasize-lines: 1,12,19,32
769 828

  
770
    * Download mycontainer1:myfile and upload it to mycontainer2:myfile
829
    * Download mycontainer1:myfile and upload it to mycontainer2:myfile *
771 830
    [kamaki]: file
772 831
    [file]: copy mycontainer1:somefile mycontainer1:myfile
773 832
    [file]: download mycontainer1:myfile mylocalfile
833
    ...
774 834
    Download completed
775
    [file]: upload mylocalfile mycontainer2:myfile
835
    [file]: upload mylocalfile mycontainer2:myfile -f
836
    ...
776 837
    Upload completed
777 838

  
778 839
    * undo the process *
......
787 848
    1.  file
788 849
    2.  file copy mycontainer1:somefile mycontainer1:myfile
789 850
    3.  file download mycontainer1:myfile mylocalfile
790
    4.  file upload mylocalfile mycontainer2:myfile
851
    4.  file upload mylocalfile mycontainer2:myfile -f
791 852
    5.  file delete mycontainer1:myfile
792 853
    6.  file delete mycontainer2:myfile
793 854
    7.  history
......
805 866
scripting capabilities and combine them with kamaki one-command. Still, the
806 867
history-run functionality might prove handy in many occasions.
807 868

  
808
Tab completion
809
^^^^^^^^^^^^^^
810

  
811
Kamaki shell features tab completion for the first level of command terms of
812
the current context. Tab completion pool changes dynamically when the context
813
is switched. Currently, tab completion is not supported when / is used
814
(see :ref:`accessing-top-level-commands-ref` ).
815

  
816 869
OS Shell integration
817 870
^^^^^^^^^^^^^^^^^^^^
818 871

  
......
849 902

  
850 903
Kamaki shell commits command strings to the outside shell and prints the
851 904
results, without interacting with it. After a command is finished, kamaki shell
852
returns to its initial state, which involves the current directory, as show in
905
returns to its initial state, which involves the current directory, as shown in
853 906
example 4.8.2
854 907

  
855 908
.. code-block:: console
b/kamaki/cli/__init__.py
46 46

  
47 47
_help = False
48 48
_debug = False
49
_include = False
50 49
_verbose = False
51 50
_colors = False
52 51
kloger = None
......
174 173
#  Generic init auxiliary functions
175 174

  
176 175

  
177
def _setup_logging(silent=False, debug=False, verbose=False, include=False):
176
def _setup_logging(silent=False, debug=False, verbose=False):
178 177
    """handle logging for clients package"""
179 178

  
180 179
    if silent:
......
191 190
        logger.add_stream_logger('kamaki.clients.send', logging.INFO, sfmt)
192 191
        logger.add_stream_logger('kamaki.clients.recv', logging.INFO, rfmt)
193 192
        logger.add_stream_logger(__name__, logging.INFO)
194
    if include:
195
        logger.add_stream_logger('kamaki.clients.send', logging.INFO, sfmt)
196
        logger.add_stream_logger('kamaki.clients.recv', logging.INFO, rfmt)
197 193
    logger.add_stream_logger(__name__, logging.WARNING)
198 194
    global kloger
199 195
    kloger = logger.get_logger(__name__)
......
235 231
    _help = arguments['help'].value
236 232
    global _debug
237 233
    _debug = arguments['debug'].value
238
    global _include
239
    _include = arguments['include'].value
240 234
    global _verbose
241 235
    _verbose = arguments['verbose'].value
242 236
    _cnf = arguments['config']
243 237

  
244 238
    _silent = arguments['silent'].value
245
    _setup_logging(_silent, _debug, _verbose, _include)
239
    _setup_logging(_silent, _debug, _verbose)
246 240

  
247 241
    if _help or is_non_API:
248 242
        return None
b/kamaki/cli/argument/__init__.py
365 365
    cloud=ValueArgument('Chose a cloud to connect to', ('--cloud')),
366 366
    help=Argument(0, 'Show help message', ('-h', '--help')),
367 367
    debug=FlagArgument('Include debug output', ('-d', '--debug')),
368
    include=FlagArgument(
369
        'Include raw connection data in the output', ('-i', '--include')),
368
    #include=FlagArgument(
369
    #    'Include raw connection data in the output', ('-i', '--include')),
370 370
    silent=FlagArgument('Do not output anything', ('-s', '--silent')),
371 371
    verbose=FlagArgument('More info at response', ('-v', '--verbose')),
372 372
    version=VersionArgument('Print current version', ('-V', '--version')),
b/kamaki/cli/command_shell.py
169 169
    @staticmethod
170 170
    def _create_help_method(cmd_name, args, descr, syntax):
171 171
        tmp_args = dict(args)
172
        tmp_args.pop('options', None)
172
        #tmp_args.pop('options', None)
173 173
        tmp_args.pop('cloud', None)
174 174
        tmp_args.pop('debug', None)
175 175
        tmp_args.pop('verbose', None)
176
        tmp_args.pop('include', None)
177 176
        tmp_args.pop('silent', None)
178 177
        tmp_args.pop('config', None)
179 178
        help_parser = ArgumentParseManager(cmd_name, tmp_args)
b/kamaki/cli/commands/cyclades.py
135 135

  
136 136
@command(server_cmds)
137 137
class server_list(_init_cyclades, _optional_json, _name_filter, _id_filter):
138
    """List Virtual Machines accessible by user"""
138
    """List virtual servers accessible by user
139
    Use filtering arguments (e.g. --name-like) to manage long server lists
140
    """
139 141

  
140 142
    PERMANENTS = ('id', 'name')
141 143

  
142
    __doc__ += about_authentication
143

  
144 144
    arguments = dict(
145 145
        detail=FlagArgument('show detailed output', ('-l', '--details')),
146 146
        since=DateArgument(
b/kamaki/clients/cyclades/__init__.py
354 354

  
355 355
    def wait_network(
356 356
            self, net_id,
357
            current_status='LALA', delay=1, max_wait=100, wait_cb=None):
357
            current_status='PENDING', delay=1, max_wait=100, wait_cb=None):
358 358
        """Wait for network while its status is current_status
359 359

  
360 360
        :param net_id: integer (str or int)

Also available in: Unified diff