VMware: Change in update tag API (#54304)
Changed update tag API as per new changes. Fixes: #53060 Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
This commit is contained in:
parent
6d978bc285
commit
5db7501ebd
2 changed files with 6 additions and 2 deletions
2
changelogs/fragments/53060-vmware_tag-update_desc.yml
Normal file
2
changelogs/fragments/53060-vmware_tag-update_desc.yml
Normal file
|
@ -0,0 +1,2 @@
|
|||
minor_changes:
|
||||
- Updated VMware Update tag API as new specifications (https://github.com/ansible/ansible/issues/53060).
|
|
@ -185,13 +185,15 @@ class VmwareTag(VmwareRestClient):
|
|||
|
||||
"""
|
||||
changed = False
|
||||
tag_id = self.global_tags[self.tag_name]['tag_id']
|
||||
results = dict(msg="Tag %s is unchanged." % self.tag_name,
|
||||
tag_id=self.global_tags[self.tag_name]['tag_id'])
|
||||
tag_id=tag_id)
|
||||
tag_update_spec = self.tag_service.UpdateSpec()
|
||||
tag_desc = self.global_tags[self.tag_name]['tag_description']
|
||||
desired_tag_desc = self.params.get('tag_description')
|
||||
if tag_desc != desired_tag_desc:
|
||||
tag_update_spec.setDescription = desired_tag_desc
|
||||
tag_update_spec.description = desired_tag_desc
|
||||
self.tag_service.update(tag_id, tag_update_spec)
|
||||
results['msg'] = 'Tag %s updated.' % self.tag_name
|
||||
changed = True
|
||||
|
||||
|
|
Loading…
Reference in a new issue