Revision 1710c921 src/onedb/onedb

View differences:

src/onedb/onedb
527 527
            * --id: object id, example: 156
528 528
            * --xpath: xpath expression, example: TEMPLATE[count(NIC)>1]
529 529
            * --expr: xpath expression, can use operators =, !=, <, >, <= or >=
530
                example: TEMPLATE/NIC/NIC_ID>0
530
                examples: UNAME=oneadmin, TEMPLATE/NIC/NIC_ID>0
531 531

  
532 532
        If you want to change a value use a third parameter. In case you want
533 533
        to delete it use --delete option.
534

  
535
        Change the second network of VMs that belong to "user":
536

  
537
            onedb change-body vm --expr UNAME=user \\
538
                '/VM/TEMPLATE/NIC[NETWORK="service"]/NETWORK' new_network
539

  
540
        Delete cache attribute in all disks, write xml, do not modify DB:
541

  
542
            onedb change-body vm '/VM/TEMPLATE/DISK/CACHE' --delete --dry
543

  
544
        Delete cache attribute in all disks in poweroff:
545

  
546
            onedb change-body vm --expr LCM_STATE=8 \\
547
                '/VM/TEMPLATE/DISK/CACHE' --delete
534 548
    EOT
535 549

  
536 550
    command :'change-body', change_body_desc, :object, :xpath, [:value, nil],

Also available in: Unified diff