mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-05-11 11:41:32 -07:00
* module_utils.proxmox: new `api_task_ok` helper + integrated with existing modules
* proxmox_snap: add `unbind` param to snapshot containers with mountpoints
* [fix] errors reported by 'test sanity pep8'
at
https://github.com/ansible-collections/community.general/pull/5274#issuecomment-1242932079
* module_utils.proxmox.api_task_ok: small improvement
* proxmox_snap.unbind: version_added, formatting errors, changelog fragment
* Apply suggestions from code review
Co-authored-by: Felix Fontein <felix@fontein.de>
* proxmox_snap.unbind: update version_added tag
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 25e3031c2f
)
Co-authored-by: nxet <nxet821@protonmail.com>
This commit is contained in:
parent
d25b6e7681
commit
869e1a1eab
6 changed files with 117 additions and 22 deletions
|
@ -137,3 +137,7 @@ class ProxmoxAnsible(object):
|
|||
return None
|
||||
|
||||
self.module.fail_json(msg='VM with vmid %s does not exist in cluster' % vmid)
|
||||
|
||||
def api_task_ok(self, node, taskid):
|
||||
status = self.proxmox_api.nodes(node).tasks(taskid).status.get()
|
||||
return status['status'] == 'stopped' and status['exitstatus'] == 'OK'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue