mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-25 03:41:25 -07:00
* Added conditional to only collect qmpstatus on qemu VMs
* Processed feedback, added changelog
* Initial change to unit tests
* Made Sanity tests happy again
* Missed a function call, removed superfluous function
* Derp, no need to mock get_vm_status anymore
* Added detail checks whether hosts are mapped to the paused/prelaunch groups
* Fix sanity check
* Processed feedback
* Processed feedback - noqa
(cherry picked from commit 71745b8024
)
Co-authored-by: Jeffrey van Pelt <jeff@vanpelt.one>
This commit is contained in:
parent
c44298c437
commit
f8d35eeb14
3 changed files with 105 additions and 7 deletions
|
@ -443,7 +443,8 @@ class InventoryModule(BaseInventoryPlugin, Constructable, Cacheable):
|
|||
def _get_vm_status(self, properties, node, vmid, vmtype, name):
|
||||
ret = self._get_json("%s/api2/json/nodes/%s/%s/%s/status/current" % (self.proxmox_url, node, vmtype, vmid))
|
||||
properties[self._fact('status')] = ret['status']
|
||||
properties[self._fact('qmpstatus')] = ret['qmpstatus']
|
||||
if vmtype == 'qemu':
|
||||
properties[self._fact('qmpstatus')] = ret['qmpstatus']
|
||||
|
||||
def _get_vm_snapshots(self, properties, node, vmid, vmtype, name):
|
||||
ret = self._get_json("%s/api2/json/nodes/%s/%s/%s/snapshot" % (self.proxmox_url, node, vmtype, vmid))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue