1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

kubevirt_vm: rename parameters to template_parameters (#54676)

This commit is contained in:
Ondra Machacek 2019-04-01 15:59:43 +02:00 committed by ansibot
parent 48ec8d13a0
commit f405d97e1e

View file

@ -66,7 +66,7 @@ options:
description: description:
- "Template to used to create a virtual machine." - "Template to used to create a virtual machine."
type: str type: str
parameters: template_parameters:
description: description:
- "Value of parameters to be replaced in template parameters." - "Value of parameters to be replaced in template parameters."
type: dict type: dict
@ -243,7 +243,7 @@ VM_ARG_SPEC = {
}, },
'datavolumes': {'type': 'list'}, 'datavolumes': {'type': 'list'},
'template': {'type': 'str'}, 'template': {'type': 'str'},
'parameters': {'type': 'dict'}, 'template_parameters': {'type': 'dict'},
} }
@ -335,7 +335,7 @@ class KubeVirtVM(KubeVirtRawModule):
proccess_template = template_resource.get(name=vm_template, namespace=self.params.get('namespace')) proccess_template = template_resource.get(name=vm_template, namespace=self.params.get('namespace'))
# Set proper template values set by Ansible parameter 'parameters': # Set proper template values set by Ansible parameter 'parameters':
for k, v in self.params.get('parameters', {}).items(): for k, v in self.params.get('template_parameters', {}).items():
for parameter in proccess_template.parameters: for parameter in proccess_template.parameters:
if parameter.name == k: if parameter.name == k:
parameter.value = v parameter.value = v