bug fix: call a method should be followed by "()"

it should be:
FeatureTests.enable_screen_error_logging()
instead of:
FeatureTests.enable_screen_error_logging

Signed-off-by: ShaoHe Feng <shaohef@linux.vnet.ibm.com>
add method to test libvirt metadata api are available

same mechanism with other feature tests.

Signed-off-by: ShaoHe Feng <shaohef@linux.vnet.ibm.com>
Signed-off-by: Royce Lv <lvroyce@linux.vnet.ibm.com>
Add two function to set and get domain xml metadata

Libvirt support two API to set and get domain xml metadata.
These two function wrap them.
Put them in model/utils.py, so vm_storage and vm_iface can make use of
them.

For set domain xml metadata, we set live and config xml by default.
For get domain xml metadata, we get the current xml by default.

Signed-off-by: ShaoHe Feng <shaohef@linux.vnet.ibm.com>
Signed-off-by: Royce Lv <lvroyce@linux.vnet.ibm.com>
manually manage the metadata element

virDomain.metadata and virDomain.setMetadata does not work in all livirt
versions used in the supported distros.

So if libvirt do not support these two API.

let kimchi manually manage the metadata element

Signed-off-by: ShaoHe Feng <shaohef@linux.vnet.ibm.com>
Signed-off-by: Royce Lv <lvroyce@linux.vnet.ibm.com>
bug fix: get user and group when vm is living.

define a domain just edit the persistent xml.
So we should get user and group from persistent xml instead of live xml
when domain is living.
Refacor the code by libvirt metadata API and fix the bug.

Signed-off-by: ShaoHe Feng <shaohef@linux.vnet.ibm.com>
Signed-off-by: Royce Lv <lvroyce@linux.vnet.ibm.com>
update test case to set/get user and group when VM is running

When vm is live, we should also get user and group correctly.

Signed-off-by: ShaoHe Feng <shaohef@linux.vnet.ibm.com>
Signed-off-by: Royce Lv <lvroyce@linux.vnet.ibm.com>
write the template OS info to vm metadata

Then kimchi can choose the divice mode depend on these info.

Note, the info is the initial OS when install OS on a blank guest.

OS may change after the install.

So other device should still keep their model info in the vm metadata.

Signed-off-by: ShaoHe Feng <shaohef@linux.vnet.ibm.com>
Signed-off-by: Royce Lv <lvroyce@linux.vnet.ibm.com>