From 80c99f99ae5c594170ee6c7f90b08a270e04a525 Mon Sep 17 00:00:00 2001 From: Frank Brehm Date: Wed, 6 Nov 2019 15:26:53 +0100 Subject: [PATCH] Fixing lib/cr_tf/handler.py --- lib/cr_tf/handler.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/cr_tf/handler.py b/lib/cr_tf/handler.py index 431c543..8a0b95c 100644 --- a/lib/cr_tf/handler.py +++ b/lib/cr_tf/handler.py @@ -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' -- 2.39.5