autotest/tp-libvirt

Add library for hotplug related methods

Closed this issue · 1 comments

Currently we have multiple testcases uses repeated coding to manipulate data before and
after hotplug events, this library is mainly aimed to bring most of the common code in here as
generic methods.

E:g like below samples:-

is_hotplug supported(vm, mtype):
"""
return if hotplug supported in given machine type
"""

get_cpu_xmldata(vm_name, options):
"""
return all cpu related xml data from vm xml
"""

check_vcpucount(vm_name, count, options):
"""
Return True if vcpu count matches from different
libvirt API and guest
vcpucount
vcpuinfo
vcpupin
guestvcpus etc
"""