commit 113d2f68ace8b67cbd991f808105eb9642589a23
Author: Radek Pazdera <rpazdera(a)redhat.com>
Date: Fri Apr 26 10:11:17 2013 +0200
SlavePool: Adding a is_setup_virtual() predicate
This commit adds a new predicate to the SlavePool class to check if the
match is virtual, i.e., whether LNST will need to use libvirt to
configure the setup.
Signed-off-by: Radek Pazdera <rpazdera(a)redhat.com>
lnst/Controller/SlavePool.py | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/lnst/Controller/SlavePool.py b/lnst/Controller/SlavePool.py
index d602027..80a357c 100644
--- a/lnst/Controller/SlavePool.py
+++ b/lnst/Controller/SlavePool.py
@@ -80,11 +80,11 @@ class SlavePool:
if 'libvirt_domain' not in machine['params'] \
or self._allow_virtual:
logging.info("Adding slave machine %s to slave pool."
- % machine_id)
+ % machine_id)
self._pool[machine_id] = machine
else:
logging.warning("libvirtd not found- Machine Pool skipping "\
- "machine %s" % machine_id)
+ "machine %s" % machine_id)
def provision_machines(self, mreqs):
"""
@@ -115,6 +115,9 @@ class SlavePool:
return machines
+ def is_setup_virtual(self):
+ return self._map["virtual"]
+
def get_provisioner_id(self, m_id):
try:
return self._get_machine_mapping(m_id)
Show replies by thread