Skip to content

Commit

Permalink
Drop self.params['annotation']
Browse files Browse the repository at this point in the history
  • Loading branch information
mariolenz committed May 6, 2024
1 parent 58ed77b commit 37e934e
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions plugins/modules/guest.py
Original file line number Diff line number Diff line change
Expand Up @@ -965,16 +965,6 @@ def deploy_vm(self):
}

return kwargs
else:
# set annotation
vm = task.info.result
if self.params['annotation']:
annotation_spec = vim.vm.ConfigSpec()
annotation_spec.annotation = str(self.params['annotation'])
task = vm.ReconfigVM_Task(annotation_spec)
self.wait_for_task(task)
if task.info.state == 'error':
return {'changed': self.change_applied, 'failed': True, 'msg': task.info.error.msg, 'op': 'annotation'}

vm_facts = self.gather_facts(vm)
return {'changed': self.change_applied, 'failed': False, 'instance': vm_facts}
Expand All @@ -991,10 +981,6 @@ def reconfigure_vm(self):
self.configure_encryption_params(vm_obj=self.current_vm_obj)
self.configure_resource_alloc_info(vm_obj=self.current_vm_obj)

if self.params['annotation'] and self.current_vm_obj.config.annotation != self.params['annotation']:
self.configspec.annotation = str(self.params['annotation'])
self.change_detected = True

if self.params['resource_pool']:
self.relospec.pool = self.get_resource_pool()

Expand Down

0 comments on commit 37e934e

Please sign in to comment.