virttest.utils_conn: support more features

Signed-off-by: Alex Jia <chuanchang.jia@gmail.com>
virt.shared.cfg: Set mac_changeable to no in unattended_install.

Signed-off-by: Feng Yang <fyang@redhat.com>
virttest: Handle AttributeError exception in store_vm_register() function.

We may got following error when monitor not ready:
07/05 13:11:07 ERROR| threading:0545|   File "/usr/lib64/python2.6/threading.py", line 532, in __bootstrap_inner
07/05 13:11:07 ERROR| threading:0545|     self.run()
07/05 13:11:07 ERROR| threading:0545|   File "/usr/lib64/python2.6/threading.py", line 484, in run
07/05 13:11:07 ERROR| threading:0545|     self.__target(*self.__args, **self.__kwargs)
07/05 13:11:07 ERROR| threading:0545|   File "/usr/local/staf/test/RHEV/kvm/autotest-devel/client/tests/virt/virttest/env_process.py", line 1092, in _store_vm_register
07/05 13:11:07 ERROR| threading:0545|     stored_log = store_vm_register(vm, vr_filename)
07/05 13:11:07 ERROR| threading:0545|   File "/usr/local/staf/test/RHEV/kvm/autotest-devel/client/tests/virt/virttest/env_process.py", line 1052, in store_vm_register
07/05 13:11:07 ERROR| threading:0545|     output = vm.monitor.info('registers', debug=False)
07/05 13:11:07 ERROR| threading:0545| AttributeError: 'NoneType' object has no attribute 'info'

Signed-off-by: Feng Yang <fyang@redhat.com>
virttest.env_process: Use vm.instance in counter and vm_register_error_count in _store_vm_register()

Now we use vm.name in  counter and vm_register_error_count in _store_vm_register().
It could not work well in migration mode, which two vms have same name.

Signed-off-by: Feng Yang <fyang@redhat.com>
Small enhancements for libguestfs.

1.Default timeout for virt-inspect may be not enough.
2.Include hda type driver for finding disk.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
libvirt_xml.devices: Add slots for channel.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
standalone_test: Enable only filter when listing tests

Currently when running with option `--list-tests`, we can use `--no`
to remove some tests, but we can't apply an `only` filter.

With this modification, we can apply an `only` filter by running
```
./run -t libvirt --list-tests --tests virsh.domuuid
```
to list only the tests you needed.

Signed-off-by: Hao Liu <hliu@redhat.com>
Add more disk type support to create_local_disk; add create_scsi_disk function.
Use files in root directory to create iso disk.
utils_test.libvirt: Support discard for creating disk xml.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
utils_test.libguestfs: Fix path connection failure.

For guestmount path, we need to connect mountpoint with
provided path. Using abspath() to remove redundant '/'.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
virttest.libvirt_vm: Add function to get libvirt job's type.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
shared.scripts: Add a tool for setting 0 to memory.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
Add get_disk_attr function to vm_xml.
Merge pull request #1774 from rbian/disk-options

Add more disk type support to create_local_disk.
utils_test.libvirt: Robust method to create/delete local disk

Signed-off-by: Yanbing Du <ydu@redhat.com>
virttest.utils_libvirtd: support remotely control libvirtd

Signed-off-by: Alex Jia <chuanchang.jia@gmail.com>
vm_xml: Update seclabel functions to support multiple seclabels

Current functions only support one seclabel in domain xml, while
domain xml support at least two seclabels in domain xml, depend on
security drivers, our testing is focus on selinux and DAC.

e.g.
...
  <seclabel type='none' model='dac'/>
  <seclabel type='none' model='selinux'/>
...

so, modify set_seclabel and get_seclabel functions use list contains
dict member as parameter and return.

Signed-off-by: Wayne Sun <gsun@redhat.com>
libvirt_xml_unittest: Update unit test for seclabel

Signed-off-by: Wayne Sun <gsun@redhat.com>
virttest.utils_net: fixed clean IPv6 envrionment with error path

In order to avoid remote clean has effect on local then split local and
remote method to get IPv6 address list, and make sure the session is
alive w/o leaks.

Signed-off-by: Alex Jia <chuanchang.jia@gmail.com>