mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-09 06:40:03 -07:00
cloudstack: new module cs_disk_offering (#41795)
This commit is contained in:
parent
7135c1302a
commit
f30e0b833d
4 changed files with 521 additions and 0 deletions
2
test/integration/targets/cs_disk_offering/aliases
Normal file
2
test/integration/targets/cs_disk_offering/aliases
Normal file
|
@ -0,0 +1,2 @@
|
|||
cloud/cs
|
||||
posix/ci/cloud/group1/cs
|
3
test/integration/targets/cs_disk_offering/meta/main.yml
Normal file
3
test/integration/targets/cs_disk_offering/meta/main.yml
Normal file
|
@ -0,0 +1,3 @@
|
|||
---
|
||||
dependencies:
|
||||
- cs_common
|
143
test/integration/targets/cs_disk_offering/tasks/main.yml
Normal file
143
test/integration/targets/cs_disk_offering/tasks/main.yml
Normal file
|
@ -0,0 +1,143 @@
|
|||
---
|
||||
- name: setup disk offering
|
||||
cs_disk_offering:
|
||||
name: Small
|
||||
state: absent
|
||||
register: do
|
||||
- name: verify setup disk offering
|
||||
assert:
|
||||
that:
|
||||
- do is successful
|
||||
|
||||
- name: create disk offering in check mode
|
||||
cs_disk_offering:
|
||||
name: Small
|
||||
disk_size: 10
|
||||
storage_tags:
|
||||
- eco
|
||||
- backup
|
||||
storage_type: local
|
||||
register: do
|
||||
check_mode: true
|
||||
- name: verify create disk offering in check mode
|
||||
assert:
|
||||
that:
|
||||
- do is changed
|
||||
|
||||
- name: create disk offering
|
||||
cs_disk_offering:
|
||||
name: Small
|
||||
disk_size: 10
|
||||
storage_tags:
|
||||
- eco
|
||||
- backup
|
||||
storage_type: local
|
||||
register: do
|
||||
- name: verify create disk offering
|
||||
assert:
|
||||
that:
|
||||
- do is changed
|
||||
- do.name == "Small"
|
||||
- do.storage_tags == ['eco', 'backup']
|
||||
- do.storage_type == "local"
|
||||
|
||||
- name: create disk offering idempotence
|
||||
cs_disk_offering:
|
||||
name: Small
|
||||
disk_size: 10
|
||||
storage_tags:
|
||||
- eco
|
||||
- backup
|
||||
storage_type: local
|
||||
register: do
|
||||
- name: verify create disk offering idempotence
|
||||
assert:
|
||||
that:
|
||||
- do is not changed
|
||||
- do.name == "Small"
|
||||
- do.storage_tags == ['eco', 'backup']
|
||||
- do.storage_type == "local"
|
||||
|
||||
- name: update disk offering in check mode
|
||||
cs_disk_offering:
|
||||
name: Small
|
||||
disk_size: 10
|
||||
display_text: Small 10GB
|
||||
register: do
|
||||
check_mode: true
|
||||
- name: verify create update offering in check mode
|
||||
assert:
|
||||
that:
|
||||
- do is changed
|
||||
- do.name == "Small"
|
||||
- do.storage_tags == ['eco', 'backup']
|
||||
- do.storage_type == "local"
|
||||
|
||||
- name: update disk offering
|
||||
cs_disk_offering:
|
||||
name: Small
|
||||
disk_size: 10
|
||||
display_text: Small 10GB
|
||||
register: do
|
||||
- name: verify update disk offerin
|
||||
assert:
|
||||
that:
|
||||
- do is changed
|
||||
- do.name == "Small"
|
||||
- do.display_text == "Small 10GB"
|
||||
- do.storage_tags == ['eco', 'backup']
|
||||
- do.storage_type == "local"
|
||||
|
||||
- name: update disk offering idempotence
|
||||
cs_disk_offering:
|
||||
name: Small
|
||||
disk_size: 10
|
||||
display_text: Small 10GB
|
||||
register: do
|
||||
- name: verify update disk offering idempotence
|
||||
assert:
|
||||
that:
|
||||
- do is not changed
|
||||
- do.name == "Small"
|
||||
- do.display_text == "Small 10GB"
|
||||
- do.storage_tags == ['eco', 'backup']
|
||||
- do.storage_type == "local"
|
||||
|
||||
- name: remove disk offering in check mode
|
||||
cs_disk_offering:
|
||||
name: Small
|
||||
state: absent
|
||||
check_mode: true
|
||||
register: do
|
||||
- name: verify remove disk offering in check mode
|
||||
assert:
|
||||
that:
|
||||
- do is changed
|
||||
- do.name == "Small"
|
||||
- do.display_text == "Small 10GB"
|
||||
- do.storage_tags == ['eco', 'backup']
|
||||
- do.storage_type == "local"
|
||||
|
||||
- name: remove disk offering
|
||||
cs_disk_offering:
|
||||
name: Small
|
||||
state: absent
|
||||
register: do
|
||||
- name: verify remove disk offering
|
||||
assert:
|
||||
that:
|
||||
- do is changed
|
||||
- do.name == "Small"
|
||||
- do.display_text == "Small 10GB"
|
||||
- do.storage_tags == ['eco', 'backup']
|
||||
- do.storage_type == "local"
|
||||
|
||||
- name: remove disk offering idempotence
|
||||
cs_disk_offering:
|
||||
name: Small
|
||||
state: absent
|
||||
register: do
|
||||
- name: verify remove disk offering idempotence
|
||||
assert:
|
||||
that:
|
||||
- do is not changed
|
Loading…
Add table
Add a link
Reference in a new issue