Revision 9e5341f5

b/docs/collection_of_examples/examples.rst
1
Examples
2
========
3

  
4
This section contains a collection of the most common operations with kamaki.
5

  
6
.. note:: all examples bellow use `bash` in a linux enviroment, but they can be
7
    replicated in a reasonable command line shell in any popular platform.
8

  
9
Configuration
10
-------------
11

  
12
Since kamaki 0.9, the format of the configuration file has changed. In this
13
scenario, we have an old configuration file at ${HOME}/.kamakirc that we need
14
to convert. We also create a new one from scratch. In both cases, we have to
15
set up one or more clouds in a single configuration and we also examine a case
16
of multiple configurations.
17

  
18
Convert old configuration file
19
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
20

  
21
First, back up the old file
22

  
23
.. code-block:: console
24

  
25
    $ cp ~/.kamakirc ~/backups/.kamakirc
26

  
27
Now, let kamaki do the conversion
28

  
29
.. code-block:: console
30

  
31
    $ kamaki user authenticate
32
    . Config file format version >= 9.0 is required
33
    . Configuration file: /home/someuser/.kamakirc
34
    . Attempting to fix this:
35
    . Calculating changes while preserving information
36
    . ... rescue global.token => cloud.default.token
37
    . ... rescue user.cli => global.user_cli
38
    . ... rescue network.cli => global.network_cli
39
    . ... rescue file.cli => global.file_cli
40
    . ... rescue flavor.cli => global.flavor_cli
41
    . ... rescue config.cli => global.config_cli
42
    . ... rescue image.cli => global.image_cli
43
    . ... rescue server.cli => global.server_cli
44
    . ... rescue history.file => global.history_file
45
    . ... rescue history.cli => global.history_cli
46
    . ... DONE
47
    . The following information will NOT be preserved:
48
    .     global.account = AccountName
49
    .     user.url = https://accounts.example.com
50
    .     user.account = UserAccountName
51
    .     compute.url = https://cyclades.example.com/api/v1.1
52
    .     file.url = https://pithos.example.com/v1
53
    .     image.url = https://cyclades.example.com/plankton
54
    .     store.account = OldForgotenAccountName
55
    . Kamaki is ready to convert the config file
56
    . Create (overwrite) file .kamakirc.okeanos ? [y/N]
57
    .
58
    <y is pressed>
59
    .
60
    . No cloud "default" is configured
61
    . |  To configure a new cloud "default", find and set the
62
    . |  single authentication URL and token:
63
    . |    kamaki config set cloud.default.url <URL>
64
    . |    kamaki config set cloud.default.token <t0k3n>
65
    $
66

  
67
.. warning:: A new cloud configuration with the name "default" is created. The
68
    global token that was set in the old configuration file, is preserved as
69
    the token of the "default" cloud. Still, kamaki needs a url for the cloud
70
    and it encourages you to reset the token as well.
71

  
72
.. note:: Some options are discarded. Among them, are the service urls, like
73
    user.url, compute.url, image.url and file.url . These settings are obsolete
74
    since Synnefo 0.14 and kamaki 0.9 so you do not need to recover them. The
75
    same is true for user accounts (retrieved automatically)
76

  
77
.. note:: You can safely remove the global.XXX_cli options from kamaki
78
    configuration file. Kamaki can automatically resolve the default values for
79
    these internal options. These options are usefull when overloading the
80
    default command behaviors, but are not needed otherwise.
81

  
82
Attempt to create a new configuration
83
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
84

  
85
Ask kamaki to load from a non-existing configuration file
86

  
87
.. code-block:: console
88

  
89
    $ kamaki -c nonexisting.cnf user authenticate
90
    . No cloud is configured
91
    . |  To configure a new cloud "<cloud name>", find and set the
92
    . |  single authentication URL and token:
93
    . |    kamaki config set cloud.<cloud name>.url <URL>
94
    . |    kamaki config set cloud.<cloud name>.token <t0k3n>
95
    $ ls -l nonexisting.cnf
96
    . ls: cannot access nonexisting.cnf: No such file or directory
97
    $
98

  
99
.. note:: configuration file is not created, but it will be when we set the
100
    first configuration value in it, as shown in the following subsection.
101

  
102
Configure a cloud and create a new configuration
103
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
104

  
105
Set the URL for new cloud "mytest"
106

  
107
.. code-block:: console
108

  
109
    $ kamaki -c nonexisting.cnf config set cloud.mytest.url https://accounts.example.com/identity/v2.0/
110

  
111
Try to connect
112

  
113
.. code-block:: console
114

  
115
    $ kamaki -c nonexisting.cnf user authenticate
116
    . No authentication token provided for cloud "mytest"
117
    . |  Set a token for cloud mytest:
118
    . |    kamaki config set cloud.mytest.token <token>
119

  
120
Set token to cloud "mytest"
121

  
122
.. code-block:: console
123

  
124
    $ kamaki -c nonexisting.cnf config set cloud.mytest.token myt35t70k3n==
125

  
126
Check that the file is created, everything is set up correctly and working
127

  
128
.. code-block:: console
129

  
130
    $ ls -l nonexisting.cnf
131
    . -rw------- 1 someuser someuser 491 Jun 17 13:39 nonexisting.cnf
132
    $ kamaki -c nonexisting.cnf config get cloud
133
    . cloud.mytest.url = https://accounts.example.com/identity/v2.0/
134
    . cloud.mytest.token = myt35t70k3n==
135
    $ kamaki -c nonexisting.cnf user autenticate
136
    . ...
137
    . user:          
138
    .     id:          s0me-3x4mp13-u53r-1d
139
    .     name:        Some User
140
    .     roles:      
141
    .          id:   1
142
    .          name: default
143
    .     roles_links:
144
    $
145

  
146
Failed or incomplete cloud configurations
147
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
148

  
149
Now let kamaki use the default configuration ( ${HOME}/.kamakirc ). Let the old
150
token be `my0ld70k3n==` and let it be invalid.
151

  
152
Check for clouds and attempt to authenticate
153

  
154
.. code-block:: console
155

  
156
    $ kamaki config get cloud
157
    . cloud.default.token = my0ld70k3n==
158
    $ kamaki user authenticate
159
    . No authentication URL provided for cloud "mytest"
160
    . |  Set a URL for cloud mytest:
161
    . |    kamaki config set cloud.mytest.url <URL>
162
    $
163

  
164
Set a non-existing URL for cloud.default and attempt authentication
165

  
166
.. code-block:: console
167

  
168
    $ kamaki config set cloud.default.url https://nonexisting.example.com
169
    $ kamaki user authenticate
170
    . Failed while http-connecting to https://nonexisting.example.com
171
    $
172

  
173
Set the URL from the previous example and attempt authentication
174

  
175
.. code-block:: console
176

  
177
    $ kamaki config set cloud.default.url https://accounts.example.com/identity/v2.0/
178
    $ kamaki user authenticate
179
    . (401) Authorization failed for token gZH99orgkfYHmGksZKvHJw==
180
    . |  UNAUTHORIZED unauthorized (Invalid token)
181
    $
182

  
183
After some searching at the deployments UI, you found out that the URL/token
184
pair you need is::
185

  
186
    URL: https://accounts.deploymentexample.com/identity/v2.0
187
    TOKEN: myd3pl0ym3nt70k3n==
188

  
189
Set up the correct values and attempt authentication
190

  
191
.. code-block:: console
192

  
193
    $ kamaki config set cloud.default.url https://accounts.deploymentexample.com/identity/v2.0
194
    $ kamaki config set cloud.default.token myd3pl0ym3nt70k3n==
195
    $ kamaki user authenticate
196
    . ...
197
    . user:
198
    .     id: my-d3pl0ym3nt-u53r-1d
199
    .     name: Example Username
200
    $
201

  
202
Multiple clouds in a single configuration
203
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
204

  
205
We now have two configurations::
206

  
207
    Configuration file: ${HOME}/.kamakirc    (default)
208
      Clouds:
209
        ALIAS: default
210
        URL: https://accounts.deploymentexample.com/identity/v2.0
211
        TOKEN: myd3pl0ym3nt70k3n==
212

  
213
    Copnfiguration file: nonexisting.cnf
214
      Clouds:
215
        ALIAS: mytest
216
        URL: https://accounts.example.com/identity/v2.0/
217
        TOKEN: myt35t70k3n==
218

  
219
As we can see, the default configuration handles only one cloud, aliased as
220
"default". We will add the second cloud as well.
221

  
222
.. code-block:: console
223

  
224
    $ kamaki config set cloud.mytest.url https://accounts.example.com/identity/v2.0/
225
    $ kamaki config set cloud.mytest.token myt35t70k3n==
226
    $
227

  
228
Check all clouds
229

  
230
.. code-block:: console
231

  
232
    $ kamaki config get cloud
233
    . cloud.default.url = https://accounts.deploymentexample.com/identity/v2.0/
234
    . cloud.default.token = myd3pl0ym3nt70k3n==
235
    . cloud.mytest.url = https://accounts.example.com/identity/v2.0/
236
    . cloud.mytest.token = myt35t70k3n==
237
    $
238

  
239
Check if kamaki knows one of the clouds to be the default
240

  
241
.. code-block:: console
242

  
243
    $ kamaki config get default_cloud
244
    . default
245
    $
246

  
247
Authenticate against different clouds
248

  
249
.. code-block:: console
250

  
251
    $ kamaki user authenticate
252
    . ...
253
    . <response from deploymentexample.com>
254
    . ...
255
    $ kamaki --cloud=mytest user authenticate
256
    . ...
257
    . <response from example.com>
258
    . ...
259
    $ kamaki --cloud=default user authenticate
260
    . ...
261
    . <response from deploymentexample.com, same as default behavior>
262
    . ...
263
    $ kamaki --cloud=nonexistingcloud user authenticate
264
    . No cloud "nonexistingcloud" is configured
265
    . |  To configure a new cloud "nonexistingcloud", find and set the
266
    . |  single authentication URL and token:
267
    . |    kamaki config set cloud.nonexistingcloud.url <URL>
268
    . |    kamaki config set cloud.nonexistingcloud.token <t0k3n>
269
    $
270

  
271
Confuse kamaki by removing the default_cloud option, set mytest as default
272

  
273
.. code-block:: console
274

  
275
    $ kamaki config delete default_cloud
276
    $ kamaki user authenticate
277
    . Found 2 clouds but none of them is set as default
278
    . |  Please, choose one of the following cloud names:
279
    . |  default, mytest
280
    . |  To set a default cloud:
281
    . |    kamaki config set default_cloud <cloud name>
282
    $ kamaki config set default_cloud mytest
283
    $ kamaki user authenticate
284
    . ...
285
    . <response from example.com>
286
    . ...
287
    $
288

  
289
`Question`: What will happen if the "default" cloud alias **and** the
290
default_cloud option are removed?
291

  
292
.. code-block:: console
293

  
294
    $ kamaki config delete cloud.default
295
    $ kamaki config delete default_cloud
296
    $ kamaki user authenticate
297
    . ...
298
    . <response from example.com>
299
    . ...
300
    $
301

  
302
`Answer`: kamaki doesn't have a default_cloud option, but there is only one
303
cloud configuration (`mytest`), therefore there is no ambiguity in resolving
304
the default cloud.
305

  
306
Multiple configurations
307
^^^^^^^^^^^^^^^^^^^^^^^
308

  
309
In the following example, a user wants to experiment with upload and download
310
for different number of threads. The plan is to contuct a set of tests with 3
311
threads at most and another one with 5. All experiments will be run against the
312
same Synnefo cloud (the "mytest" cloud from the previous example).
313

  
314
Let's create the 3-threaded configuration first
315

  
316
.. code-block:: console
317

  
318
    $ kamaki -c 3thread config set cloud.test.url https://accounts.example.com/identity/v2.0/
319
    $ kamaki -c 3thread config set cloud.test.token myt35t70k3n==
320
    $
321

  
322
Let's set the max_thread option to 3 as well as a seperate file for logs.
323

  
324
.. code-block:: console
325

  
326
    $ kamaki -c 3thread config set max_thread 3
327
    $ kamaki -c 3thread config log_file ./logs/kamaki.3threads.log
328
    $
329

  
330
Now, let's create the 5-threaded configuration by modifying a copy of 3thread
331

  
332
.. code-block:: console
333

  
334
    $ cp 3thread 5thread
335
    $ kamaki -c 5thread config set max_thread 5
336
    $ kamaki -c 5thread config log_file ./logs/kamaki.5threads.log
337
    $
338

  
339
Use kamaki to upload with 3 threads and 5 threads respectively
340

  
341
.. code-block:: console
342

  
343
    $ kamaki -c 3thread file upload testfiles/test1 testcontainer
344
    $ kamaki -c 5thread file upload testfiles/test1 testcontainer
345
    $
346

  
347
List
348
----
349

  
350
Simple listing
351
^^^^^^^^^^^^^^
352

  
353
Detailed listing
354
^^^^^^^^^^^^^^^^
355

  
356
Filtered listing
357
^^^^^^^^^^^^^^^^
358

  
359 1
Upload and download
360 2
-------------------
361 3

  
b/docs/collection_of_examples/listing.rst
67 67
    [kamaki]: server list
68 68
    4201 example server 1
69 69
    4202 example server 2
70
    4203 example server 3
71
    4204 example server 4
72
    4205 example server 5
73
    4206 example server 6
70 74

  
71 75
List networks
72 76

  
......
91 95
.. code-block:: console
92 96

  
93 97
    [kamaki]: image list
94
    cde9858c-0656-4da1-8cbd-33481b29a8bd Debian Base
98
    f1r57-1m4g3-1d Debian Base Alpha
95 99
    .container_format: bare
96 100
    .disk_format:      diskdump
97 101
    .size:             474066944
98 102
    .status:           available
99
    a5ca5997-c580-4d62-b012-05c5329f8e2d Debian Base
103
    53c0nd-1m4g3-1d Beta Debian Base
100 104
    .container_format: bare
101 105
    .disk_format:      diskdump
102 106
    .size:             474066944
103 107
    .status:           available
104 108
    [kamaki]: image compute list
105
    a5ca5997-c580-4d62-b012-05c5329f8e2d Debian Base
106
    cde9858c-0656-4da1-8cbd-33481b29a8bd Debian Base
109
    f1r57-1m4g3-1d Debian Base Alpha
110
    53c0nd-1m4g3-1d Beta Debian Base
107 111
    [kamaki]:
108 112

  
109 113
Detailed pithos listing
110 114
-----------------------
111 115

  
112
List pithos containers with details
116
Enter contect
113 117

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

  
116 120
    [kamaki]: file
121
    [file]:
122

  
123
List pithos containers with details
124

  
125
.. code-block:: console
126

  
117 127
    [file]: list -l
118 128
    pithos
119 129
    bytes:    0 (0B)
......
223 233
    version:   1083
224 234
    [kamaki]:
225 235

  
226
List only videos and exit "file" context
236
List only objects starting with "video" and exit "file" context
227 237

  
228 238
.. code-block:: console
229 239

  
......
257 267
    type:      video/mpeg
258 268
    uuid:      4195e8c3-9b9a-4e97-8c20-fdfef34892fe
259 269
    version:   1083
270

  
271

  
272
Exit context
273

  
274
.. code-block:: console
275

  
276
    [file]: exit
277
    [kamaki]:
278

  
279
Detailed Server Listing
280
-----------------------
281

  
282
Enter context
283

  
284
.. code-block:: console
285

  
286
    [kamaki]: server
287
    [server]:
288

  
289
List only 3, then list three by three, all with enumeration
290

  
291
.. code-block:: console
292

  
293
    [server]: list -n 3 --enumerate
294
    1. 4201 example server 1
295
    2. 4202 example server 2
296
    3. 4203 example server 3
297
    4. 4204 example server 4
298
    5. 4205 example server 5
299
    6. 4206 example server 6
300
    [server]: list -n 3 --more --enumerate
301
    1. 4201 example server 1
302
    2. 4202 example server 2
303
    3. 4203 example server 3
304
    (3 listed - 3 more - "enter" to continue)
305
    <press "enter">
306
    4. 4204 example server 4
307
    5. 4205 example server 5
308
    6. 4206 example server 6
309
    [server]:
310

  
311
Get json output returned by the compute API server (only first two VMs)
312

  
313
.. code-block:: console
314

  
315
    [server]: list -j -n 2
316
    [
317
        {
318
            "name": "example server 1", 
319
            "links": [
320
              {
321
                "href": "https://example.com/compute/v2.0/servers/4201",
322
                "rel": "self"
323
              }, 
324
              {
325
                "href": "https://example.com/compute/v2.0/servers/4201",
326
                "rel": "bookmark"
327
              }
328
            ], 
329
            "id": 4201
330
          },
331
          {
332
            "name": "example server 2", 
333
            "links": [
334
              {
335
                "href": "https://example.com/compute/v2.0/servers/4202",
336
                "rel": "self"
337
              }, 
338
              {
339
                "href": "https://example.com/compute/v2.0/servers/4202",
340
                "rel": "bookmark"
341
              }
342
            ], 
343
            "id": 4202
344
          }
345
    ]
346
    [server]:
347

  
348
Server details (first two only)
349

  
350
.. code-block:: console
351

  
352
    [server]: list -l -n 2
353
    4201 my example server 1
354
        accessIPv4:      
355
        accessIPv6:      
356
        addresses:      
357
                    42:
358
                           OS-EXT-IPS:type: fixed
359
                           addr:            192.168.12.4
360
                           version:         4
361
                        . . . . . . .
362
                           OS-EXT-IPS:type: fixed
363
                           addr:            2001:648:2ffc:1222:a800:2ff:fee3:49f1
364
                           version:         6
365
        attachments:    
366
                       firewallProfile: DISABLED
367
                       id:              nic-37231-0
368
                       ipv4:            192.168.12.4
369
                       ipv6:            2001:648:2ffc:1222:a800:2ff:fee3:49f1
370
                       mac_address:     aa:00:02:e3:49:f8
371
                       network_id:      4161
372
        config_drive:    
373
        created:         2013-05-11T18:03:41.471605+00:00
374
        diagnostics:    
375
                       created:     2013-05-11T18:04:23.298132+00:00
376
                       details:     None
377
                       level:       DEBUG
378
                       message:     Image customization finished successfully.
379
                       source:      image-info
380
                       source_date: 2013-05-11T18:04:23.286869+00:00
381
        flavor:         
382
                    id:    1
383
                    links:
384
                            href: https://example.com/compute/v2.0/flavors/1
385
                            rel:  bookmark
386
                         . . . . . . .
387
                            href: https://example.com/compute/v2.0/flavors/1
388
                            rel:  self
389
        hostId:          
390
        image:          
391
                    id:    f1r57-1m4g3-1d
392
                    links:
393
                            href: https://example.com/compute/v2.0/images/f1r57-1m4g3-1d
394
                            rel:  bookmark
395
                         . . . . . . .
396
                            href: https://example.com/compute/v2.0/images/f1r57-1m4g3-1d
397
                            rel:  self
398
                         . . . . . . .
399
                            href: https:/example.com/image/v1.0/images/f1r57-1m4g3-1d
400
                            rel:  alternate
401
        key_name:        None
402
        links:          
403
                       href: https://example.com/compute/v2.0/servers/4201
404
                       rel:  bookmark
405
                    . . . . . . .
406
                       href: https://example.com/compute/v2.0/servers/4201
407
                       rel:  self
408
        metadata:       
409
                    os:    ubuntu
410
                    users: user
411
        progress:        100
412
        security_groups:
413
                       name: default
414
        status:          ACTIVE
415
        suspended:       False
416
        tenant_id:       s0m3-u53r-1d
417
        updated:         2013-06-17T07:57:50.054550+00:00
418
        user_id:         s0m3-u53r-1d
419
    4202 my example server 2
420
        accessIPv4:      
421
        accessIPv6:      
422
        addresses:      
423
                    42:
424
                           OS-EXT-IPS:type: fixed
425
                           addr:            192.168.12.4
426
                           version:         4
427
                        . . . . . . .
428
                           OS-EXT-IPS:type: fixed
429
                           addr:            2002:648:2ffc:1222:a800:2ff:fee3:49f1
430
                           version:         6
431
        attachments:    
432
                       firewallProfile: DISABLED
433
                       id:              nic-37231-0
434
                       ipv4:            192.168.12.4
435
                       ipv6:            2002:648:2ffc:1222:a800:2ff:fee3:49f1
436
                       mac_address:     aa:00:02:e3:49:f8
437
                       network_id:      42
438
        config_drive:    
439
        created:         2013-05-11T18:03:41.471605+00:00
440
        diagnostics:    
441
                       created:     2013-05-11T18:04:23.298132+00:00
442
                       details:     None
443
                       level:       DEBUG
444
                       message:     Image customization finished successfully.
445
                       source:      image-info
446
                       source_date: 2013-05-11T18:04:23.286869+00:00
447
        flavor:         
448
                    id:    2
449
                    links:
450
                            href: https://example.com/compute/v2.0/flavors/2
451
                            rel:  bookmark
452
                         . . . . . . .
453
                            href: https://example.com/compute/v2.0/flavors/2
454
                            rel:  self
455
        hostId:          
456
        image:          
457
                    id:    53c0nd-1m4g3-1d
458
                    links:
459
                            href: https://example.com/compute/v2.0/images/53c0nd-1m4g3-1d
460
                            rel:  bookmark
461
                         . . . . . . .
462
                            href: https://example.com/compute/v2.0/images/53c0nd-1m4g3-1d
463
                            rel:  self
464
                         . . . . . . .
465
                            href: https:/example.com/image/v1.0/images/53c0nd-1m4g3-1d
466
                            rel:  alternate
467
        key_name:        None
468
        links:          
469
                       href: https://example.com/compute/v2.0/servers/4202
470
                       rel:  bookmark
471
                    . . . . . . .
472
                       href: https://example.com/compute/v2.0/servers/4202
473
                       rel:  self
474
        metadata:       
475
                    os:    ubuntu
476
                    users: user
477
        progress:        100
478
        security_groups:
479
                       name: default
480
        status:          ACTIVE
481
        suspended:       False
482
        tenant_id:       s0m3-u53r-1d
483
        updated:         2013-06-17T07:57:50.054550+00:00
484
        user_id:         s0m3-u53r-1d
485
    [server]:
486

  
487
Exit context
488

  
489
.. code-block:: console
490

  
491
    [server]: exit
492
    [kamaki]:
493

  
494
.. note:: `network` and `flavor list` behave in the same way as `server list`
495

  
496
Detailed image listing
497
----------------------
498

  
499
Enter context
500

  
501
.. code-block:: console
502

  
503
    [kamaki]: image
504
    [image]:
505

  
506
Detailed listing
507

  
508
.. code-block:: console
509

  
510
    [image]: list -l
511
    f1r57-1m4g3-1d Debian Base Alpha
512
        checksum:         9344d77620cde1dd77da556e5f72ed4de8533931f86c857b70badda34b26d782
513
        container_format: bare
514
        created_at:       2013-06-03 16:44:16
515
        deleted_at:       
516
        disk_format:      diskdump
517
        is_public:        True
518
        location:         pithos://s0m3-u53r-1d/pithos/debian_base1.diskdump
519
        owner:            s0m3-u53r-1d
520
        properties:      
521
                    description:    Debian 6.0.6 (Squeeze) Base System
522
                    gui:            No GUI
523
                    kernel:         2.6.32
524
                    os:             debian
525
                    osfamily:       linux
526
                    root_partition: 1
527
                    sortorder:      1
528
                    users:          root
529
        size:             474066944
530
        status:           available
531
        updated_at:       2013-06-03 16:44:16
532
    53c0nd-1m4g3-1d Beta Debian Base
533
        checksum:         9344d77620cde1dd77da556e5f72ed4de8533931f86c857b70badda34b26d782
534
        container_format: bare
535
        created_at:       2013-06-03 16:44:16
536
        deleted_at:       
537
        disk_format:      diskdump
538
        is_public:        True
539
        location:         pithos://s0m3-u53r-1d/pithos/debian_base2.diskdump
540
        owner:            s0m3-u53r-1d
541
        properties:      
542
                    description:    Debian 6.0.6 (Squeeze) Base System
543
                    gui:            No GUI
544
                    kernel:         2.6.32
545
                    os:             debian
546
                    osfamily:       linux
547
                    root_partition: 1
548
                    sortorder:      1
549
                    users:          root
550
        size:             474066944
551
        status:           available
552
        updated_at:       2013-06-03 16:44:16
553
    [image]: compute list
554
    f1r57-1m4g3-1d Debian Base Alpha
555
        created:   2013-06-03T16:21:53+00:00
556
        links:    
557
             href: https://example.com/cyclades/compute/v2.0/images/f1r57-1m4g3-1d
558
             rel:  bookmark
559
          . . . . . . .
560
             href: https://example.com/cyclades/compute/v2.0/images/f1r57-1m4g3-1d
561
             rel:  self
562
          . . . . . . .
563
             href: https://example.com/cyclades/image/v1.0/images/f1r57-1m4g3-1d
564
             rel:  alternate
565
        metadata: 
566
          description:    Debian 6.0.6 (Squeeze) Base System
567
          gui:            No GUI
568
          kernel:         2.6.32
569
          os:             debian
570
          osfamily:       linux
571
          root_partition: 1
572
          sortorder:      1
573
          users:          root
574
        progress:  100
575
        status:    ACTIVE
576
        tenant_id: s0m3-u53r-1d
577
        updated:   2013-06-03T16:21:53+00:00
578
        user_id:   s0m3-u53r-1d
579
    53c0nd-1m4g3-1d Beta Debian Base
580
        created:   2013-06-03T16:21:53+00:00
581
        links:    
582
             href: https://example.com/cyclades/compute/v2.0/images/53c0nd-1m4g3-1d
583
             rel:  bookmark
584
          . . . . . . .
585
             href: https://example.com/cyclades/compute/v2.0/images/53c0nd-1m4g3-1d
586
             rel:  self
587
          . . . . . . .
588
             href: https://example.com/cyclades/image/v1.0/images/53c0nd-1m4g3-1d
589
             rel:  alternate
590
        metadata: 
591
          description:    Debian 6.0.6 (Squeeze) Base System
592
          gui:            No GUI
593
          kernel:         2.6.32
594
          os:             debian
595
          osfamily:       linux
596
          root_partition: 1
597
          sortorder:      1
598
          users:          root
599
        progress:  100
600
        status:    ACTIVE
601
        tenant_id: s0m3-u53r-1d
602
        updated:   2013-06-03T16:21:53+00:00
603
        user_id:   s0m3-u53r-1d
604
    [image]:
605

  
606
Filter listing by prefix, suffix or words in image names
607

  
608
.. code-block:: console
609

  
610
    [image]: list --name-prefix=Debian
611
    f1r57-1m4g3-1d Debian Base Alpha
612
    [image]: list --name-suffix=Base
613
    53c0nd-1m4g3-1d Beta Debian Base
614
    [image]: list --name-like=Alpha
615
    f1r57-1m4g3-1d Debian Base Alpha
616
    [image]: list --name-like=Beta
617
    53c0nd-1m4g3-1d Beta Debian Base
618
    [image]: list --name-like="Debian Base"
619
    f1r57-1m4g3-1d Debian Base Alpha
620
    53c0nd-1m4g3-1d Beta Debian Base
621
    [image]:
622

  
623
Filter by owner and container format
624

  
625
.. code-block:: console
626

  
627
    [image]: list --owner=s0m3-u53r-1d
628
    f1r57-1m4g3-1d Debian Base Alpha
629
    53c0nd-1m4g3-1d Beta Debian Base
630
    [image]: list --container-format=bare
631
    f1r57-1m4g3-1d Debian Base Alpha
632
    53c0nd-1m4g3-1d Beta Debian Base
633
    [image]:
634

  
635
Exit context:
636

  
637
.. code-block:: console
638

  
639
    [image]: exit
260 640
    [kamaki]:
b/kamaki/cli/commands/cyclades.py
53 53

  
54 54
about_authentication = '\nUser Authentication:\
55 55
    \n* to check authentication: /user authenticate\
56
    \n* to set authentication token: /config set cloud.default.token <token>'
56
    \n* to set authentication token: /config set cloud.<cloud>.token <token>'
57 57

  
58 58
howto_personality = [
59 59
    'Defines a file to be injected to VMs personality.',

Also available in: Unified diff