|
158 | 158 | - 'result_1c.response|length == 0'
|
159 | 159 | - 'result_1c.diff|length == 0'
|
160 | 160 |
|
| 161 | +- name: TEST.1e - DELETED - [merged] Create, Attach VRF ansible-vrf (L3VNI W/O VLAN) |
| 162 | + cisco.dcnm.dcnm_vrf: |
| 163 | + fabric: "{{ fabric_1 }}" |
| 164 | + state: merged |
| 165 | + config: |
| 166 | + - vrf_name: ansible-vrf-int1 |
| 167 | + vrf_id: 9008011 |
| 168 | + vrf_template: Default_VRF_Universal |
| 169 | + vrf_extension_template: Default_VRF_Extension_Universal |
| 170 | + l3vni_wo_vlan: true |
| 171 | + attach: |
| 172 | + - ip_address: "{{ switch_1 }}" |
| 173 | + - ip_address: "{{ switch_2 }}" |
| 174 | + deploy: false |
| 175 | + register: result_1e |
| 176 | + |
| 177 | +- name: TEST.1f - DELETED - [query] query VRF state |
| 178 | + cisco.dcnm.dcnm_vrf: |
| 179 | + fabric: "{{ fabric_1 }}" |
| 180 | + state: query |
| 181 | + register: result_1f |
| 182 | + |
| 183 | +- name: TEST.1g - DELETED - [debug] print result_1e |
| 184 | + debug: |
| 185 | + var: result_1e |
| 186 | + |
| 187 | +- assert: |
| 188 | + that: |
| 189 | + - 'result_1e.changed == true' |
| 190 | + - 'result_1e.response[0].RETURN_CODE == 200' |
| 191 | + - 'result_1e.response[1].RETURN_CODE == 200' |
| 192 | + - '(result_1e.response[1].DATA|dict2items)[0].value == "SUCCESS"' |
| 193 | + - '(result_1e.response[1].DATA|dict2items)[1].value == "SUCCESS"' |
| 194 | + - '"{{ switch_1 }}" in result_1e.diff[0].attach[0].ip_address or "{{ switch_1 }}" in result_1e.diff[0].attach[1].ip_address' |
| 195 | + - '"{{ switch_2 }}" in result_1e.diff[0].attach[0].ip_address or "{{ switch_2 }}" in result_1e.diff[0].attach[1].ip_address' |
| 196 | + - 'result_1e.diff[0].vrf_name == "ansible-vrf-int1"' |
| 197 | + - '"enableL3VniNoVlan\":\"true\"" in result_1f.response[0].parent.vrfTemplateConfig' |
| 198 | + |
| 199 | +- name: TEST.1h - DELETED - [deleted] Delete VRF ansible-vrf-int1 |
| 200 | + cisco.dcnm.dcnm_vrf: &conf1h |
| 201 | + fabric: "{{ fabric_1 }}" |
| 202 | + state: deleted |
| 203 | + config: |
| 204 | + - vrf_name: ansible-vrf-int1 |
| 205 | + vrf_id: 9008011 |
| 206 | + vrf_template: Default_VRF_Universal |
| 207 | + vrf_extension_template: Default_VRF_Extension_Universal |
| 208 | + register: result_1h |
| 209 | + |
| 210 | +- name: TEST.1j - DELETED - [debug] print result_1 |
| 211 | + debug: |
| 212 | + var: result_1h |
| 213 | + |
| 214 | +- assert: |
| 215 | + that: |
| 216 | + - 'result_1h.changed == true' |
| 217 | + - 'result_1h.response[0].RETURN_CODE == 200' |
| 218 | + - 'result_1h.response[1].RETURN_CODE == 200' |
| 219 | + - 'result_1h.response[1].MESSAGE == "OK"' |
| 220 | + - 'result_1h.response[2].RETURN_CODE == 200' |
| 221 | + - 'result_1h.response[2].METHOD == "DELETE"' |
| 222 | + - '(result_1h.response[0].DATA|dict2items)[0].value == "SUCCESS"' |
| 223 | + - '(result_1h.response[0].DATA|dict2items)[1].value == "SUCCESS"' |
| 224 | + - 'result_1h.diff[0].attach[0].deploy == false' |
| 225 | + - 'result_1h.diff[0].attach[1].deploy == false' |
| 226 | + - 'result_1h.diff[0].vrf_name == "ansible-vrf-int1"' |
| 227 | + |
| 228 | +- name: TEST.1k - DELETED - [deleted] conf1h - Idempotence |
| 229 | + cisco.dcnm.dcnm_vrf: *conf1h |
| 230 | + register: result_1k |
| 231 | + |
| 232 | +- name: TEST.1l - DELETED - [debug] print result_1k |
| 233 | + debug: |
| 234 | + var: result_1k |
| 235 | + |
| 236 | +- assert: |
| 237 | + that: |
| 238 | + - 'result_1k.changed == false' |
| 239 | + - 'result_1k.response|length == 0' |
| 240 | + - 'result_1k.diff|length == 0' |
| 241 | + |
161 | 242 | - name: TEST.2 - DELETED - [merged] Create, Attach, Deploy VLAN+VRF+LITE ansible-vrf-int1 switch_2
|
162 | 243 | cisco.dcnm.dcnm_vrf:
|
163 | 244 | fabric: "{{ fabric_1 }}"
|
|
0 commit comments