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

enhancement: storage_error_resume_behaviour of ovirt vm #721

Merged
merged 3 commits into from
Sep 8, 2023
Merged
Show file tree
Hide file tree
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
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