Revision 92e089e4 docs/collection_of_examples/listing.rst

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]:

Also available in: Unified diff