]> Frank Brehm's Git Trees - pixelpark/create-terraform.git/commitdiff
Fixing lib/cr_tf/handler.py
authorFrank Brehm <frank.brehm@pixelpark.com>
Wed, 6 Nov 2019 14:26:53 +0000 (15:26 +0100)
committerFrank Brehm <frank.brehm@pixelpark.com>
Wed, 6 Nov 2019 14:26:53 +0000 (15:26 +0100)
lib/cr_tf/handler.py

index 431c543c5c4574cac2b57b8356afea59c011cc87..8a0b95c3c40d354d3029d3994769fe8f2b1c6f06 100644 (file)
@@ -61,7 +61,7 @@ from .terraform.disk import TerraformDisk
 
 from .xlate import XLATOR
 
-__version__ = '3.1.7'
+__version__ = '3.1.8'
 LOG = logging.getLogger(__name__)
 
 _ = XLATOR.gettext
@@ -2484,7 +2484,7 @@ class CreateTerraformHandler(BaseHandler):
             g=guest_id, cpu=vm.num_cpus, f=vm.folder, m=vm.memory, b=int(vm.boot_delay * 1000))
         if vm.vm_template:
             tpl = '  scsi_type              = data.vsphere_virtual_machine.{}.scsi_type\n'
-            content += tpl.format(tpl_vm['tf_name'])
+            content += tpl.format(tpl_vm.tf_name)
         content += '\n'
 
         content += textwrap.indent(textwrap.dedent('''\
@@ -2514,7 +2514,7 @@ class CreateTerraformHandler(BaseHandler):
           adapter_type = data.{vvm}.{t}.{nit}[0]
         }}
         '''), '  ').format(
-            n=nw_name, t=tpl_vm['tf_name'],
+            n=nw_name, t=tpl_vm.tf_name,
             vvm='vsphere_virtual_machine', nit='network_interface_types')
         content += '\n'
 
@@ -2559,7 +2559,7 @@ class CreateTerraformHandler(BaseHandler):
             }}
 
         '''), '  ').format(
-            t=tpl_vm['tf_name'], h=vm.hostname, d=vm.domain)
+            t=tpl_vm.tf_name, h=vm.hostname, d=vm.domain)
 
         content += self._create_instfile_nw(vm)
         content += '    }\n'