mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
cloudstack: cs_iso: add display_text param
This commit is contained in:
parent
3dc379c89d
commit
31d530d6af
2 changed files with 15 additions and 5 deletions
|
@ -36,6 +36,13 @@ options:
|
||||||
description:
|
description:
|
||||||
- Name of the ISO.
|
- Name of the ISO.
|
||||||
required: true
|
required: true
|
||||||
|
display_text:
|
||||||
|
description:
|
||||||
|
- Display text of the ISO.
|
||||||
|
- If not specified, C(name) will be used.
|
||||||
|
required: false
|
||||||
|
default: null
|
||||||
|
version_added: "2.4"
|
||||||
url:
|
url:
|
||||||
description:
|
description:
|
||||||
- URL where the ISO can be downloaded from. Required if C(state) is present.
|
- URL where the ISO can be downloaded from. Required if C(state) is present.
|
||||||
|
@ -238,7 +245,7 @@ class AnsibleCloudStackIso(AnsibleCloudStack):
|
||||||
def _get_common_args(self):
|
def _get_common_args(self):
|
||||||
return {
|
return {
|
||||||
'name': self.module.params.get('name'),
|
'name': self.module.params.get('name'),
|
||||||
'displaytext': self.module.params.get('name'),
|
'displaytext': self.get_or_fallback('display_text', 'name'),
|
||||||
'isdynamicallyscalable': self.module.params.get('is_dynamically_scalable'),
|
'isdynamicallyscalable': self.module.params.get('is_dynamically_scalable'),
|
||||||
'ostypeid': self.get_os_type('id'),
|
'ostypeid': self.get_os_type('id'),
|
||||||
'bootable': self.module.params.get('bootable'),
|
'bootable': self.module.params.get('bootable'),
|
||||||
|
@ -348,6 +355,7 @@ def main():
|
||||||
argument_spec = cs_argument_spec()
|
argument_spec = cs_argument_spec()
|
||||||
argument_spec.update(dict(
|
argument_spec.update(dict(
|
||||||
name=dict(required=True),
|
name=dict(required=True),
|
||||||
|
display_text=dict(),
|
||||||
url=dict(),
|
url=dict(),
|
||||||
os_type=dict(),
|
os_type=dict(),
|
||||||
zone=dict(),
|
zone=dict(),
|
||||||
|
|
|
@ -50,6 +50,7 @@
|
||||||
- name: test update iso in check mdoe
|
- name: test update iso in check mdoe
|
||||||
cs_iso:
|
cs_iso:
|
||||||
name: "{{ cs_resource_prefix }}-iso"
|
name: "{{ cs_resource_prefix }}-iso"
|
||||||
|
display_text: "{{ cs_resource_prefix }}-iso display_text"
|
||||||
url: http://mirror.switch.ch/ftp/mirror/debian-cd/current/amd64/iso-cd/debian-7.7.0-amd64-netinst.iso
|
url: http://mirror.switch.ch/ftp/mirror/debian-cd/current/amd64/iso-cd/debian-7.7.0-amd64-netinst.iso
|
||||||
os_type: CentOS 7
|
os_type: CentOS 7
|
||||||
register: iso
|
register: iso
|
||||||
|
@ -64,6 +65,7 @@
|
||||||
- name: test update iso
|
- name: test update iso
|
||||||
cs_iso:
|
cs_iso:
|
||||||
name: "{{ cs_resource_prefix }}-iso"
|
name: "{{ cs_resource_prefix }}-iso"
|
||||||
|
display_text: "{{ cs_resource_prefix }}-iso display_text"
|
||||||
url: http://mirror.switch.ch/ftp/mirror/debian-cd/current/amd64/iso-cd/debian-7.7.0-amd64-netinst.iso
|
url: http://mirror.switch.ch/ftp/mirror/debian-cd/current/amd64/iso-cd/debian-7.7.0-amd64-netinst.iso
|
||||||
os_type: CentOS 7
|
os_type: CentOS 7
|
||||||
register: iso
|
register: iso
|
||||||
|
@ -72,7 +74,7 @@
|
||||||
that:
|
that:
|
||||||
- iso|changed
|
- iso|changed
|
||||||
- iso.name == "{{ cs_resource_prefix }}-iso"
|
- iso.name == "{{ cs_resource_prefix }}-iso"
|
||||||
- iso.display_text == "{{ cs_resource_prefix }}-iso"
|
- iso.display_text == "{{ cs_resource_prefix }}-iso display_text"
|
||||||
|
|
||||||
- name: test update iso idempotence
|
- name: test update iso idempotence
|
||||||
cs_iso:
|
cs_iso:
|
||||||
|
@ -85,7 +87,7 @@
|
||||||
that:
|
that:
|
||||||
- not iso|changed
|
- not iso|changed
|
||||||
- iso.name == "{{ cs_resource_prefix }}-iso"
|
- iso.name == "{{ cs_resource_prefix }}-iso"
|
||||||
- iso.display_text == "{{ cs_resource_prefix }}-iso"
|
- iso.display_text == "{{ cs_resource_prefix }}-iso display_text"
|
||||||
|
|
||||||
- name: test remove iso in check mode
|
- name: test remove iso in check mode
|
||||||
cs_iso:
|
cs_iso:
|
||||||
|
@ -98,7 +100,7 @@
|
||||||
that:
|
that:
|
||||||
- iso|changed
|
- iso|changed
|
||||||
- iso.name == "{{ cs_resource_prefix }}-iso"
|
- iso.name == "{{ cs_resource_prefix }}-iso"
|
||||||
- iso.display_text == "{{ cs_resource_prefix }}-iso"
|
- iso.display_text == "{{ cs_resource_prefix }}-iso display_text"
|
||||||
|
|
||||||
- name: test remove iso
|
- name: test remove iso
|
||||||
cs_iso:
|
cs_iso:
|
||||||
|
@ -110,7 +112,7 @@
|
||||||
that:
|
that:
|
||||||
- iso|changed
|
- iso|changed
|
||||||
- iso.name == "{{ cs_resource_prefix }}-iso"
|
- iso.name == "{{ cs_resource_prefix }}-iso"
|
||||||
- iso.display_text == "{{ cs_resource_prefix }}-iso"
|
- iso.display_text == "{{ cs_resource_prefix }}-iso display_text"
|
||||||
|
|
||||||
- name: test remove iso idempotence
|
- name: test remove iso idempotence
|
||||||
cs_iso:
|
cs_iso:
|
||||||
|
|
Loading…
Add table
Reference in a new issue