virttest: Remove duplicate lines in qemu_vm

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
virttest.qemu_device: Make virtio-scsi-pci bus can support num_queues

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
virttest: Init old_redirs as a empty dict

Make the type of old_redirs and self.redirs the same. Otherwise
it will always failed in the check step and set up the self.devices
to None.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
virttest: Update nic command line in create when devices already exist

As we will skip the command update if vm object already have self.devices
in qemu_vm. We need manually update the fds and vhostfds for it when we
get them from host.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
virttest: Remove the special strings from sysfs of numa possible node

In some system the possible node information read from sysfs include some
special string as \x00 for end of the string. Need remove it as it will
failed the translate of string to int.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
virttest.qemu_vm: Support ctrl_mac_addr parameter in qemu command.

Signed-off-by: Feng Yang <fyang@redhat.com>
virt.share.cfg: Update macvtap_mac_change configure.

Signed-off-by: Feng Yang <fyang@redhat.com>
Docs: Update multi host migration instructions

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
test_setup: Restart polkitd for rule to take effect

After some research, we found that polkit rule will take 1 second to
take effct after change. This will cause some fail cases if interval
between checking access and writing rule are short enough.

yumingfei pointed out restart polkit service will force rules to take
effect.

Signed-off-by: Hao Liu <hliu@redhat.com>
virttest.virsh: Update snapshot_current function

Simplify the function to only return CmdResult instance, did not
handle cmd status in function, which will benefit for adding more
negatvie cases.

Signed-off-by: Wayne Sun <gsun@redhat.com>
libvirt_xml: Support guest panic dump

Signed-off-by: Yanbing Du <ydu@redhat.com>
utils_libguestfs: Add some new APIs
capability_xml: Add getter for power_management

Add a function to get a list contains all supported power management
methods.

Signed-off-by: Hao Liu <hliu@redhat.com>
utils_config: Add new class to manipulate config files

A set of classes to manipulate options of a libvirt related configure
files like `/etc/libvirt/libvirtd.conf` in a property's way.

Variables "__option_types__" and "conf_path" must be setup in the
inherented classes before use.

"__option_types__" is a dict contains every possible option as keys and
their type ("boolean", "int", "string", "float" or "list") as values.

Basic usage:
1) Create a config file object:
>>> config = LibvirtdConfig()

2) Set or update an option:
>>> config.listen_tcp = True
>>> config.listen_tcp = 1
>>> config.listen_tcp = "1" # All three have the same effect.

>>> # If the setting value don't meet the specified type.
>>> config.listen_tcp = "invalid"
>>> # It'll thown an warning message in log and set a raw string instead.

>>> # Use set_* methods when need to customize the result.
>>> config.set_raw("'1'")

3) Get an option:
>>> is_listening = config.listen_tcp
>>> print is_listening
True

4) Delete an option from the config file:
>>> del config.listen_tcp

5) Make the changes take effect in libvirt by restart libvirt daemon.
>>> config.sync()

6) Restore the content of the config file.
>>> config.restore()

Signed-off-by: Hao Liu <hliu@redhat.com>
Virsh.vcpupin: Let 'vcpu' and 'cpu_list' optional

Omit 'vcpu_list' to query given vcpu affinity, and omit both 'vcpu'
and 'cpu_list' to query all domain vcpu affinity.

Signed-off-by: Yanbing Du <ydu@redhat.com>
Merge pull request #1773 from will-Do/cpupin

Virsh.vcpupin: Let 'vcpu' and 'cpu_list' optional
Add uuid option in disk auth xml.
Fix a bug in create_disk_xml function.
Merge pull request #1689 from Hao-Liu/fix_polkit

test_setup: Restart polkitd for rule to take effect
Merge pull request #1761 from will-Do/vm_panic

libvirt_xml: Support guest panic dump