mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-01 08:13:08 +00:00
kubevirt: Fix RS and presets template parameters (#56865)
This commit is contained in:
@@ -129,8 +129,11 @@ class KubeVirtVMPreset(KubeVirtRawModule):
|
||||
# attributes there, remove when we do:
|
||||
definition['spec']['domain']['devices'] = dict()
|
||||
|
||||
# defaults for template
|
||||
defaults = {'disks': [], 'volumes': [], 'interfaces': [], 'networks': []}
|
||||
|
||||
# Execute the CURD of VM:
|
||||
dummy, definition = self.construct_vm_definition(KIND, definition, definition)
|
||||
dummy, definition = self.construct_vm_definition(KIND, definition, definition, defaults)
|
||||
result_crud = self.execute_crud(KIND, definition)
|
||||
changed = result_crud['changed']
|
||||
result = result_crud.pop('result')
|
||||
|
||||
@@ -173,9 +173,12 @@ class KubeVirtVMIRS(KubeVirtRawModule):
|
||||
if replicas is not None:
|
||||
definition['spec']['replicas'] = replicas
|
||||
|
||||
# defaults for template
|
||||
defaults = {'disks': [], 'volumes': [], 'interfaces': [], 'networks': []}
|
||||
|
||||
# Execute the CURD of VM:
|
||||
template = definition['spec']['template']
|
||||
dummy, definition = self.construct_vm_definition(KIND, definition, template)
|
||||
dummy, definition = self.construct_vm_definition(KIND, definition, template, defaults)
|
||||
result_crud = self.execute_crud(KIND, definition)
|
||||
changed = result_crud['changed']
|
||||
result = result_crud.pop('result')
|
||||
|
||||
Reference in New Issue
Block a user