summaryrefslogtreecommitdiff
path: root/test/integration/targets/cs_configuration/tasks/storage.yml
blob: e376dcf19f5f64660751a0d02b5e7c11f5042494 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
---
- 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 is successful

- 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 is successful
    - config is 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 is successful
    - config is 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 is successful
    - config is not 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 is successful
    - config is changed
    - config.value == "2.0"
    - config.name == "storage.overprovisioning.factor"
    - config.scope == "storagepool"
    - config.storage == "{{ test_cs_configuration_storage }}"