ansible/test/integration/targets/cs_configuration/tasks/storage.yml
René Moser d5b04aa1f1 cloudstack: add check mode tests (#24908)
* cloudstack: test: cs_network_acl: add check_mode tests

* cloudstack: test: cs_pod: add check_mode tests

* cloudstack: test: cs_user: add check_mode tests

* cloudstack: test: cs_sshkeypair: add check_mode tests

* cloudstack: test: cs_project: add check_mode tests

* cloudstack: test: cs_vpc: add check_mode tests

* cloudstack: test: cs_vpn_gateway: add check_mode tests

* cloudstack: test: cs_volume: add check_mode tests

* cloudstack: test: cs_vmsnapshot: add check_mode tests

* cloudstack: test: cs_account: add check_mode tests

* cloudstack: test: cs_affinitygroup: add check_mode tests

* cloudstack: test: cs_cluster: add check_mode tests

* cloudstack: test: cs_domain: add check_mode tests

* cloudstack: test: cs_instancegroup: add check_mode tests

* cloudstack: test: cs_iso: add check_mode tests

* cloudstack: test: cs_loadbalancer_rule: add check_mode tests

* cloudstack: test: cs_portforward: add check_mode tests

* cloudstack: test: cs_resourcelimit: add check_mode tests

* cloudstack: test: cs_securitygroup: add check_mode tests

* cloudstack: test: cs_securitygroup_rule: add check_mode tests

* cloudstack: test: cs_configuration: add check_mode tests

* cloudstack: test: cs_firewall: add check_mode tests

* cloudstack: test: cs_instance: add check_mode tests

* cloudstack: query current tags from API

Fixes unexpected tags returned in check mode.
2017-05-26 12:19:47 +02:00

76 lines
2.2 KiB
YAML

---
- name: test configuration storage
cs_configuration:
name: storage.overprovisioning.factor
storage: "{{ test_cs_configuration_storage }}"
value: 2.0
register: config
- name: verify test configuration storage
assert:
that:
- config|success
- name: test update configuration storage in check mode
cs_configuration:
name: storage.overprovisioning.factor
storage: "{{ test_cs_configuration_storage }}"
value: 3.0
register: config
check_mode: true
- name: verify update configuration storage in check mode
assert:
that:
- config|success
- config|changed
- config.value == "2.0"
- config.name == "storage.overprovisioning.factor"
- config.scope == "storagepool"
- config.storage == "{{ test_cs_configuration_storage }}"
- name: test update configuration storage
cs_configuration:
name: storage.overprovisioning.factor
storage: "{{ test_cs_configuration_storage }}"
value: 3.0
register: config
- name: verify update configuration storage
assert:
that:
- config|success
- config|changed
- config.value == "3.0"
- config.name == "storage.overprovisioning.factor"
- config.scope == "storagepool"
- config.storage == "{{ test_cs_configuration_storage }}"
- name: test update configuration storage idempotence
cs_configuration:
name: storage.overprovisioning.factor
storage: "{{ test_cs_configuration_storage }}"
value: 3.0
register: config
- name: verify update configuration storage idempotence
assert:
that:
- config|success
- not config|changed
- config.value == "3.0"
- config.name == "storage.overprovisioning.factor"
- config.scope == "storagepool"
- config.storage == "{{ test_cs_configuration_storage }}"
- name: test reset configuration storage
cs_configuration:
name: storage.overprovisioning.factor
storage: "{{ test_cs_configuration_storage }}"
value: 2.0
register: config
- name: verify reset configuration storage
assert:
that:
- config|success
- config|changed
- config.value == "2.0"
- config.name == "storage.overprovisioning.factor"
- config.scope == "storagepool"
- config.storage == "{{ test_cs_configuration_storage }}"