On 03/29/2013 02:32 PM, whuang wrote:
Sorry I did not consider old libvirt ,Should we need support the old libvirt ? it will need add a lot of check .... :<
maybe need another branch to support old version ?


Not a big deal. :)
If you just want to focus on new libvirt, it is ok.
But raise a TestNAError will be good for tester, because we still have some tests on RHEL5. And even on RHEL6.3, the libvirt version is v0.9.10(do not support --config).


On 28/03/13 19:31, Yu Mingfei wrote:
On 03/28/2013 06:04 PM, Yu Mingfei wrote:
+        cmd_options = "--force "
+        if os.system(cmd):
+            logging.error("Create update_iso_xml failed!")
+
+        if options == "--config" or start_vm == "no":
+            cmd_options += " --config"
+
+        #give domain the ISO image file
+        virsh.update_device(domainarg=vm_name, \
+ filearg=update_iso_xml, flagstr=cmd_options)

Aha, I know the reason now...
It seemed that you did not consider older libvirt.
I ran failed on v0.9.10 because 'update-device' do not support '--config'. :-(

v0.9.10
  NAME
    update-device - update device from an XML file

  SYNOPSIS
    update-device <domain> <file> [--persistent] [--force]

  DESCRIPTION
    Update device from an XML <file>.

  OPTIONS
    [--domain] <string>  domain name, id or uuid
    [--file] <string>  XML file
    --persistent     persist device update
    --force          force device update

v0.9.11
  NAME
    update-device - update device from an XML file

  SYNOPSIS
    update-device <domain> <file> [--config] [--force]

  DESCRIPTION
    Update device from an XML <file>.

  OPTIONS
    [--domain] <string>  domain name, id or uuid
    [--file] <string>  XML file
    --config         affect next boot
    --force          force device update

Thansk~
Yu

--
Best Regards
Yu Mingfei

_______________________________________________
Virt-test-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/virt-test-devel

Reply via email to