Hi Chris,

Referred to your comments for net_create tests, I think we can
do the job like following.

1. Construct the class inherit tree like the following.

LibvirtXML(XMLTreeFile)
  |
  |------VMXML(LibvirtXML)
  |        |
  |        |------VMInterfaceXML(VMXML)
  |        |------VMDiskXML(VMXML)
  |        |------VMControllerXML(VMXML)
  |        |------......
  |
  |------NetworkXML(LibvirtXML)
  |
  |------StorageXML(LibvirtXML)
  |
  |------......


2. Make VMXML object as a member of class VM in libvirt_vm.py.

   1) Remove all xml related function in class VM.
   2) Initialize VMXML object with dumpxml command when VM object
      is initialized.
   3) Modify all functions like vm.attach-interface() to update
      VMXML object when they modifise the vm's configuration.


How do you think about this?

I will raise an issue on github for this topic.

Thinks. :)

_______________________________________________
Autotest-kernel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/autotest-kernel

Reply via email to