mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
add ovirt template clone name (#54596)
* add ovirt template clone name * ovirt template clone name update docs
This commit is contained in:
parent
e58f23b73e
commit
71216cace5
1 changed files with 9 additions and 2 deletions
|
@ -179,6 +179,11 @@ options:
|
||||||
- Upper bound of template memory up to which memory hot-plug can be performed.
|
- Upper bound of template memory up to which memory hot-plug can be performed.
|
||||||
Prefix uses IEC 60027-2 standard (for example 1GiB, 1024MiB).
|
Prefix uses IEC 60027-2 standard (for example 1GiB, 1024MiB).
|
||||||
version_added: "2.6"
|
version_added: "2.6"
|
||||||
|
clone_name:
|
||||||
|
description:
|
||||||
|
- Name for importing Template from storage domain.
|
||||||
|
- If not defined, C(name) will be used.
|
||||||
|
version_added: "2.8"
|
||||||
extends_documentation_fragment: ovirt
|
extends_documentation_fragment: ovirt
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
@ -476,6 +481,7 @@ def main():
|
||||||
export_domain=dict(default=None),
|
export_domain=dict(default=None),
|
||||||
storage_domain=dict(default=None),
|
storage_domain=dict(default=None),
|
||||||
exclusive=dict(type='bool'),
|
exclusive=dict(type='bool'),
|
||||||
|
clone_name=dict(default=None),
|
||||||
image_provider=dict(default=None),
|
image_provider=dict(default=None),
|
||||||
image_disk=dict(default=None, aliases=['glance_image_disk_name']),
|
image_disk=dict(default=None, aliases=['glance_image_disk_name']),
|
||||||
io_threads=dict(type='int', default=None),
|
io_threads=dict(type='int', default=None),
|
||||||
|
@ -534,7 +540,7 @@ def main():
|
||||||
)
|
)
|
||||||
elif state == 'imported':
|
elif state == 'imported':
|
||||||
template = templates_module.search_entity()
|
template = templates_module.search_entity()
|
||||||
if template:
|
if template and module.params['clone_name'] is None:
|
||||||
ret = templates_module.create(
|
ret = templates_module.create(
|
||||||
result_state=otypes.TemplateStatus.OK,
|
result_state=otypes.TemplateStatus.OK,
|
||||||
)
|
)
|
||||||
|
@ -546,8 +552,9 @@ def main():
|
||||||
name=module.params['template_image_disk_name'] or module.params['image_disk']
|
name=module.params['template_image_disk_name'] or module.params['image_disk']
|
||||||
),
|
),
|
||||||
template=otypes.Template(
|
template=otypes.Template(
|
||||||
name=module.params['name'],
|
name=module.params['name'] if module.params['clone_name'] is None else module.params['clone_name'],
|
||||||
),
|
),
|
||||||
|
clone=True if module.params['clone_name'] is not None else False,
|
||||||
import_as_template=True,
|
import_as_template=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue