mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
kubevirt: Fix RS and presets template parameters (#56865)
This commit is contained in:
parent
f9b43a0f68
commit
fa6d328b8f
2 changed files with 8 additions and 2 deletions
|
@ -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')
|
||||
|
|
Loading…
Reference in a new issue