virttest: Call utils_net.update_mac_ip_address() in vm.create() when mac_changeable set to yes

Sometime we directly call vm.create() to create a VM. mac_changeable could not work
in this situation. As it only used in qemu test so move utils_net.update_mac_ip_address()
to vm.create() function.

If other test need support mac_changeable later, we can call  update_mac_ip_address
in its start() function.

Signed-off-by: Feng Yang <fyang@redhat.com>
virttest.staging.service: Introduce a class named Factory.

Introduce a class named Factory to create kinds of service manager.
* Class Factory provides two staticmethod to create generate service manager
and to create specific service manager.
* Internal class named FactoryHelper to provide some help method for Factory.

Relationship of the classes in service module.

                                        service
                                           |
                          -------------------------------------
                          |                                   |
               _GenericServiceManager                _SpecificServiceManager
                          |
            -----------------------------
            |                           |
      _SystemdServiceManager   _SystemdServiceManager

* Factory provides two interfaces to create service.
    * create_specific_service to create _SpecificServiceManager.
    * create_generic_service to create _GenericServiceManager.
      * FactoryHelper provides a method get_service_manager_type() to
      auto detect the system type and return constructor of
      _SystemdServiceManager or _SystemdServiceManager.
      So, user do not have to know about the system type when they use
      create_generic_service to create _GenericServiceManager.

Outline of Factory class:
                                                  Factory
                                                     |
            ---------------------------------------------------------------------------------------
            |                                        |                                            |
create_specific_service          	create_generic_service                 		  FactoryHelper
            |                                        |                                            |
            |                                        |                      ----------------------------------------------
            |                                        |                      |                     |                      |
            |                                        |             |----------------------| |---------------------| get_name_of_init()
            |                                        |             |*get_specific_service_| |*get_generic_service_|
            |                                        |------------>|command_generator()   | |command_generator()  |
            |                                                      |*get_specific_service_| |*get_generic_service_|
            |                                                      |result_parser()       | |result_parser()      |
            |                                                      |----------------------| |*get_generic_service_|
            |------------------------------------------------------------------------------>|manager_type()       |
                                                                                            -----------------------

Signed-off-by: yangdongsheng <yangds.fnst@cn.fujitsu.com>
staging: Add staticmethod create_service in Factory.

Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
virt: Adapt nfs to Factory of service.

Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
staging: adapt utils_cgroup to Factory in service.

Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
virt: adapt lvsbs to Factory in service.

Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
lvsbs: Add more comment for self.service in __init__().

Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
staging.service: Add more comment for class Factory.

Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
libvirt: Adapt the remote config in base.cfg to existing tests.

Since there are several tests in libvirt are using ENTER.YOUR as
the default configuration of remote, we should add this substring
into base.cfg.

Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
qemu.tests.cpu_hotplug: Call vm.hotplug_vcpu() to hotplug vcpu.

vm.hotplug_vcpu() will select default command for human/qmp monitor.

In some version, cpu_set have been removed from human monitor,
vm.hotplug() will throw TestNAError.

Signed-off-by: Feng Yang <fyang@redhat.com>
qemu.tests: make qemu-img covert more test scenario

Test plan updated, we need to make qemu_img test option 'preallation'
and 'cluster_size' togethor to avoid bug like:
qemu-img coredump when create image with cluster_size > 65536 and
option 'preallation=metadata';

Signed-off-by: Xu Tian <xutian@redhat.com>
qemu: Move control files to control_files directory

Moving the control files to a separate directory makes
sense, since it clearly separates them rather than leave
them all at top test repository level.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
Move tests/ dir to agnostic/tests/

This will make it easier when we're splitting these
tests into their own repositories.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
virttest.data_dir: Modify get_deps_dir()

Make the 'deps' directory to be localized per test
backend. This way, when tests are split to their
own repos, they'll always know where to find their
resources, regardless of the layout of the repo.

The rules for the deps dir are simple: It can be
any directory up in the filesystem hierarchy with
the name 'deps'. The get_deps_dir() will keep looking
at parent dirs until it finds a deps dir. It'll do
this until either 10 iterations are reached, or a
hidden '.git' directory is found (meaning it reached
the top of the git repo).

Add some docstrings to that function as well.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
whql: Move whql deps to agnostic deps directory

Use the updated data_dir.get_deps_dir() to
correctly identify the deps location.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
clock_getres: Move dependencies to the new deps directory

Also, rename the binaries and directories as the test_
prefix is unnecessary.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
qemu.get_tsc: Move test deps to the new deps directory

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
qemu.cdrom: Move eject files to the new deps directory

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
shared.deps: Move rss source and executables to rss dir

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
shared.deps: Move finish to its own subdirectory

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