Skip to content

Commit

Permalink
Use parameter list for vmware_host_logbundle (#2090)
Browse files Browse the repository at this point in the history
Depends-on: #2092
SUMMARY
This PR fixes the concatenation of manifests in the cgi-bin URL, such that it will be properly interpreted as a list instead of separate parameters in the HTTP GET call.
Fixes #2089
ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME
vmware_host_logbundle
ADDITIONAL INFORMATION
Information of the issue can be found in #2089

Reviewed-by: Mario Lenz <m@riolenz.de>
  • Loading branch information
czlucius authored Jun 25, 2024
1 parent 8eed310 commit f985412
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions changelogs/fragments/2090-vmware_host_logbundle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bugfixes:
- vmware_host_logbundle - Manifests previously was separared by "&", thus selecting first manifest. Fix now separates manifests with URL encoded space, thus correctly supplying the manifests. (https://github.com/ansible-collections/community.vmware/pull/2090).
2 changes: 1 addition & 1 deletion plugins/modules/vmware_host_logbundle.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ def validate_manifests(self):

def get_logbundle(self):
self.validate_manifests()
url = 'https://' + self.esxi_hostname + '/cgi-bin/vm-support.cgi?manifests=' + '&'.join(self.manifests)
url = 'https://' + self.esxi_hostname + '/cgi-bin/vm-support.cgi?manifests=' + '%20'.join(self.manifests)

if self.performance_data:
duration = self.performance_data.get('duration')
Expand Down

0 comments on commit f985412

Please sign in to comment.