From: Frank Brehm Date: Wed, 6 Nov 2019 14:26:53 +0000 (+0100) Subject: Fixing lib/cr_tf/handler.py X-Git-Tag: 1.3.4~2 X-Git-Url: https://git.uhu-banane.de/?a=commitdiff_plain;h=80c99f99ae5c594170ee6c7f90b08a270e04a525;p=pixelpark%2Fcreate-terraform.git Fixing lib/cr_tf/handler.py --- 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'