|
1 | 1 | # Test code for the ACI modules |
2 | 2 | # Copyright: (c) 2017, Bruno Calogero <brunocalogero@hotmail.com> |
| 3 | +# Copyright: (c) 2025, Eric Girard <@netgirard> |
3 | 4 |
|
4 | 5 | # GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt) |
5 | 6 |
|
|
212 | 213 | - cm_query_non_vpc_prot_grp is not changed |
213 | 214 | - nm_query_non_vpc_prot_grp is not changed |
214 | 215 | - cm_query_non_vpc_prot_grp == nm_query_non_vpc_prot_grp |
| 216 | + |
| 217 | +# ADD VPC PROTECTION GROUP WITH POD |
| 218 | +- name: Add vpc protection group with pod ID (check_mode) |
| 219 | + cisco.aci.aci_switch_policy_vpc_protection_group: |
| 220 | + <<: *aci_switch_policy_vpc_protection_group_present |
| 221 | + pod_id: 2 |
| 222 | + check_mode: true |
| 223 | + register: cm_add_vpc_prot_grp_pod |
| 224 | + |
| 225 | +- name: Add vpc protection group with pod ID (normal mode) |
| 226 | + cisco.aci.aci_switch_policy_vpc_protection_group: |
| 227 | + <<: *aci_switch_policy_vpc_protection_group_present |
| 228 | + pod_id: 2 |
| 229 | + register: nm_add_vpc_prot_grp_pod |
| 230 | + |
| 231 | +- name: Add vpc protection group with pod ID again (check_mode) |
| 232 | + cisco.aci.aci_switch_policy_vpc_protection_group: |
| 233 | + <<: *aci_switch_policy_vpc_protection_group_present |
| 234 | + pod_id: 2 |
| 235 | + check_mode: true |
| 236 | + register: cm_add_vpc_prot_grp_pod_again |
| 237 | + |
| 238 | +- name: Add vpc protection group with pod ID again (normal mode) |
| 239 | + cisco.aci.aci_switch_policy_vpc_protection_group: |
| 240 | + <<: *aci_switch_policy_vpc_protection_group_present |
| 241 | + pod_id: 2 |
| 242 | + register: nm_add_vpc_prot_grp_pod_again |
| 243 | + |
| 244 | +- name: Verify addvpc protection group with pod ID tasks |
| 245 | + ansible.builtin.assert: |
| 246 | + that: |
| 247 | + - cm_add_vpc_prot_grp_pod is changed |
| 248 | + - cm_add_vpc_prot_grp_pod.previous == [] |
| 249 | + - cm_add_vpc_prot_grp_pod.proposed.0.fabricExplicitGEp.children.0.fabricNodePEp.attributes.podId == '2' |
| 250 | + - cm_add_vpc_prot_grp_pod.proposed.0.fabricExplicitGEp.children.1.fabricNodePEp.attributes.podId == '2' |
| 251 | + - nm_add_vpc_prot_grp_pod is changed |
| 252 | + - nm_add_vpc_prot_grp_pod.current.0.fabricExplicitGEp.children.0.fabricNodePEp.attributes.podId == '2' |
| 253 | + - nm_add_vpc_prot_grp_pod.current.0.fabricExplicitGEp.children.1.fabricNodePEp.attributes.podId == '2' |
| 254 | + - nm_add_vpc_prot_grp_pod.current.0.fabricExplicitGEp.attributes.annotation == 'orchestrator:ansible' |
| 255 | + - cm_add_vpc_prot_grp_pod_again is not changed |
| 256 | + - nm_add_vpc_prot_grp_pod_again is not changed |
0 commit comments