Signed-off-by: Li Yang <[email protected]>
---
 client/virt/virsh.py |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/client/virt/virsh.py b/client/virt/virsh.py
index 1305d85..bc9550d 100644
--- a/client/virt/virsh.py
+++ b/client/virt/virsh.py
@@ -635,6 +635,20 @@ def dumpxml(name, to_file="", **dargs):
     return command(cmd, **dargs).stdout.strip()


+def domxml_from_native(options, **dargs):
+    """
+    Convert native guest configuration format to domain XML format.
+
+ @param options:The command's options. For exmple:qemu-argv /tmp/guest_args
+                   1.qemu-argv:source config data format.
+                   2./tmp/guest_args: config data file to import from
+    @param dargs: standardized virsh function API keywords
+    @return: exit_status from command
+    """
+    cmd = "domxml-from-native %s" % options
+    return command(cmd, **dargs).exit_status
+
+
 def is_alive(name, **dargs):
     """
     Return True if the domain is started/alive.
--
1.7.1

--
Regards,
--------------------------------------------------
Li Yang
TEL:+86+25-86630566-8526
EMail:[email protected]
--------------------------------------------------



_______________________________________________
Autotest-kernel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/autotest-kernel

Reply via email to