from .config import CrTplConfiguration
-__version__ = '0.9.2'
+__version__ = '0.9.3'
LOG = logging.getLogger(__name__)
TZ = pytz.timezone('Europe/Berlin')
"Strange: did not found a cluster object in data center {!r}.".format(
self.config.dc))
- self.tpl_cluster = cluster_list[0]
+ cluster = None
+
+ for cl in cluster_list:
+ if not cl.configuration.drsConfig.enabled:
+ LOG.warn("Cluster {!r} is not enabled.".format(cl.name))
+ continue
+ cluster = cl
+
+ if not cluster:
+ raise HandlerError(
+ "Strange: did not found an enabled computing cluster in data center {!r}.".format(
+ self.config.dc))
+
+ self.tpl_cluster = cluster
+ if self.verbose > 2:
+ LOG.debug("Cluster config:\n{}".format(pp(cluster.configuration)))
+ LOG.debug("Cluster Resource pool summary:\n{}".format(cluster.resourcePool.summary))
LOG.debug("Using cluster {!r}.".format(self.tpl_cluster.name))
# -------------------------------------------------------------------------
ssh_available = True
self.ts_finish_install = time.time()
+ self.ts_finish_install = time.time()
duration = self.ts_finish_install - self.ts_start_install
minutes = int(int(duration) / 60)
seconds = duration - float(minutes * 60)