mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
ovirt_vm: Check next_run configuration update if exist (#47280)
This PR fixes the update check method so it now check also the next_run configuration of the virtual machine if it exists. So if previously the VM was updated with new parameters, and then reset back, the module didn't set the parameters to be set back in next_run. This PR fixes it so the next run configuration is set back with proper parameters. Signed-off-by: Ondra Machacek <omachace@redhat.com> Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1639894 Signed-off-by: Ondra Machacek <omachace@redhat.com>
This commit is contained in:
parent
8a671f54dd
commit
03bccdda92
1 changed files with 8 additions and 1 deletions
|
@ -1160,6 +1160,13 @@ class VmsModule(BaseModule):
|
|||
)
|
||||
|
||||
def update_check(self, entity):
|
||||
res = self._update_check(entity)
|
||||
if entity.next_run_configuration_exists:
|
||||
res = res and self._update_check(self._service.service(entity.id).get(next_run=True))
|
||||
|
||||
return res
|
||||
|
||||
def _update_check(self, entity):
|
||||
def check_cpu_pinning():
|
||||
if self.param('cpu_pinning'):
|
||||
current = []
|
||||
|
@ -1206,7 +1213,7 @@ class VmsModule(BaseModule):
|
|||
equal(self.param('smartcard_enabled'), getattr(vm_display, 'smartcard_enabled', False)) and
|
||||
equal(self.param('io_threads'), entity.io.threads) and
|
||||
equal(self.param('ballooning_enabled'), entity.memory_policy.ballooning) and
|
||||
equal(self.param('serial_console'), entity.console.enabled) and
|
||||
equal(self.param('serial_console'), getattr(entity.console, 'enabled', None)) and
|
||||
equal(self._get_minor(self.param('custom_compatibility_version')), self._get_minor(entity.custom_compatibility_version)) and
|
||||
equal(self._get_major(self.param('custom_compatibility_version')), self._get_major(entity.custom_compatibility_version)) and
|
||||
equal(self.param('usb_support'), entity.usb.enabled) and
|
||||
|
|
Loading…
Reference in a new issue