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

ovirt_vm: add virtio_scsi_enabled and multi_queues_enabled #348

Merged
merged 4 commits into from
Sep 20, 2021
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:
- ovirt_vm - Add virtio_scsi_enabled and multi_queues_enabled (https://github.com/oVirt/ovirt-ansible-collection/pull/348).
18 changes: 18 additions & 0 deletions plugins/modules/ovirt_vm.py
Original file line number Diff line number Diff line change
Expand Up @@ -894,6 +894,16 @@
description:
- "Sets the value of the custom_emulated_machine attribute."
type: str
virtio_scsi_enabled:
description:
- "Enable Virtio SCSI support."
type: bool
version_added: 1.7.0
multi_queues_enabled:
description:
- "If `true`, each virtual interface will get the optimal number of queues, depending on the available virtual Cpus."
type: bool
version_added: 1.7.0

notes:
- If VM is in I(UNASSIGNED) or I(UNKNOWN) state before any operation, the module will fail.
Expand Down Expand Up @@ -1553,6 +1563,10 @@ def build_entity(self):
self.param('cpu_pinning')
)) else None,
cpu_shares=self.param('cpu_shares'),
virtio_scsi=otypes.VirtioScsi(
enabled=self.param('virtio_scsi_enabled'),
) if self.param('virtio_scsi_enabled') is not None else None,
multi_queues_enabled=self.param('multi_queues_enabled'),
os=otypes.OperatingSystem(
type=self.param('operating_system'),
boot=otypes.Boot(
Expand Down Expand Up @@ -1746,6 +1760,8 @@ 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('virtio_scsi_enabled'), entity.virtio_scsi.enabled) and
equal(self.param('multi_queues_enabled'), entity.multi_queues_enabled) and
equal(self.param('rng_device'), str(entity.rng_device.source) if entity.rng_device else None) and
equal(provided_vm_display.get('monitors'), getattr(vm_display, 'monitors', None)) and
equal(provided_vm_display.get('keyboard_layout'), getattr(vm_display, 'keyboard_layout', None)) and
Expand Down Expand Up @@ -2579,6 +2595,8 @@ def main():
force_migrate=dict(type='bool'),
migrate=dict(type='bool', default=None),
next_run=dict(type='bool'),
virtio_scsi_enabled=dict(type='bool'),
multi_queues_enabled=dict(type='bool'),
snapshot_name=dict(type='str'),
snapshot_vm=dict(type='str'),
)
Expand Down