vs_name = vm.vsphere
print()
- LOG.info(_("Importing VM {!r}.").format(vm['name']))
- vm_obj = 'vsphere_virtual_machine.{}'.format(vm['tf_name'])
+ LOG.info(_("Importing VM {!r}.").format(vm.name))
+ vm_obj = 'vsphere_virtual_machine.{}'.format(vm.tf_name)
path = '/{dc}/{f}/{p}/{n}'.format(
dc=self.vsphere[vs_name].dc, f=self.vsphere[vs_name].dc_obj.vm_folder,
- p=vm['path'], n=vm['name'])
+ p=vm.config_path, n=vm.name)
cmd = [str(self.terraform_cmd), 'import', vm_obj, path]
result = self.run(
cmd, may_simulate=True, timeout=tf_timeout,