]> Frank Brehm's Git Trees - pixelpark/create-terraform.git/commitdiff
Changing some methods for multi VSPhere support
authorFrank Brehm <frank.brehm@pixelpark.com>
Tue, 1 Oct 2019 12:08:30 +0000 (14:08 +0200)
committerFrank Brehm <frank.brehm@pixelpark.com>
Tue, 1 Oct 2019 12:08:30 +0000 (14:08 +0200)
bin/xtract-xlate-msgs.sh
lib/cr_tf/handler.py

index 712ffe158c92c87474c5b702bf21d42530eaf7d4..254108662abcf4906c2c55427c3b6232e8c3e7b8 100755 (executable)
@@ -53,7 +53,7 @@ for lang in de_DE en_US ; do
             --output-dir "${locale_dir}" \
             --locale "${lang}" \
             --width ${po_with} \
-            --update-header-comment
+            --update-header-comment --previous
     fi
             # --ignore-obsolete \
 done
index 7b31fb4ac087949639fc73ca716dcf65fd6f591f..4fe5fbe44254cbb5a8e97feccd72f70197599dab 100644 (file)
@@ -59,7 +59,7 @@ from .terraform.disk import TerraformDisk
 
 from .xlate import XLATOR
 
-__version__ = '2.9.3'
+__version__ = '2.9.4'
 LOG = logging.getLogger(__name__)
 
 _ = XLATOR.gettext
@@ -704,7 +704,8 @@ class CreateTerraformHandler(BaseHandler):
         if self.stop_at_step == 'vmw-datastores':
             self.incr_verbosity()
 
-        self.vsphere.get_datastores()
+        for vname in self.vsphere:
+            self.vsphere[vname].get_datastores()
 
         LOG.info(_("Finished step {!r}.").format('vmw-datastores'))
         if self.stop_at_step == 'vmw-datastores':
@@ -716,7 +717,8 @@ class CreateTerraformHandler(BaseHandler):
         if self.stop_at_step == 'vmw-ds-clusters':
             self.incr_verbosity()
 
-        self.vsphere.get_ds_clusters()
+        for vname in self.vsphere:
+            self.vsphere[vname].get_ds_clusters()
 
         LOG.info(_("Finished step {!r}.").format('vmw-ds-clusters'))
         if self.stop_at_step == 'vmw-ds-clusters':
@@ -728,13 +730,14 @@ class CreateTerraformHandler(BaseHandler):
         if self.stop_at_step == 'vmw-networks':
             self.incr_verbosity()
 
-        self.vsphere.get_networks()
-        if self.eval_errors:
-            msg = ngettext(
-                "Found one error in exploring vSphere resources.",
-                "Found {n} errors in exploring vSphere resources.",
-                self.eval_errors).format(n=self.eval_errors)
-            raise ExpectedHandlerError(msg)
+        for vname in self.vsphere:
+            self.vsphere[vname].get_networks()
+            if self.eval_errors:
+                msg = ngettext(
+                    "Found one error in exploring vSphere {v!r} resources.",
+                    "Found {n} errors in exploring vSphere {v!r} resources.",
+                    self.eval_errors).format(n=self.eval_errors, v=vname)
+                raise ExpectedHandlerError(msg)
 
         LOG.info(_("Finished step {!r}.").format('vmw-networks'))
         if self.stop_at_step == 'vmw-networks':