Signed-off-by: Li Yang <[email protected]>
---
virttest/virsh.py | 24 ++++++++++++++++++++++++
1 files changed, 24 insertions(+), 0 deletions(-)
diff --git a/virttest/virsh.py b/virttest/virsh.py
index f847d92..8a77b65 100644
--- a/virttest/virsh.py
+++ b/virttest/virsh.py
@@ -1210,6 +1210,30 @@ def net_undefine(network, extra="", **dargs):
return command("net-undefine %s %s" % (network, extra), **dargs)
+def net_name(net_uuid, extra="", **dargs):
+ """
+ Get network name on host.
+
+ @param: net_uuid: network UUID.
+ @param: extra: extra parameters to pass to command.
+ @param: dargs: standardized virsh function API keywords
+ @return: CmdResult object
+ """
+ return command("net-name %s %s" % (net_uuid, extra), **dargs)
+
+
+def net_uuid(network, extra="", **dargs):
+ """
+ Get network UUID on host.
+
+ @param: network: name/parameter for network option/argument
+ @param: extra: extra parameters to pass to command.
+ @param: dargs: standardized virsh function API keywords
+ @return: CmdResult object
+ """
+ return command("net-uuid %s %s" % (network, extra), **dargs)
+
+
def net_autostart(network, extra="", **dargs):
"""
Set/unset a network to autostart on host boot
--
1.7.1
--
Regards,
--------------------------------------------------
Li Yang
TEL:+86+25-86630566-8526
EMail:[email protected]
--------------------------------------------------
_______________________________________________
Virt-test-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/virt-test-devel