Skip to content

Commit

Permalink
enhancement: storage_error_resume_behaviour of ovirt vm (#721)
Browse files Browse the repository at this point in the history
* storage_error_resume_behaviour of ovirt vm feature

Signed-off-by: hemak88 <[email protected]>

* storage_error_resume_behaviour of ovirt vm feature

Signed-off-by: hemak88 <[email protected]>

* Update storage_error_resume_behaviour docs

Signed-off-by: Martin Necas <[email protected]>

---------

Signed-off-by: hemak88 <[email protected]>
Signed-off-by: Martin Necas <[email protected]>
Co-authored-by: Martin Nečas <[email protected]>
  • Loading branch information
hemak88 and mnecas authored Sep 8, 2023
1 parent 3d1df6f commit 6736a45
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
minor_changes:
- storage_error_resume_behaviour - Support VM storage error resume behaviour "auto_resume", "kill", "leave_paused". (https://github.com/oVirt/ovirt-ansible-collection/pull/721)
12 changes: 12 additions & 0 deletions plugins/modules/ovirt_vm.py
Original file line number Diff line number Diff line change
Expand Up @@ -750,6 +750,13 @@
- "If no value is passed, default value is set by oVirt/RHV engine."
choices: ['interleave', 'preferred', 'strict']
type: str
storage_error_resume_behaviour:
description:
- "If the storage, on which this virtual machine has some disks gets unresponsive, the virtual machine gets paused."
- "These are the possible options, what should happen with the virtual machine at the moment the storage becomes available again."
choices: ['auto_resume', 'kill', 'leave_paused']
type: str
version_added: "3.2.0"
numa_nodes:
description:
- "List of vNUMA Nodes to set for this VM and pin them to assigned host's physical NUMA node."
Expand Down Expand Up @@ -1676,6 +1683,9 @@ def build_entity(self):
numa_tune_mode=otypes.NumaTuneMode(
self.param('numa_tune_mode')
) if self.param('numa_tune_mode') else None,
storage_error_resume_behaviour=otypes.VmStorageErrorResumeBehaviour(
self.param('storage_error_resume_behaviour')
) if self.param('storage_error_resume_behaviour') else None,
rng_device=otypes.RngDevice(
source=otypes.RngSource(self.param('rng_device')),
) if self.param('rng_device') else None,
Expand Down Expand Up @@ -1800,6 +1810,7 @@ def check_custom_compatibility_version():
equal(self.param('serial_policy'), str(getattr(entity.serial_number, 'policy', None))) and
equal(self.param('serial_policy_value'), getattr(entity.serial_number, 'value', None)) and
equal(self.param('numa_tune_mode'), str(entity.numa_tune_mode)) and
equal(self.param('storage_error_resume_behaviour'), str(entity.storage_error_resume_behaviour)) and
equal(self.param('virtio_scsi_enabled'), getattr(entity.virtio_scsi, 'enabled', None)) and
equal(self.param('multi_queues_enabled'), entity.multi_queues_enabled) and
equal(self.param('virtio_scsi_multi_queues'), entity.virtio_scsi_multi_queues) and
Expand Down Expand Up @@ -2624,6 +2635,7 @@ def main():
ballooning_enabled=dict(type='bool', default=None),
rng_device=dict(type='str'),
numa_tune_mode=dict(type='str', choices=['interleave', 'preferred', 'strict']),
storage_error_resume_behaviour=dict(type='str', choices=['auto_resume', 'leave_paused', 'kill']),
numa_nodes=dict(type='list', default=[], elements='dict'),
custom_properties=dict(type='list', elements='dict'),
watchdog=dict(type='dict'),
Expand Down

0 comments on commit 6736a45

Please sign in to comment.