from .xlate import XLATOR
-__version__ = '3.6.0'
+__version__ = '3.6.1'
LOG = logging.getLogger(__name__)
_ = XLATOR.gettext
if self.stop_at_step == 'vmw-datastores':
self.incr_verbosity()
+ nr_total = 0
+
for vname in self.vsphere:
LOG.debug(_("Searching for datastores in VSPhere {!r} ...").format(vname))
self.vsphere[vname].get_datastores()
+ nr_total += len(self.vsphere[vname].datastores.keys())
+
+ if nr_total:
+ msg = ngettext("Found one datastore.", "Found {n} datastores.", nr_total)
+ LOG.debug(msg.format(n=nr_total))
+ else:
+ LOG.error(_("No VSPhere datastores found."))
LOG.info(_("Finished step {!r}.").format('vmw-datastores'))
if self.stop_at_step == 'vmw-datastores':
# -------------------------------------------------------------------------ยท
def exec_vmw_ds_clusters(self):
+ nr_total = 0
+
if self.stop_at_step == 'vmw-ds-clusters':
self.incr_verbosity()
for vname in self.vsphere:
LOG.debug(_("Searching for datastore clusters in VSPhere {!r} ...").format(vname))
self.vsphere[vname].get_ds_clusters()
+ nr_total += len(self.vsphere[vname].ds_clusters.keys())
+
+ if nr_total:
+ msg = ngettext("Found one datastore cluster.", "Found {n} datastore clusters.", nr_total)
+ LOG.debug(msg.format(n=nr_total))
+ else:
+ LOG.warn(_("No VSPhere datastore clusters found."))
LOG.info(_("Finished step {!r}.").format('vmw-ds-clusters'))
if self.stop_at_step == 'vmw-ds-clusters':