]> Frank Brehm's Git Trees - pixelpark/create-vmware-tpl.git/commitdiff
Integrating vsphere modules
authorFrank Brehm <frank.brehm@pixelpark.com>
Tue, 23 Oct 2018 15:39:56 +0000 (17:39 +0200)
committerFrank Brehm <frank.brehm@pixelpark.com>
Tue, 23 Oct 2018 15:39:56 +0000 (17:39 +0200)
lib/cr_vmware_tpl/app.py
lib/cr_vmware_tpl/handler.py
python_fb_tools

index cd3286b1cf646a5d0d13b9e45d6ae7c5899b0b64..e40a050e796c7bd1646f06f459228be79107f889 100644 (file)
@@ -248,14 +248,14 @@ class CrTplApplication(BaseApplication):
             self.config.password = getpass.getpass(prompt=prompt)
 
         self.handler = CrTplHandler(
-            appname=self.appname, verbose=self.verbose, base_dir=self.base_dir)
+            appname=self.appname, verbose=self.verbose, base_dir=self.base_dir, config=self.config)
 
-        self.handler.config = self.config
         if self.args.rotate:
             self.handler.rotate_only = True
         if self.args.abort:
             self.handler.abort = True
 
+        self.handler.vsphere.initialized = True
         self.handler.initialized = True
         self.initialized = True
 
index ad7fa4ae9168467e637456274211885a550dc59a..75dd9e1172745b2d02afbae8cc083993135cd1b1 100644 (file)
@@ -37,6 +37,8 @@ from fb_tools.errors import CannotConnectVsphereError, NoDatastoreFoundError
 
 from fb_tools.handler import BaseHandler
 
+from fb_tools.vsphere import BaseVsphereHandler
+
 from .config import CrTplConfiguration
 
 __version__ = '0.10.1'
@@ -104,8 +106,17 @@ class CrTplHandler(BaseHandler):
         self.abort = False
         self.postinstall_errors = None
 
+        self.vsphere = BaseVsphereHandler(
+            appname=self.appname, verbose=self.verbose, base_dir=self.base_dir,
+            host=self.config.vsphere_host, port=self.config.vsphere_port,
+            user=self.config.vsphere_user, password=self.config.password,
+            dc=self.config.dc, cluster=self.config.vsphere_cluster,
+            simulate=self.simulate, force=self.force,
+            terminal_has_colors=self.terminal_has_colors, initialized=False)
+
         if initialized:
             self.initialized = True
+            self.vsphere.initialized = True
 
     # -------------------------------------------------------------------------
     def __call__(self):
@@ -119,6 +130,10 @@ class CrTplHandler(BaseHandler):
                 "self.config is not a CrTplConfiguration-instance, but a "
                 "{}-instance instead.").format(self.config.__class__.__name__))
 
+
+        return
+
+
         LOG.debug("Connecting to vSphere host {h}:{p} as {u!r} ...".format(
             h=self.config.vsphere_host, p=self.config.vsphere_port,
             u=self.config.vsphere_user))
index 0aa1e1fd0335acf3f2447d1c00d413e93aced508..a44f6dc298b3ecbacceab04c51ca82d0b1a4b71e 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 0aa1e1fd0335acf3f2447d1c00d413e93aced508
+Subproject commit a44f6dc298b3ecbacceab04c51ca82d0b1a4b71e