mirror of
https://opendev.org/openstack/ansible-collections-openstack.git
synced 2026-05-14 05:22:02 +00:00
Fixes for modules generation script
Change-Id: Iffbb8e9f9106860f3d896f65831d2b9283ad1e7b
This commit is contained in:
@@ -8,7 +8,7 @@ DOCUMENTATION = '''
|
|||||||
---
|
---
|
||||||
module: {{ module_name }}
|
module: {{ module_name }}
|
||||||
short_description: {{ module_short_description }}
|
short_description: {{ module_short_description }}
|
||||||
author: {{ author_name }} <{{ author_mail }}>
|
author: Openstack Ansible SIG https://wiki.openstack.org/wiki/Ansible_SIG (@openstack)
|
||||||
description:
|
description:
|
||||||
- {{ module_long_description }}
|
- {{ module_long_description }}
|
||||||
options:
|
options:
|
||||||
@@ -42,7 +42,7 @@ class {{ module_name.split("_")|map("capitalize")|list|join("") }}Module(OpenSta
|
|||||||
|
|
||||||
argument_spec = dict(
|
argument_spec = dict(
|
||||||
{% for k, v in options.items() %}
|
{% for k, v in options.items() %}
|
||||||
{{ k | indent( width=8, indentfirst=True) }}=dict(type={{ v.type }}
|
{{ k | indent( width=8, indentfirst=True) }}=dict(type='{{ v.type }}'
|
||||||
{%- if 'required' in v %}, required={{ v.required }}{% endif %}
|
{%- if 'required' in v %}, required={{ v.required }}{% endif %}
|
||||||
{%- if 'elements' in v %}, elements={{ v.elements }}{% endif %}
|
{%- if 'elements' in v %}, elements={{ v.elements }}{% endif %}
|
||||||
{%- if 'default' in v %}, default={% if v.type == 'str' %}"{{ v.default }}"{% else %}{{ v.default }}{% endif %}{% endif %}
|
{%- if 'default' in v %}, default={% if v.type == 'str' %}"{{ v.default }}"{% else %}{{ v.default }}{% endif %}{% endif %}
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ DOCUMENTATION = '''
|
|||||||
---
|
---
|
||||||
module: {{ module_name }}
|
module: {{ module_name }}
|
||||||
short_description: {{ module_short_description }}
|
short_description: {{ module_short_description }}
|
||||||
author: {{ author_name }} <{{ author_mail }}>
|
author: Openstack Ansible SIG https://wiki.openstack.org/wiki/Ansible_SIG (@openstack)
|
||||||
description:
|
description:
|
||||||
- {{ module_long_description }}
|
- {{ module_long_description }}
|
||||||
options:
|
options:
|
||||||
@@ -46,7 +46,7 @@ class {{ module_name.split("_")|map("capitalize")|list|join("") }}Module(OpenSta
|
|||||||
|
|
||||||
argument_spec = dict(
|
argument_spec = dict(
|
||||||
{% for k, v in options.items() %}
|
{% for k, v in options.items() %}
|
||||||
{{ k | indent( width=8, indentfirst=True) }}=dict(type={{ v.type }}
|
{{ k | indent( width=8, indentfirst=True) }}=dict(type='{{ v.type }}'
|
||||||
{%- if 'required' in v %}, required={{ v.required }}{% endif %}
|
{%- if 'required' in v %}, required={{ v.required }}{% endif %}
|
||||||
{%- if 'elements' in v %}, elements={{ v.elements }}{% endif %}
|
{%- if 'elements' in v %}, elements={{ v.elements }}{% endif %}
|
||||||
{%- if 'default' in v %}, default={% if v.type == 'str' %}"{{ v.default }}"{% else %}{{ v.default }}{% endif %}{% endif %}
|
{%- if 'default' in v %}, default={% if v.type == 'str' %}"{{ v.default }}"{% else %}{{ v.default }}{% endif %}{% endif %}
|
||||||
|
|||||||
Reference in New Issue
Block a user