Skip to content

Commit

Permalink
fix: vmware#499 - Permissions required to run nsxt_vm_tags module
Browse files Browse the repository at this point in the history
Signed-off-by: Julien Simbola <[email protected]>
  • Loading branch information
Julien Simbola committed Jul 8, 2024
1 parent dfbbd04 commit cf68060
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion plugins/module_utils/nsxt_resource_urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
EDGE_NODE_URL = EDGE_CLUSTER_URL + '/{}/edge-nodes'

VM_LIST_URL = '/virtual-machines'
VM_UPDATE_URL = '/virtual-machines'
VM_UPDATE_URL = '/infra/realized-state/virtual-machines'

BFD_PROFILE_URL = '/infra/bfd-profiles'

Expand Down
6 changes: 3 additions & 3 deletions plugins/modules/nsxt_vm_tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,12 +272,12 @@ def realize():
module.exit_json(msg="No tags detected to update")

post_body = {
"external_id": virtual_machine_id,
"tags": final_tags
}
policy_communicator.request(
VM_UPDATE_URL + '?action=update_tags', data=post_body,
method="POST", base_url='fabric')
VM_UPDATE_URL + '/' + virtual_machine_id + '/tags', data=post_body,
method="POST", base_url='policy')

module.exit_json(msg="Successfully updated tags on VM {}".format(
virtual_machine_id), changed=True)
except Exception as err:
Expand Down

0 comments on commit cf68060

Please sign in to comment.