summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Hicks <mhicks@localhost.localdomain>2008-07-17 18:44:20 -0400
committerMatt Hicks <mhicks@localhost.localdomain>2008-07-17 18:44:20 -0400
commit33f46f9528f6306659156b170b144d3334204045 (patch)
treebc2c94c4100295cd4f6abb51204ea6e105a2352c
parent525cfba36ef76ec282a88ee0251990d2802c5fe0 (diff)
downloadthird_party-func-33f46f9528f6306659156b170b144d3334204045.tar.gz
third_party-func-33f46f9528f6306659156b170b144d3334204045.tar.xz
third_party-func-33f46f9528f6306659156b170b144d3334204045.zip
Adding a 'virttype' method to the virtualization module
to allow a simple call to determine whether the machine is running Xen or KVM.
-rw-r--r--func/minion/modules/virt.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/func/minion/modules/virt.py b/func/minion/modules/virt.py
index 6cf8c31..ebc0a1c 100644
--- a/func/minion/modules/virt.py
+++ b/func/minion/modules/virt.py
@@ -187,6 +187,9 @@ class Virt(func_module.FuncModule):
pass
return results
+ def virttype(self):
+ return self.__get_conn().get_type()
+
def autostart(self, vm):
self.conn = self.__get_conn()
if self.conn.get_type() == "Xen":