client.shared.software_manager: Make it less verbose

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
client.base_sysinfo: Use SoftwareManager instead of package

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
software_manager: Improving apt-file auto install

Use a simpler and more efficient way to trigger apt-file
installation.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
software_manager: Simplify base class

Instead of doing all delegations manually, we can just
bind __getattr__ to the backend's __getattr__ method.
Do this for all, except for install_what_provides, which
is really a common method.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
software_manager: Create BaseBackend

So we can move install_what_provides there and simplify
the SoftwareManager class.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
software_manager: Fix what-provides behavior

It must return in a consistent way with other methods.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
software_manager: Fix package manager version detection

Better to apply a regexp search in the version string
in order to get the actual version rather than the
full output of the programs --version flag.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
software_manager: Turn SoftwareManager into a lazily instantiated class

So we just instantiate it in case it's needed. Helps to
keep the default log messages of an autotest client run
with less output.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
software_manager: Add check-installed to list of actions

It was missing in the CLI part of the module.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
software_manager: Fix return of install_what_provides method

It must return True or False, just as similar methods.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
software_manager: Turn supported PM list into a module wide variable

Following the practices in other autotest modules.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
software_manager: Protect SoftwareManager public attribute access

This way we're safer from people accessing public
attributes of the class even though it is lazily
instantiated.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
software_manager: Print a better dbg message on list_all()

So rather than seeing things like 'running rpm -qa', the
user knows that all packages of the system are being
listed, and that it might take a while.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
virt.kvm_vm: Add sga device support

'sga' device is a type of ISA device, used to display via serial
console.

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
KVM Test: Add sub test seabios

This test is used for testing seabios.

Now it's only can check boot menu and boot order.

Chnages from V2:
 - Remove sub-function which gets the boot menu hint.

Changes from V1:
 - Add some comments why start guest in test script.
 - Put the config of 'boot_menu_key' in config file.
 - Raise an Exception when failed to get boot entry.

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
Fixing unittests broken by 62964b2

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
Add 27 tests for virsh_migrate.

Add 27 tests for virsh_migrate.

	1) Uni-direction migration with option --persistent.
	2) Uni-direction migration with option --undefinesource.
	3) Uni-direction migration with option --copy-storage-all.
	4) Uni-direction migration with option --copy-storage-inc.
	5) Uni-direction migration with option --change-protection.
	6) Uni-direction migration with option --verbose.
	7) Uni-direction migration with option --timeout.
	8) Uni-direction migration with option --migrateuri.
	9) Uni-direction migration with option --dname.
	10) Uni-direction migration with option --xml.
	11) Uni-direction migration with non-exist domain.
	12) Uni-direction migration without option --domain.
	13) Uni-direction migration with non-exist desturi.
	14) Uni-direction migration without option --desturi.
	15) Uni-direction migration with non-exist migrateuri.
	16) Uni-direction migration with an invalid timeout.
	17) Uni-direction migration with a very short timeout.
	18) Uni-direction offline migration with option --timeout.
	19) Uni-direction migration with an existing dname.
	20) Uni-direction migration with a non-existing xmlfile.
	21) Uni-direction offline migration.
	22) Uni-direction live migration with VM suspend.
	23) Uni-direction offline migration with VM suspend.
	24) Uni-direction live migration with VM shutdown.
	25) Uni-direction offline migration with VM shutdown.
	26) Uni-direction live migration with libvirtd stop.
	27) Uni-direction offline migration with libvirtd stop.

Signed-off-by: Tang Chen <tanchen@cn.fujitsu.com>
Improve virsh_migrate to support more tests.

Signed-off-by: Tang Chen <tanchen@cn.fujitsu.com>
Improve vm.migrate() to support error testing.

Signed-off-by: Tang Chen <tanchen@cn.fujitsu.com>
Add 3 API for libvirt_vm.

Add 3 API for libvirt_vm.

      1) vm.define()
      2) vm.attach_interface()
      3) vm.detach_interface()

Signed-off-by: Tang Chen <tanchen@cn.fujitsu.com>