dc=self.config.dc, cluster=self.config.vsphere_cluster,
auto_close=True, simulate=self.simulate, force=self.force,
terminal_has_colors=self.terminal_has_colors, initialized=False)
+ self.cluster = None
if initialized:
self.initialized = True
try:
retval = self.run()
finally:
+ # Aufräumen ...
+ self.cluster = None
LOG.debug("Closing ...")
self.vsphere.disconnect()
self.vsphere = None
self.vsphere.get_about()
self.vsphere.get_clusters()
- cluster = self.vsphere.get_cluster_by_name(self.config.vsphere_cluster)
- if cluster:
- LOG.debug("Found VSphere cluster {!r}.".format(cluster.name))
+ self.cluster = self.vsphere.get_cluster_by_name(self.config.vsphere_cluster)
+ if self.cluster:
+ LOG.debug("Found VSphere cluster {!r}.".format(self.cluster.name))
else:
LOG.error("Could not find VSphere cluster {!r}.".format(self.config.vsphere_cluster))
return 6