Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vmware_guest_tools_info: Use toolsVersionStatus2 #2034

Merged
merged 2 commits into from
Apr 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions changelogs/fragments/2033-vmware_guest_tools_info.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
minor_changes:
- vmware_guest_tools_info - Use `toolsVersionStatus2` instead of `toolsVersionStatus` (https://github.com/ansible-collections/community.vmware/issues/2033).
deprecated_features:
- vmware_guest_tools_info - `vm_tools_install_status` will be removed from next major version (5.0.0) of the collection
since the API call that provides this information has been deprecated by VMware.
Use `vm_tools_running_status` / `vm_tools_version_status` instead (https://github.com/ansible-collections/community.vmware/issues/2033).
7 changes: 6 additions & 1 deletion plugins/modules/vmware_guest_tools_info.py
Original file line number Diff line number Diff line change
@@ -143,13 +143,18 @@ def gather_vmtools_info(self):
vm_ipaddress=self.current_vm_obj.summary.guest.ipAddress,
vm_tools_running_status=self.current_vm_obj.summary.guest.toolsRunningStatus,
vm_tools_install_status=self.current_vm_obj.summary.guest.toolsStatus,
vm_tools_version_status=self.current_vm_obj.summary.guest.toolsVersionStatus,
vm_tools_version_status=self.current_vm_obj.summary.guest.toolsVersionStatus2,
vm_tools_install_type=self.current_vm_obj.config.tools.toolsInstallType,
vm_tools_version=self.current_vm_obj.config.tools.toolsVersion,
vm_tools_upgrade_policy=self.current_vm_obj.config.tools.toolsUpgradePolicy,
vm_tools_last_install_count=self.current_vm_obj.config.tools.lastInstallInfo.counter,
)

self.module.deprecate(
msg="The API providing vm_tools_install_status has been deprecated by VMware; use vm_tools_running_status / vm_tools_version_status instead",
version="5.0.0",
collection_name="community.vmware"
)
return {'changed': False, 'failed': False, 'vmtools_info': vmtools_info}