virttest.qemu_devices: Use qid for hotplug verification

Proper identification in qemu_devices is object.get_qid().

Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>
qemu.tests.virtio_console: Update test_hotplug_virtio_pci

Fix the problem with duplicated IDs caused by early device_del execution.
Monitor returns no output but internally waits for OS ACPI respone. This
message, in case kernel is not yet initialized, never occurs.

This version resends the device_del in the first round until it succeeds,
than it just waits until the device disappears.

Additionally the test was rewritten to use qemu_devices to handle the
hotplug/unplug and the test cfg was tweaked to be more intensive.

Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>
Merge pull request #1206 from ldoktor/virtio_console

qemu.tests.virtio_console: Update test_hotplug_virtio_pci
PEP8 mass auto fix

Catching up with some problems found w.r.t. coding style

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
Merge pull request #1208 from autotest/pep8-fix

PEP8 mass auto fix
virsh_start: Need to ensure stopped before run

When run after virsh.shutdown, the first virsh.start was failing with
because the domain was already started.  Adjusted the .cfg file to
ensure setting of the 'kill_vm_before_test' in the status_error_no
variant.

Also, changed the error returned from using 'stdout' to 'stderr' so that
"Domain is already active" would be displayed.
virttest:virt_vm: Do not raise VMAddressVerificationError when SR-IOV card used

SR-IOV card may not in same subnet with the card used by host by
default. So arp check cannot work.
At this situation verify_ip_address_ownership will raise
VMAddressVerificationError even IP and mac match.
So do not raise VMAddressVerificationError when SR-IOV used.

Signed-off-by: Feng Yang <fyang@redhat.com>
virttest.test_setup: Update the re used to filter eth name in host.

Signed-off-by: Feng Yang <fyang@redhat.com>
virttest.qemu_vm: Only use B:D.F format as pci_id when add VF/PF to VM

RHEL 6 guest do not support domain name when add VF/PF to VM.

Following command will raise error:
pci-assign,host=<domain>:<bus>:<slot>.<func>

Signed-off-by: Feng Yang <fyang@redhat.com>
virttest.test_setup: Remove commands module.

Python in my local pc will get following error:
>>> import commands
>>> commands.getstatus("lsmod | grep igb")
'ls: cannot access lsmod | grep igb: No such file or directory'
>>>

python version is Python 2.7.5 (default, Aug 20 2013, 06:42:55)

So remove commands module and use utils.system instead.

Signed-off-by: Feng Yang <fyang@redhat.com>
virttest.utils_net: Make update_mac_ip_address works in more linux guest.

ifconfig output is different among linux guest.

In rhel6 guest:
switch    Link encap:Ethernet  HWaddr 00:23:AE:8F:50:B4
          inet addr:10.66.8.107  Bcast:10.66.11.255  Mask:255.255.252.0
          inet6 addr: 1111:2222:3333:4444:5555:6666:7777:8889/64 Scope:Global
          inet6 addr: fe80::223:aeff:fe8f:50b4/64 Scope:Link

In other guest:
switch: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 10.66.73.190  netmask 255.255.254.0  broadcast 10.66.73.255
        inet6 fe80::4f4:dff:fee8:a4ba  prefixlen 64  scopeid 0x20<link>
        ether 06:f4:0d:e8:a4:ba  txqueuelen 1000  (Ethernet)

So we need update the way used to filter mac and ip from ifconfig output.

Signed-off-by: Feng Yang <fyang@redhat.com>
qemu.tests.sr_iov_hotplug: Make driver parameter configurable.

Signed-off-by: Feng Yang <fyang@redhat.com>