Debian Codegraph @

ansible_collections/cisco/mso/tests/integration/targets/ndo_l3out_template/tasks/main.yml

raw symbols SCIP
1 # Test code for the MSO modules
2 # Copyright: (c) 2024, Sabari Jaganathan (@sajagana) <[email protected]>
3
4 # GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
5
6 - name: Test that we have an ACI MultiSite host, username and password
7 ansible.builtin.fail:
8 msg: "Please define the following variables: mso_hostname, mso_username and mso_password."
9 when: mso_hostname is not defined or mso_username is not defined or mso_password is not defined
10
11 # CLEAN ENVIRONMENT
12 - name: Set vars
13 ansible.builtin.set_fact:
14 mso_info: &mso_info
15 host: "{{ mso_hostname }}"
16 username: "{{ mso_username }}"
17 password: "{{ mso_password }}"
18 validate_certs: "{{ mso_validate_certs | default(false) }}"
19 use_ssl: "{{ mso_use_ssl | default(true) }}"
20 use_proxy: "{{ mso_use_proxy | default(true) }}"
21 output_level: '{{ mso_output_level | default("debug") }}'
22
23 # QUERY VERSION
24 - name: Query MSO version
25 cisco.mso.mso_version:
26 <<: *mso_info
27 state: query
28 register: version
29
30 - name: Execute tasks only for NDO version > 4.2
31 when: version.current.version is version('4.2', '>')
32 block:
33 # Setup Part
34 - name: Ensure l3out template not exist
35 cisco.mso.ndo_template: &ndo_l3out_template_absent
36 <<: *mso_info
37 template: '{{ ansible_l3out_template | default("ansible_test") }}'
38 template_type: l3out
39 tenant: '{{ ansible_tenant | default("ansible_test") }}'
40 sites:
41 - name: '{{ mso_site | default("ansible_test") }}'
42 state: absent
43
44 - name: Ensure tenant policy template not exists
45 cisco.mso.ndo_template: &tenant_pol_template_absent
46 <<: *mso_info
47 name: ansible_test_policy
48 template_type: tenant
49 tenant: '{{ ansible_tenant | default("ansible_test") }}'
50 state: absent
51
52 - name: Ensure fabric_policy template not exists
53 cisco.mso.ndo_template: &fabric_pol_template_absent
54 <<: *mso_info
55 name: ans_fabric_pol_template
56 template_type: fabric_policy
57 state: absent
58
59 - name: Ensure ansible_test schema template not exist
60 cisco.mso.mso_schema_template: &mso_schema_template_absent
61 <<: *mso_info
62 schema: '{{ mso_schema | default("ansible_test") }}'
63 tenant: '{{ ansible_tenant | default("ansible_test") }}'
64 template: "Template1"
65 state: absent
66
67 - name: Ensure ansible_test site exist
68 cisco.mso.mso_site:
69 <<: *mso_info
70 site: '{{ mso_site | default("ansible_test") }}'
71 state: query
72 register: ansible_test_site
73
74 - name: Ensure ansible_test tenant exist
75 cisco.mso.mso_tenant:
76 <<: *mso_info
77 tenant: '{{ ansible_tenant | default("ansible_test") }}'
78 users:
79 - "{{ mso_username }}"
80 sites:
81 - '{{ mso_site | default("ansible_test") }}'
82 state: present
83 when: ansible_test_site.current.common.name == 'ansible_test'
84
85 # Schema Template Setup for the VRF
86 - name: Add an ansible_test schema template
87 cisco.mso.mso_schema_template:
88 <<: *mso_schema_template_absent
89 state: present
90
91 - name: Add a new VRF1
92 cisco.mso.mso_schema_template_vrf: &vrf1_present
93 <<: *mso_info
94 schema: '{{ mso_schema | default("ansible_test") }}'
95 template: "Template1"
96 vrf: VRF1
97 state: present
98
99 - name: Add a new VRF2 with layer3_multicast
100 cisco.mso.mso_schema_template_vrf:
101 <<: *vrf1_present
102 vrf: VRF2
103 layer3_multicast: true
104 state: present
105
106 # Tenant Policy Template Setup for the Route Map
107 - name: Ensure tenant policy template exists
108 cisco.mso.ndo_template:
109 <<: *tenant_pol_template_absent
110 state: present
111 register: ansible_test_policy
112
113 - name: Add a new Route Map Policy for Route Control (<5.0)
114 cisco.mso.mso_rest:
115 <<: *mso_info
116 path: "/mso/api/v1/templates/{{ ansible_test_policy.current.templateId }}"
117 method: patch
118 content:
119 - op: add
120 path: "/tenantPolicyTemplate/template/routeMapPolicies/-"
121 value:
122 name: "{{ item }}"
123 description: ""
124 rtMapEntryList:
125 - rtMapContext:
126 order: 0
127 name: ctxName
128 action: permit
129 loop:
130 - ans_route_map
131 - ans_route_map_2
132 when: version.current.version is version('5.0', '<')
133
134 - name: Add a new Route Map Policy for Route Control (>=5.0)
135 cisco.mso.mso_rest:
136 <<: *mso_info
137 path: "/mso/api/v1/templates/{{ ansible_test_policy.current.templateId }}"
138 method: patch
139 content:
140 - op: add
141 path: "/tenantPolicyTemplate/template/routeMapPolicies/-"
142 value:
143 name: "{{ item }}"
144 description: ""
145 contexts:
146 - order: 0
147 name: ctxName
148 action: permit
149 loop:
150 - ans_route_map
151 - ans_route_map_2
152 when: version.current.version is version('5.0', '>=')
153
154 # Fabric Policy Template Setup for the L3Out Domain
155 - name: Ensure fabric_policy template exists
156 cisco.mso.ndo_template:
157 <<: *fabric_pol_template_absent
158 sites:
159 - name: '{{ mso_site | default("ansible_test") }}'
160 state: present
161 register: ans_fabric_pol_template
162
163 - name: Create a new vlan pool
164 cisco.mso.ndo_vlan_pool:
165 <<: *mso_info
166 template: ans_fabric_pol_template
167 vlan_pool: "ansible_test_vlan_pool_1"
168 vlan_ranges:
169 - from_vlan: 100
170 to_vlan: 100
171 state: present
172
173 - name: Create a new ans_l3_domain
174 cisco.mso.ndo_l3_domain:
175 <<: *mso_info
176 template: ans_fabric_pol_template
177 l3_domain: ans_l3_domain
178 pool: ansible_test_vlan_pool_1
179 state: present
180
181 # L3Out Template Setup
182 - name: Create a new l3out template
183 cisco.mso.ndo_template:
184 <<: *ndo_l3out_template_absent
185 state: present
186 register: create_new_l3out_policy_template
187
188 # Test Part
189 - name: Query all L3Out objects when the L3Out template is empty
190 cisco.mso.ndo_l3out_template:
191 <<: *mso_info
192 l3out_template: '{{ ansible_l3out_template | default("ansible_test") }}'
193 state: "query"
194 register: query_all_l3outs_with_empty_template
195
196 - name: Assertion check for query all L3Out objects when the L3Out template is empty
197 ansible.builtin.assert:
198 that:
199 - query_all_l3outs_with_empty_template is not changed
200 - query_all_l3outs_with_empty_template.current == {}
201
202 - name: Create L3Out object with default values - check_mode
203 cisco.mso.ndo_l3out_template: &cm_l3out_1_present
204 <<: *mso_info
205 l3out_template: '{{ ansible_l3out_template | default("ansible_test") }}'
206 name: "l3out_1"
207 vrf:
208 name: "VRF1"
209 schema: '{{ mso_schema | default("ansible_test") }}'
210 template: "Template1"
211 state: "present"
212 output_level: debug
213 check_mode: true
214 register: cm_l3out_1_present
215
216 - name: Assertion check for create L3Out object with default values - check_mode
217 ansible.builtin.assert:
218 that:
219 - cm_l3out_1_present is changed
220 - cm_l3out_1_present.current.name == "l3out_1"
221 - cm_l3out_1_present.current.routingProtocol == "none"
222 - cm_l3out_1_present.current.vrfRef != ""
223 - cm_l3out_1_present.current.vrfName == "VRF1"
224 - cm_l3out_1_present.previous == {}
225 - cm_l3out_1_present.proposed.name == "l3out_1"
226 - cm_l3out_1_present.proposed.routingProtocol == "none"
227 - cm_l3out_1_present.proposed.vrfRef != ""
228 - cm_l3out_1_present.proposed.vrfName == "VRF1"
229
230 - name: Create L3Out object with default values - normal_mode
231 cisco.mso.ndo_l3out_template: &nm_l3out_1_present
232 <<: *cm_l3out_1_present
233 register: nm_l3out_1_present
234
235 - name: Assertion check for create L3Out object with default values - normal_mode
236 ansible.builtin.assert:
237 that:
238 - nm_l3out_1_present is changed
239 - nm_l3out_1_present.current.name == "l3out_1"
240 - nm_l3out_1_present.current.routingProtocol == "none"
241 - nm_l3out_1_present.current.vrfRef != ""
242 - nm_l3out_1_present.current.vrfName == "VRF1"
243 - nm_l3out_1_present.previous == {}
244 - nm_l3out_1_present.proposed.name == "l3out_1"
245 - nm_l3out_1_present.proposed.routingProtocol == "none"
246 - nm_l3out_1_present.proposed.vrfRef != ""
247 - nm_l3out_1_present.proposed.vrfName == "VRF1"
248
249 - name: Create L3Out object with default values - normal_mode - again
250 cisco.mso.ndo_l3out_template:
251 <<: *nm_l3out_1_present
252 register: nm_l3out_1_present_again
253
254 - name: Assertion check for create L3Out object with default values - normal_mode - again
255 ansible.builtin.assert:
256 that:
257 - nm_l3out_1_present_again is not changed
258 - nm_l3out_1_present_again.current.importRouteControl == false
259 - nm_l3out_1_present_again.current.l3domain == ""
260 - nm_l3out_1_present_again.current.name == "l3out_1"
261 - nm_l3out_1_present_again.current.pim == false
262 - nm_l3out_1_present_again.current.routingProtocol == "none"
263 - nm_l3out_1_present_again.current.tagAnnotations == []
264 - nm_l3out_1_present_again.current.targetDscp == "unspecified"
265 - nm_l3out_1_present_again.current.uuid is defined
266 - nm_l3out_1_present_again.current.vrfRef != ""
267 - nm_l3out_1_present_again.current.vrfName == "VRF1"
268 - nm_l3out_1_present_again.previous.importRouteControl == false
269 - nm_l3out_1_present_again.previous.l3domain == ""
270 - nm_l3out_1_present_again.previous.name == "l3out_1"
271 - nm_l3out_1_present_again.previous.pim == false
272 - nm_l3out_1_present_again.previous.routingProtocol == "none"
273 - nm_l3out_1_present_again.previous.tagAnnotations == []
274 - nm_l3out_1_present_again.previous.targetDscp == "unspecified"
275 - nm_l3out_1_present_again.previous.uuid is defined
276 - nm_l3out_1_present_again.previous.vrfRef != ""
277 - nm_l3out_1_present_again.previous.vrfName == "VRF1"
278 - nm_l3out_1_present_again.proposed.importRouteControl == false
279 - nm_l3out_1_present_again.proposed.l3domain == ""
280 - nm_l3out_1_present_again.proposed.name == "l3out_1"
281 - nm_l3out_1_present_again.proposed.pim == false
282 - nm_l3out_1_present_again.proposed.routingProtocol == "none"
283 - nm_l3out_1_present_again.proposed.tagAnnotations == []
284 - nm_l3out_1_present_again.proposed.targetDscp == "unspecified"
285 - nm_l3out_1_present_again.proposed.uuid is defined
286 - nm_l3out_1_present_again.proposed.vrfRef != ""
287 - nm_l3out_1_present_again.proposed.vrfName == "VRF1"
288
289 - name: Update L3Out object with check_mode
290 cisco.mso.ndo_l3out_template: &cm_l3out_1_update
291 <<: *mso_info
292 l3out_template: '{{ ansible_l3out_template | default("ansible_test") }}'
293 name: "l3out_1"
294 l3_domain: ans_l3_domain
295 vrf:
296 name: "VRF1"
297 schema: '{{ mso_schema | default("ansible_test") }}'
298 template: "Template1"
299 description: "test description"
300 pim: false
301 target_dscp: "unspecified"
302 interleak: "ans_route_map"
303 static_route_redistribution: "ans_route_map"
304 connected_route_redistribution: "ans_route_map"
305 attached_host_route_redistribution: "ans_route_map"
306 ospf:
307 state: enabled
308 area_id: "0.0.0.1"
309 area_type: "regular"
310 cost: 1
311 send_redistributed_lsas: true
312 originate_summary_lsa: true
313 suppress_forwarding_addr_translated_lsa: true
314 originate_default_route: "only"
315 originate_default_route_always: false
316 bgp:
317 state: enabled
318 route_dampening_ipv4: "ans_route_map"
319 route_dampening_ipv6: "ans_route_map"
320 inbound_route_map: "ans_route_map"
321 outbound_route_map: "ans_route_map"
322 state: "present"
323 output_level: debug
324 register: cm_l3out_1_update
325 check_mode: true
326
327 - name: Assertion check for update L3Out object with check_mode
328 ansible.builtin.assert:
329 that:
330 - cm_l3out_1_update is changed
331 - cm_l3out_1_update.current.advancedRouteMapRefs.attachedHostRouteRedistRef != ""
332 - cm_l3out_1_update.current.advancedRouteMapRefs.connectedRouteRedistRef != ""
333 - cm_l3out_1_update.current.advancedRouteMapRefs.interleakRef != ""
334 - cm_l3out_1_update.current.advancedRouteMapRefs.routeDampeningV4Ref != ""
335 - cm_l3out_1_update.current.advancedRouteMapRefs.routeDampeningV6Ref != ""
336 - cm_l3out_1_update.current.advancedRouteMapRefs.staticRouteRedistRef != ""
337 - cm_l3out_1_update.current.advancedRouteMapRefs.attachedHostRouteRedistName == "ans_route_map"
338 - cm_l3out_1_update.current.advancedRouteMapRefs.connectedRouteRedistName == "ans_route_map"
339 - cm_l3out_1_update.current.advancedRouteMapRefs.interleakName == "ans_route_map"
340 - cm_l3out_1_update.current.advancedRouteMapRefs.routeDampeningV4Name == "ans_route_map"
341 - cm_l3out_1_update.current.advancedRouteMapRefs.routeDampeningV6Name == "ans_route_map"
342 - cm_l3out_1_update.current.advancedRouteMapRefs.staticRouteRedistName == "ans_route_map"
343 - cm_l3out_1_update.current.defaultRouteLeak.always == false
344 - cm_l3out_1_update.current.defaultRouteLeak.originateDefaultRoute == "only"
345 - cm_l3out_1_update.current.description == "test description"
346 - cm_l3out_1_update.current.exportRouteMapRef != ""
347 - cm_l3out_1_update.current.exportRouteMapName == "ans_route_map"
348 - cm_l3out_1_update.current.importRouteControl == true
349 - cm_l3out_1_update.current.importRouteMapRef != ""
350 - cm_l3out_1_update.current.importRouteMapName == "ans_route_map"
351 - cm_l3out_1_update.current.l3domain == "ans_l3_domain"
352 - cm_l3out_1_update.current.name == "l3out_1"
353 - cm_l3out_1_update.current.ospfAreaConfig.areaType == "regular"
354 - cm_l3out_1_update.current.ospfAreaConfig.control.originate == true
355 - cm_l3out_1_update.current.ospfAreaConfig.control.redistribute == true
356 - cm_l3out_1_update.current.ospfAreaConfig.control.suppressFA == true
357 - cm_l3out_1_update.current.ospfAreaConfig.cost == 1
358 - cm_l3out_1_update.current.ospfAreaConfig.id == "0.0.0.1"
359 - cm_l3out_1_update.current.pim == false
360 - cm_l3out_1_update.current.routingProtocol == "bgpOspf"
361 - cm_l3out_1_update.current.tagAnnotations == []
362 - cm_l3out_1_update.current.targetDscp == "unspecified"
363 - cm_l3out_1_update.current.uuid is defined
364 - cm_l3out_1_update.current.vrfRef != ""
365 - cm_l3out_1_update.previous.importRouteControl == false
366 - cm_l3out_1_update.previous.l3domain == ""
367 - cm_l3out_1_update.previous.name == "l3out_1"
368 - cm_l3out_1_update.previous.pim == false
369 - cm_l3out_1_update.previous.routingProtocol == "none"
370 - cm_l3out_1_update.previous.tagAnnotations == []
371 - cm_l3out_1_update.previous.targetDscp == "unspecified"
372 - cm_l3out_1_update.previous.uuid is defined
373 - cm_l3out_1_update.previous.vrfRef != ""
374 - cm_l3out_1_update.proposed.advancedRouteMapRefs.attachedHostRouteRedistRef != ""
375 - cm_l3out_1_update.proposed.advancedRouteMapRefs.connectedRouteRedistRef != ""
376 - cm_l3out_1_update.proposed.advancedRouteMapRefs.interleakRef != ""
377 - cm_l3out_1_update.proposed.advancedRouteMapRefs.routeDampeningV4Ref != ""
378 - cm_l3out_1_update.proposed.advancedRouteMapRefs.routeDampeningV6Ref != ""
379 - cm_l3out_1_update.proposed.advancedRouteMapRefs.staticRouteRedistRef != ""
380 - cm_l3out_1_update.proposed.advancedRouteMapRefs.attachedHostRouteRedistName == "ans_route_map"
381 - cm_l3out_1_update.proposed.advancedRouteMapRefs.connectedRouteRedistName == "ans_route_map"
382 - cm_l3out_1_update.proposed.advancedRouteMapRefs.interleakName == "ans_route_map"
383 - cm_l3out_1_update.proposed.advancedRouteMapRefs.routeDampeningV4Name == "ans_route_map"
384 - cm_l3out_1_update.proposed.advancedRouteMapRefs.routeDampeningV6Name == "ans_route_map"
385 - cm_l3out_1_update.proposed.advancedRouteMapRefs.staticRouteRedistName == "ans_route_map"
386 - cm_l3out_1_update.proposed.defaultRouteLeak.always == false
387 - cm_l3out_1_update.proposed.defaultRouteLeak.originateDefaultRoute == "only"
388 - cm_l3out_1_update.proposed.description == "test description"
389 - cm_l3out_1_update.proposed.exportRouteMapRef != ""
390 - cm_l3out_1_update.proposed.exportRouteMapName == "ans_route_map"
391 - cm_l3out_1_update.proposed.importRouteControl == true
392 - cm_l3out_1_update.proposed.importRouteMapRef != ""
393 - cm_l3out_1_update.proposed.importRouteMapName == "ans_route_map"
394 - cm_l3out_1_update.proposed.l3domain == "ans_l3_domain"
395 - cm_l3out_1_update.proposed.name == "l3out_1"
396 - cm_l3out_1_update.proposed.ospfAreaConfig.areaType == "regular"
397 - cm_l3out_1_update.proposed.ospfAreaConfig.control.originate == true
398 - cm_l3out_1_update.proposed.ospfAreaConfig.control.redistribute == true
399 - cm_l3out_1_update.proposed.ospfAreaConfig.control.suppressFA == true
400 - cm_l3out_1_update.proposed.ospfAreaConfig.cost == 1
401 - cm_l3out_1_update.proposed.ospfAreaConfig.id == "0.0.0.1"
402 - cm_l3out_1_update.proposed.pim == false
403 - cm_l3out_1_update.proposed.routingProtocol == "bgpOspf"
404 - cm_l3out_1_update.proposed.tagAnnotations == []
405 - cm_l3out_1_update.proposed.targetDscp == "unspecified"
406 - cm_l3out_1_update.proposed.uuid is defined
407 - cm_l3out_1_update.proposed.vrfRef != ""
408
409 - name: Update L3Out object with normal_mode
410 cisco.mso.ndo_l3out_template: &nm_l3out_1_update
411 <<: *cm_l3out_1_update
412 register: nm_l3out_1_update
413
414 - name: Assertion check for update L3Out object with normal_mode
415 ansible.builtin.assert:
416 that:
417 - nm_l3out_1_update is changed
418 - nm_l3out_1_update.current.advancedRouteMapRefs.attachedHostRouteRedistRef != ""
419 - nm_l3out_1_update.current.advancedRouteMapRefs.connectedRouteRedistRef != ""
420 - nm_l3out_1_update.current.advancedRouteMapRefs.interleakRef != ""
421 - nm_l3out_1_update.current.advancedRouteMapRefs.routeDampeningV4Ref != ""
422 - nm_l3out_1_update.current.advancedRouteMapRefs.routeDampeningV6Ref != ""
423 - nm_l3out_1_update.current.advancedRouteMapRefs.staticRouteRedistRef != ""
424 - nm_l3out_1_update.current.advancedRouteMapRefs.attachedHostRouteRedistName == "ans_route_map"
425 - nm_l3out_1_update.current.advancedRouteMapRefs.connectedRouteRedistName == "ans_route_map"
426 - nm_l3out_1_update.current.advancedRouteMapRefs.interleakName == "ans_route_map"
427 - nm_l3out_1_update.current.advancedRouteMapRefs.routeDampeningV4Name == "ans_route_map"
428 - nm_l3out_1_update.current.advancedRouteMapRefs.routeDampeningV6Name == "ans_route_map"
429 - nm_l3out_1_update.current.advancedRouteMapRefs.staticRouteRedistName == "ans_route_map"
430 - nm_l3out_1_update.current.defaultRouteLeak.always == false
431 - nm_l3out_1_update.current.defaultRouteLeak.originateDefaultRoute == "only"
432 - nm_l3out_1_update.current.description == "test description"
433 - nm_l3out_1_update.current.exportRouteMapRef != ""
434 - nm_l3out_1_update.current.exportRouteMapName == "ans_route_map"
435 - nm_l3out_1_update.current.importRouteControl == true
436 - nm_l3out_1_update.current.importRouteMapRef != ""
437 - nm_l3out_1_update.current.importRouteMapName == "ans_route_map"
438 - nm_l3out_1_update.current.l3domain == "ans_l3_domain"
439 - nm_l3out_1_update.current.name == "l3out_1"
440 - nm_l3out_1_update.current.ospfAreaConfig.areaType == "regular"
441 - nm_l3out_1_update.current.ospfAreaConfig.control.originate == true
442 - nm_l3out_1_update.current.ospfAreaConfig.control.redistribute == true
443 - nm_l3out_1_update.current.ospfAreaConfig.control.suppressFA == true
444 - nm_l3out_1_update.current.ospfAreaConfig.cost == 1
445 - nm_l3out_1_update.current.ospfAreaConfig.id == "0.0.0.1"
446 - nm_l3out_1_update.current.pim == false
447 - nm_l3out_1_update.current.routingProtocol == "bgpOspf"
448 - nm_l3out_1_update.current.tagAnnotations == []
449 - nm_l3out_1_update.current.targetDscp == "unspecified"
450 - nm_l3out_1_update.current.uuid is defined
451 - nm_l3out_1_update.current.vrfRef != ""
452 - nm_l3out_1_update.previous.importRouteControl == false
453 - nm_l3out_1_update.previous.l3domain == ""
454 - nm_l3out_1_update.previous.name == "l3out_1"
455 - nm_l3out_1_update.previous.pim == false
456 - nm_l3out_1_update.previous.routingProtocol == "none"
457 - nm_l3out_1_update.previous.tagAnnotations == []
458 - nm_l3out_1_update.previous.targetDscp == "unspecified"
459 - nm_l3out_1_update.previous.uuid is defined
460 - nm_l3out_1_update.previous.vrfRef != ""
461 - nm_l3out_1_update.proposed.advancedRouteMapRefs.attachedHostRouteRedistRef != ""
462 - nm_l3out_1_update.proposed.advancedRouteMapRefs.connectedRouteRedistRef != ""
463 - nm_l3out_1_update.proposed.advancedRouteMapRefs.interleakRef != ""
464 - nm_l3out_1_update.proposed.advancedRouteMapRefs.routeDampeningV4Ref != ""
465 - nm_l3out_1_update.proposed.advancedRouteMapRefs.routeDampeningV6Ref != ""
466 - nm_l3out_1_update.proposed.advancedRouteMapRefs.staticRouteRedistRef != ""
467 - nm_l3out_1_update.proposed.advancedRouteMapRefs.attachedHostRouteRedistName == "ans_route_map"
468 - nm_l3out_1_update.proposed.advancedRouteMapRefs.connectedRouteRedistName == "ans_route_map"
469 - nm_l3out_1_update.proposed.advancedRouteMapRefs.interleakName == "ans_route_map"
470 - nm_l3out_1_update.proposed.advancedRouteMapRefs.routeDampeningV4Name == "ans_route_map"
471 - nm_l3out_1_update.proposed.advancedRouteMapRefs.routeDampeningV6Name == "ans_route_map"
472 - nm_l3out_1_update.proposed.advancedRouteMapRefs.staticRouteRedistName == "ans_route_map"
473 - nm_l3out_1_update.proposed.defaultRouteLeak.always == false
474 - nm_l3out_1_update.proposed.defaultRouteLeak.originateDefaultRoute == "only"
475 - nm_l3out_1_update.proposed.description == "test description"
476 - nm_l3out_1_update.proposed.exportRouteMapRef != ""
477 - nm_l3out_1_update.proposed.exportRouteMapName == "ans_route_map"
478 - nm_l3out_1_update.proposed.importRouteControl == true
479 - nm_l3out_1_update.proposed.importRouteMapRef != ""
480 - nm_l3out_1_update.proposed.importRouteMapName == "ans_route_map"
481 - nm_l3out_1_update.proposed.l3domain == "ans_l3_domain"
482 - nm_l3out_1_update.proposed.name == "l3out_1"
483 - nm_l3out_1_update.proposed.ospfAreaConfig.areaType == "regular"
484 - nm_l3out_1_update.proposed.ospfAreaConfig.control.originate == true
485 - nm_l3out_1_update.proposed.ospfAreaConfig.control.redistribute == true
486 - nm_l3out_1_update.proposed.ospfAreaConfig.control.suppressFA == true
487 - nm_l3out_1_update.proposed.ospfAreaConfig.cost == 1
488 - nm_l3out_1_update.proposed.ospfAreaConfig.id == "0.0.0.1"
489 - nm_l3out_1_update.proposed.pim == false
490 - nm_l3out_1_update.proposed.routingProtocol == "bgpOspf"
491 - nm_l3out_1_update.proposed.tagAnnotations == []
492 - nm_l3out_1_update.proposed.targetDscp == "unspecified"
493 - nm_l3out_1_update.proposed.uuid is defined
494 - nm_l3out_1_update.proposed.vrfRef != ""
495
496 - name: Update L3Out object with normal_mode - again
497 cisco.mso.ndo_l3out_template:
498 <<: *nm_l3out_1_update
499 register: nm_l3out_1_update_again
500
501 - name: Assertion check for update L3Out object with normal_mode - again
502 ansible.builtin.assert:
503 that:
504 - nm_l3out_1_update_again is not changed
505 - nm_l3out_1_update_again.current.advancedRouteMapRefs.attachedHostRouteRedistRef != ""
506 - nm_l3out_1_update_again.current.advancedRouteMapRefs.connectedRouteRedistRef != ""
507 - nm_l3out_1_update_again.current.advancedRouteMapRefs.interleakRef != ""
508 - nm_l3out_1_update_again.current.advancedRouteMapRefs.routeDampeningV4Ref != ""
509 - nm_l3out_1_update_again.current.advancedRouteMapRefs.routeDampeningV6Ref != ""
510 - nm_l3out_1_update_again.current.advancedRouteMapRefs.staticRouteRedistRef != ""
511 - nm_l3out_1_update_again.current.advancedRouteMapRefs.attachedHostRouteRedistName == "ans_route_map"
512 - nm_l3out_1_update_again.current.advancedRouteMapRefs.connectedRouteRedistName == "ans_route_map"
513 - nm_l3out_1_update_again.current.advancedRouteMapRefs.interleakName == "ans_route_map"
514 - nm_l3out_1_update_again.current.advancedRouteMapRefs.routeDampeningV4Name == "ans_route_map"
515 - nm_l3out_1_update_again.current.advancedRouteMapRefs.routeDampeningV6Name == "ans_route_map"
516 - nm_l3out_1_update_again.current.advancedRouteMapRefs.staticRouteRedistName == "ans_route_map"
517 - nm_l3out_1_update_again.current.defaultRouteLeak.always == false
518 - nm_l3out_1_update_again.current.defaultRouteLeak.originateDefaultRoute == "only"
519 - nm_l3out_1_update_again.current.description == "test description"
520 - nm_l3out_1_update_again.current.exportRouteMapRef != ""
521 - nm_l3out_1_update_again.current.exportRouteMapName == "ans_route_map"
522 - nm_l3out_1_update_again.current.importRouteControl == true
523 - nm_l3out_1_update_again.current.importRouteMapRef != ""
524 - nm_l3out_1_update_again.current.importRouteMapName == "ans_route_map"
525 - nm_l3out_1_update_again.current.l3domain == "ans_l3_domain"
526 - nm_l3out_1_update_again.current.name == "l3out_1"
527 - nm_l3out_1_update_again.current.ospfAreaConfig.areaType == "regular"
528 - nm_l3out_1_update_again.current.ospfAreaConfig.control.originate == true
529 - nm_l3out_1_update_again.current.ospfAreaConfig.control.redistribute == true
530 - nm_l3out_1_update_again.current.ospfAreaConfig.control.suppressFA == true
531 - nm_l3out_1_update_again.current.ospfAreaConfig.cost == 1
532 - nm_l3out_1_update_again.current.ospfAreaConfig.id == "0.0.0.1"
533 - nm_l3out_1_update_again.current.pim == false
534 - nm_l3out_1_update_again.current.routingProtocol == "bgpOspf"
535 - nm_l3out_1_update_again.current.tagAnnotations == []
536 - nm_l3out_1_update_again.current.targetDscp == "unspecified"
537 - nm_l3out_1_update_again.current.uuid is defined
538 - nm_l3out_1_update_again.current.vrfRef != ""
539 - nm_l3out_1_update_again.previous.advancedRouteMapRefs.attachedHostRouteRedistRef != ""
540 - nm_l3out_1_update_again.previous.advancedRouteMapRefs.connectedRouteRedistRef != ""
541 - nm_l3out_1_update_again.previous.advancedRouteMapRefs.interleakRef != ""
542 - nm_l3out_1_update_again.previous.advancedRouteMapRefs.routeDampeningV4Ref != ""
543 - nm_l3out_1_update_again.previous.advancedRouteMapRefs.routeDampeningV6Ref != ""
544 - nm_l3out_1_update_again.previous.advancedRouteMapRefs.staticRouteRedistRef != ""
545 - nm_l3out_1_update_again.previous.advancedRouteMapRefs.attachedHostRouteRedistName == "ans_route_map"
546 - nm_l3out_1_update_again.previous.advancedRouteMapRefs.connectedRouteRedistName == "ans_route_map"
547 - nm_l3out_1_update_again.previous.advancedRouteMapRefs.interleakName == "ans_route_map"
548 - nm_l3out_1_update_again.previous.advancedRouteMapRefs.routeDampeningV4Name == "ans_route_map"
549 - nm_l3out_1_update_again.previous.advancedRouteMapRefs.routeDampeningV6Name == "ans_route_map"
550 - nm_l3out_1_update_again.previous.advancedRouteMapRefs.staticRouteRedistName == "ans_route_map"
551 - nm_l3out_1_update_again.previous.defaultRouteLeak.always == false
552 - nm_l3out_1_update_again.previous.defaultRouteLeak.originateDefaultRoute == "only"
553 - nm_l3out_1_update_again.previous.description == "test description"
554 - nm_l3out_1_update_again.previous.exportRouteMapRef != ""
555 - nm_l3out_1_update_again.previous.exportRouteMapName == "ans_route_map"
556 - nm_l3out_1_update_again.previous.importRouteControl == true
557 - nm_l3out_1_update_again.previous.importRouteMapRef != ""
558 - nm_l3out_1_update_again.previous.importRouteMapName == "ans_route_map"
559 - nm_l3out_1_update_again.previous.l3domain == "ans_l3_domain"
560 - nm_l3out_1_update_again.previous.name == "l3out_1"
561 - nm_l3out_1_update_again.previous.ospfAreaConfig.areaType == "regular"
562 - nm_l3out_1_update_again.previous.ospfAreaConfig.control.originate == true
563 - nm_l3out_1_update_again.previous.ospfAreaConfig.control.redistribute == true
564 - nm_l3out_1_update_again.previous.ospfAreaConfig.control.suppressFA == true
565 - nm_l3out_1_update_again.previous.ospfAreaConfig.cost == 1
566 - nm_l3out_1_update_again.previous.ospfAreaConfig.id == "0.0.0.1"
567 - nm_l3out_1_update_again.previous.pim == false
568 - nm_l3out_1_update_again.previous.routingProtocol == "bgpOspf"
569 - nm_l3out_1_update_again.previous.tagAnnotations == []
570 - nm_l3out_1_update_again.previous.targetDscp == "unspecified"
571 - nm_l3out_1_update_again.previous.uuid is defined
572 - nm_l3out_1_update_again.previous.vrfRef != ""
573 - nm_l3out_1_update_again.proposed.advancedRouteMapRefs.attachedHostRouteRedistRef != ""
574 - nm_l3out_1_update_again.proposed.advancedRouteMapRefs.connectedRouteRedistRef != ""
575 - nm_l3out_1_update_again.proposed.advancedRouteMapRefs.interleakRef != ""
576 - nm_l3out_1_update_again.proposed.advancedRouteMapRefs.routeDampeningV4Ref != ""
577 - nm_l3out_1_update_again.proposed.advancedRouteMapRefs.routeDampeningV6Ref != ""
578 - nm_l3out_1_update_again.proposed.advancedRouteMapRefs.staticRouteRedistRef != ""
579 - nm_l3out_1_update_again.proposed.advancedRouteMapRefs.attachedHostRouteRedistName == "ans_route_map"
580 - nm_l3out_1_update_again.proposed.advancedRouteMapRefs.connectedRouteRedistName == "ans_route_map"
581 - nm_l3out_1_update_again.proposed.advancedRouteMapRefs.interleakName == "ans_route_map"
582 - nm_l3out_1_update_again.proposed.advancedRouteMapRefs.routeDampeningV4Name == "ans_route_map"
583 - nm_l3out_1_update_again.proposed.advancedRouteMapRefs.routeDampeningV6Name == "ans_route_map"
584 - nm_l3out_1_update_again.proposed.advancedRouteMapRefs.staticRouteRedistName == "ans_route_map"
585 - nm_l3out_1_update_again.proposed.defaultRouteLeak.always == false
586 - nm_l3out_1_update_again.proposed.defaultRouteLeak.originateDefaultRoute == "only"
587 - nm_l3out_1_update_again.proposed.description == "test description"
588 - nm_l3out_1_update_again.proposed.exportRouteMapRef != ""
589 - nm_l3out_1_update_again.proposed.exportRouteMapName == "ans_route_map"
590 - nm_l3out_1_update_again.proposed.importRouteControl == true
591 - nm_l3out_1_update_again.proposed.importRouteMapRef != ""
592 - nm_l3out_1_update_again.proposed.importRouteMapName == "ans_route_map"
593 - nm_l3out_1_update_again.proposed.l3domain == "ans_l3_domain"
594 - nm_l3out_1_update_again.proposed.name == "l3out_1"
595 - nm_l3out_1_update_again.proposed.ospfAreaConfig.areaType == "regular"
596 - nm_l3out_1_update_again.proposed.ospfAreaConfig.control.originate == true
597 - nm_l3out_1_update_again.proposed.ospfAreaConfig.control.redistribute == true
598 - nm_l3out_1_update_again.proposed.ospfAreaConfig.control.suppressFA == true
599 - nm_l3out_1_update_again.proposed.ospfAreaConfig.cost == 1
600 - nm_l3out_1_update_again.proposed.ospfAreaConfig.id == "0.0.0.1"
601 - nm_l3out_1_update_again.proposed.pim == false
602 - nm_l3out_1_update_again.proposed.routingProtocol == "bgpOspf"
603 - nm_l3out_1_update_again.proposed.tagAnnotations == []
604 - nm_l3out_1_update_again.proposed.targetDscp == "unspecified"
605 - nm_l3out_1_update_again.proposed.uuid is defined
606 - nm_l3out_1_update_again.proposed.vrfRef != ""
607
608 - name: Update L3Out l3out_1 object name, vrf and pim value
609 cisco.mso.ndo_l3out_template:
610 <<: *mso_info
611 l3out_template: '{{ ansible_l3out_template | default("ansible_test") }}'
612 uuid: "{{ nm_l3out_1_update_again.current.uuid}}"
613 name: l3out_1_updated
614 vrf:
615 name: "VRF2"
616 schema: '{{ mso_schema | default("ansible_test") }}'
617 template: "Template1"
618 pim: true
619 target_dscp: "af11"
620 state: present
621 register: l3out_1_update_vrf
622
623 - name: Assertion check for update L3Out l3out_1 object name, vrf and pim value
624 ansible.builtin.assert:
625 that:
626 - l3out_1_update_vrf is changed
627 - l3out_1_update_vrf.current.advancedRouteMapRefs.attachedHostRouteRedistRef != ""
628 - l3out_1_update_vrf.current.advancedRouteMapRefs.connectedRouteRedistRef != ""
629 - l3out_1_update_vrf.current.advancedRouteMapRefs.interleakRef != ""
630 - l3out_1_update_vrf.current.advancedRouteMapRefs.routeDampeningV4Ref != ""
631 - l3out_1_update_vrf.current.advancedRouteMapRefs.routeDampeningV6Ref != ""
632 - l3out_1_update_vrf.current.advancedRouteMapRefs.staticRouteRedistRef != ""
633 - l3out_1_update_vrf.current.defaultRouteLeak.always == false
634 - l3out_1_update_vrf.current.defaultRouteLeak.originateDefaultRoute == "only"
635 - l3out_1_update_vrf.current.description == "test description"
636 - l3out_1_update_vrf.current.exportRouteMapRef != ""
637 - l3out_1_update_vrf.current.importRouteControl == true
638 - l3out_1_update_vrf.current.importRouteMapRef != ""
639 - l3out_1_update_vrf.current.l3domain == "ans_l3_domain"
640 - l3out_1_update_vrf.current.name == "l3out_1_updated"
641 - l3out_1_update_vrf.current.ospfAreaConfig.areaType == "regular"
642 - l3out_1_update_vrf.current.ospfAreaConfig.control.originate == true
643 - l3out_1_update_vrf.current.ospfAreaConfig.control.redistribute == true
644 - l3out_1_update_vrf.current.ospfAreaConfig.control.suppressFA == true
645 - l3out_1_update_vrf.current.ospfAreaConfig.cost == 1
646 - l3out_1_update_vrf.current.ospfAreaConfig.id == "0.0.0.1"
647 - l3out_1_update_vrf.current.pim == true
648 - l3out_1_update_vrf.current.routingProtocol == "bgpOspf"
649 - l3out_1_update_vrf.current.tagAnnotations == []
650 - l3out_1_update_vrf.current.targetDscp == "af11"
651 - l3out_1_update_vrf.current.uuid is defined
652 - l3out_1_update_vrf.current.vrfRef != ""
653 - l3out_1_update_vrf.previous.advancedRouteMapRefs.attachedHostRouteRedistRef != ""
654 - l3out_1_update_vrf.previous.advancedRouteMapRefs.connectedRouteRedistRef != ""
655 - l3out_1_update_vrf.previous.advancedRouteMapRefs.interleakRef != ""
656 - l3out_1_update_vrf.previous.advancedRouteMapRefs.routeDampeningV4Ref != ""
657 - l3out_1_update_vrf.previous.advancedRouteMapRefs.routeDampeningV6Ref != ""
658 - l3out_1_update_vrf.previous.advancedRouteMapRefs.staticRouteRedistRef != ""
659 - l3out_1_update_vrf.previous.defaultRouteLeak.always == false
660 - l3out_1_update_vrf.previous.defaultRouteLeak.originateDefaultRoute == "only"
661 - l3out_1_update_vrf.previous.description == "test description"
662 - l3out_1_update_vrf.previous.exportRouteMapRef != ""
663 - l3out_1_update_vrf.previous.importRouteControl == true
664 - l3out_1_update_vrf.previous.importRouteMapRef != ""
665 - l3out_1_update_vrf.previous.l3domain == "ans_l3_domain"
666 - l3out_1_update_vrf.previous.name == "l3out_1"
667 - l3out_1_update_vrf.previous.ospfAreaConfig.areaType == "regular"
668 - l3out_1_update_vrf.previous.ospfAreaConfig.control.originate == true
669 - l3out_1_update_vrf.previous.ospfAreaConfig.control.redistribute == true
670 - l3out_1_update_vrf.previous.ospfAreaConfig.control.suppressFA == true
671 - l3out_1_update_vrf.previous.ospfAreaConfig.cost == 1
672 - l3out_1_update_vrf.previous.ospfAreaConfig.id == "0.0.0.1"
673 - l3out_1_update_vrf.previous.pim == false
674 - l3out_1_update_vrf.previous.routingProtocol == "bgpOspf"
675 - l3out_1_update_vrf.previous.tagAnnotations == []
676 - l3out_1_update_vrf.previous.targetDscp == "unspecified"
677 - l3out_1_update_vrf.previous.uuid is defined
678 - l3out_1_update_vrf.previous.vrfRef != ""
679
680 - name: Update L3Out l3out_1_updated object bgp route map values
681 cisco.mso.ndo_l3out_template:
682 <<: *mso_info
683 l3out_template: '{{ ansible_l3out_template | default("ansible_test") }}'
684 name: l3out_1_updated
685 interleak: "ans_route_map_2"
686 static_route_redistribution: "ans_route_map_2"
687 connected_route_redistribution: "ans_route_map_2"
688 attached_host_route_redistribution: "ans_route_map_2"
689 bgp:
690 route_dampening_ipv4: "ans_route_map_2"
691 route_dampening_ipv6: "ans_route_map_2"
692 inbound_route_map: "ans_route_map_2"
693 outbound_route_map: "ans_route_map_2"
694 state: present
695 register: l3out_1_update_bgp
696
697 - name: Assertion check for update L3Out l3out_1_updated object bgp route map values
698 ansible.builtin.assert:
699 that:
700 - l3out_1_update_bgp is changed
701 - l3out_1_update_bgp.current.advancedRouteMapRefs.attachedHostRouteRedistRef != ""
702 - l3out_1_update_bgp.current.advancedRouteMapRefs.connectedRouteRedistRef != ""
703 - l3out_1_update_bgp.current.advancedRouteMapRefs.interleakRef != ""
704 - l3out_1_update_bgp.current.advancedRouteMapRefs.routeDampeningV4Ref != ""
705 - l3out_1_update_bgp.current.advancedRouteMapRefs.routeDampeningV6Ref != ""
706 - l3out_1_update_bgp.current.advancedRouteMapRefs.staticRouteRedistRef != ""
707 - l3out_1_update_bgp.current.defaultRouteLeak.always == false
708 - l3out_1_update_bgp.current.defaultRouteLeak.originateDefaultRoute == "only"
709 - l3out_1_update_bgp.current.description == "test description"
710 - l3out_1_update_bgp.current.exportRouteMapRef != ""
711 - l3out_1_update_bgp.current.importRouteControl == true
712 - l3out_1_update_bgp.current.importRouteMapRef != ""
713 - l3out_1_update_bgp.current.l3domain == "ans_l3_domain"
714 - l3out_1_update_bgp.current.name == "l3out_1_updated"
715 - l3out_1_update_bgp.current.ospfAreaConfig.areaType == "regular"
716 - l3out_1_update_bgp.current.ospfAreaConfig.control.originate == true
717 - l3out_1_update_bgp.current.ospfAreaConfig.control.redistribute == true
718 - l3out_1_update_bgp.current.ospfAreaConfig.control.suppressFA == true
719 - l3out_1_update_bgp.current.ospfAreaConfig.cost == 1
720 - l3out_1_update_bgp.current.ospfAreaConfig.id == "0.0.0.1"
721 - l3out_1_update_bgp.current.pim == true
722 - l3out_1_update_bgp.current.routingProtocol == "bgpOspf"
723 - l3out_1_update_bgp.current.tagAnnotations == []
724 - l3out_1_update_bgp.current.targetDscp == "af11"
725 - l3out_1_update_bgp.current.uuid is defined
726 - l3out_1_update_bgp.current.vrfRef != ""
727 - l3out_1_update_bgp.previous.advancedRouteMapRefs.attachedHostRouteRedistRef != ""
728 - l3out_1_update_bgp.previous.advancedRouteMapRefs.connectedRouteRedistRef != ""
729 - l3out_1_update_bgp.previous.advancedRouteMapRefs.interleakRef != ""
730 - l3out_1_update_bgp.previous.advancedRouteMapRefs.routeDampeningV4Ref != ""
731 - l3out_1_update_bgp.previous.advancedRouteMapRefs.routeDampeningV6Ref != ""
732 - l3out_1_update_bgp.previous.advancedRouteMapRefs.staticRouteRedistRef != ""
733 - l3out_1_update_bgp.previous.defaultRouteLeak.always == false
734 - l3out_1_update_bgp.previous.defaultRouteLeak.originateDefaultRoute == "only"
735 - l3out_1_update_bgp.previous.description == "test description"
736 - l3out_1_update_bgp.previous.exportRouteMapRef != ""
737 - l3out_1_update_bgp.previous.importRouteControl == true
738 - l3out_1_update_bgp.previous.importRouteMapRef != ""
739 - l3out_1_update_bgp.previous.l3domain == "ans_l3_domain"
740 - l3out_1_update_bgp.previous.name == "l3out_1_updated"
741 - l3out_1_update_bgp.previous.ospfAreaConfig.areaType == "regular"
742 - l3out_1_update_bgp.previous.ospfAreaConfig.control.originate == true
743 - l3out_1_update_bgp.previous.ospfAreaConfig.control.redistribute == true
744 - l3out_1_update_bgp.previous.ospfAreaConfig.control.suppressFA == true
745 - l3out_1_update_bgp.previous.ospfAreaConfig.cost == 1
746 - l3out_1_update_bgp.previous.ospfAreaConfig.id == "0.0.0.1"
747 - l3out_1_update_bgp.previous.pim == true
748 - l3out_1_update_bgp.previous.routingProtocol == "bgpOspf"
749 - l3out_1_update_bgp.previous.tagAnnotations == []
750 - l3out_1_update_bgp.previous.targetDscp == "af11"
751 - l3out_1_update_bgp.previous.uuid is defined
752 - l3out_1_update_bgp.previous.vrfRef != ""
753
754 - name: Set bgp route maps with empty string for L3Out l3out_1_updated object
755 cisco.mso.ndo_l3out_template:
756 <<: *mso_info
757 l3out_template: '{{ ansible_l3out_template | default("ansible_test") }}'
758 name: l3out_1_updated
759 interleak: "ans_route_map_2"
760 static_route_redistribution: "ans_route_map_2"
761 connected_route_redistribution: "ans_route_map_2"
762 attached_host_route_redistribution: "ans_route_map_2"
763 description: "add_log"
764 bgp:
765 route_dampening_ipv4: ""
766 route_dampening_ipv6: ""
767 inbound_route_map: ""
768 outbound_route_map: ""
769 state: present
770 register: l3out_1_update_empty_bgp
771
772 - name: Assertion check for set bgp route maps with empty string for L3Out l3out_1_updated object
773 ansible.builtin.assert:
774 that:
775 - l3out_1_update_empty_bgp is changed
776 - l3out_1_update_empty_bgp.current.advancedRouteMapRefs.attachedHostRouteRedistRef != ""
777 - l3out_1_update_empty_bgp.current.advancedRouteMapRefs.connectedRouteRedistRef != ""
778 - l3out_1_update_empty_bgp.current.advancedRouteMapRefs.interleakRef != ""
779 - l3out_1_update_empty_bgp.current.advancedRouteMapRefs.routeDampeningV4Ref is not defined
780 - l3out_1_update_empty_bgp.current.advancedRouteMapRefs.routeDampeningV6Ref is not defined
781 - l3out_1_update_empty_bgp.current.advancedRouteMapRefs.staticRouteRedistRef != ""
782 - l3out_1_update_empty_bgp.current.defaultRouteLeak.always == false
783 - l3out_1_update_empty_bgp.current.defaultRouteLeak.originateDefaultRoute == "only"
784 - l3out_1_update_empty_bgp.current.description == "add_log"
785 - l3out_1_update_empty_bgp.current.exportRouteMapRef is not defined
786 - l3out_1_update_empty_bgp.current.importRouteControl == false
787 - l3out_1_update_empty_bgp.current.importRouteMapRef is not defined
788 - l3out_1_update_empty_bgp.current.l3domain == "ans_l3_domain"
789 - l3out_1_update_empty_bgp.current.name == "l3out_1_updated"
790 - l3out_1_update_empty_bgp.current.ospfAreaConfig.areaType == "regular"
791 - l3out_1_update_empty_bgp.current.ospfAreaConfig.control.originate == true
792 - l3out_1_update_empty_bgp.current.ospfAreaConfig.control.redistribute == true
793 - l3out_1_update_empty_bgp.current.ospfAreaConfig.control.suppressFA == true
794 - l3out_1_update_empty_bgp.current.ospfAreaConfig.cost == 1
795 - l3out_1_update_empty_bgp.current.ospfAreaConfig.id == "0.0.0.1"
796 - l3out_1_update_empty_bgp.current.pim == true
797 - l3out_1_update_empty_bgp.current.routingProtocol == "bgpOspf"
798 - l3out_1_update_empty_bgp.current.tagAnnotations == []
799 - l3out_1_update_empty_bgp.current.targetDscp == "af11"
800 - l3out_1_update_empty_bgp.current.uuid is defined
801 - l3out_1_update_empty_bgp.current.vrfRef != ""
802 - l3out_1_update_empty_bgp.previous.advancedRouteMapRefs.attachedHostRouteRedistRef != ""
803 - l3out_1_update_empty_bgp.previous.advancedRouteMapRefs.connectedRouteRedistRef != ""
804 - l3out_1_update_empty_bgp.previous.advancedRouteMapRefs.interleakRef != ""
805 - l3out_1_update_empty_bgp.previous.advancedRouteMapRefs.routeDampeningV4Ref != ""
806 - l3out_1_update_empty_bgp.previous.advancedRouteMapRefs.routeDampeningV6Ref != ""
807 - l3out_1_update_empty_bgp.previous.advancedRouteMapRefs.staticRouteRedistRef != ""
808 - l3out_1_update_empty_bgp.previous.defaultRouteLeak.always == false
809 - l3out_1_update_empty_bgp.previous.defaultRouteLeak.originateDefaultRoute == "only"
810 - l3out_1_update_empty_bgp.previous.description == "test description"
811 - l3out_1_update_empty_bgp.previous.exportRouteMapRef != ""
812 - l3out_1_update_empty_bgp.previous.importRouteControl == true
813 - l3out_1_update_empty_bgp.previous.importRouteMapRef != ""
814 - l3out_1_update_empty_bgp.previous.l3domain == "ans_l3_domain"
815 - l3out_1_update_empty_bgp.previous.name == "l3out_1_updated"
816 - l3out_1_update_empty_bgp.previous.ospfAreaConfig.areaType == "regular"
817 - l3out_1_update_empty_bgp.previous.ospfAreaConfig.control.originate == true
818 - l3out_1_update_empty_bgp.previous.ospfAreaConfig.control.redistribute == true
819 - l3out_1_update_empty_bgp.previous.ospfAreaConfig.control.suppressFA == true
820 - l3out_1_update_empty_bgp.previous.ospfAreaConfig.cost == 1
821 - l3out_1_update_empty_bgp.previous.ospfAreaConfig.id == "0.0.0.1"
822 - l3out_1_update_empty_bgp.previous.pim == true
823 - l3out_1_update_empty_bgp.previous.routingProtocol == "bgpOspf"
824 - l3out_1_update_empty_bgp.previous.tagAnnotations == []
825 - l3out_1_update_empty_bgp.previous.targetDscp == "af11"
826 - l3out_1_update_empty_bgp.previous.uuid is defined
827 - l3out_1_update_empty_bgp.previous.vrfRef != ""
828
829 - name: Update L3Out l3out_1_updated object ospf values
830 cisco.mso.ndo_l3out_template:
831 <<: *mso_info
832 l3out_template: '{{ ansible_l3out_template | default("ansible_test") }}'
833 name: l3out_1_updated
834 ospf:
835 area_id: "0.0.0.1"
836 area_type: "regular"
837 cost: 1
838 send_redistributed_lsas: false
839 originate_summary_lsa: false
840 suppress_forwarding_addr_translated_lsa: false
841 originate_default_route: "in_addition"
842 originate_default_route_always: false
843 state: present
844 register: l3out_1_update_ospf
845
846 - name: Assertion check for update L3Out l3out_1_updated object ospf values
847 ansible.builtin.assert:
848 that:
849 - l3out_1_update_ospf is changed
850 - l3out_1_update_ospf.current.advancedRouteMapRefs.attachedHostRouteRedistRef != ""
851 - l3out_1_update_ospf.current.advancedRouteMapRefs.connectedRouteRedistRef != ""
852 - l3out_1_update_ospf.current.advancedRouteMapRefs.interleakRef != ""
853 - l3out_1_update_ospf.current.advancedRouteMapRefs.staticRouteRedistRef != ""
854 - l3out_1_update_ospf.current.defaultRouteLeak.always == false
855 - l3out_1_update_ospf.current.defaultRouteLeak.originateDefaultRoute == "inAddition"
856 - l3out_1_update_ospf.current.description == "add_log"
857 - l3out_1_update_ospf.current.importRouteControl == false
858 - l3out_1_update_ospf.current.l3domain == "ans_l3_domain"
859 - l3out_1_update_ospf.current.name == "l3out_1_updated"
860 - l3out_1_update_ospf.current.ospfAreaConfig.areaType == "regular"
861 - l3out_1_update_ospf.current.ospfAreaConfig.control.originate == false
862 - l3out_1_update_ospf.current.ospfAreaConfig.control.redistribute == false
863 - l3out_1_update_ospf.current.ospfAreaConfig.control.suppressFA == false
864 - l3out_1_update_ospf.current.ospfAreaConfig.cost == 1
865 - l3out_1_update_ospf.current.ospfAreaConfig.id == "0.0.0.1"
866 - l3out_1_update_ospf.current.pim == true
867 - l3out_1_update_ospf.current.routingProtocol == "bgpOspf"
868 - l3out_1_update_ospf.current.tagAnnotations == []
869 - l3out_1_update_ospf.current.targetDscp == "af11"
870 - l3out_1_update_ospf.current.uuid is defined
871 - l3out_1_update_ospf.current.vrfRef != ""
872 - l3out_1_update_ospf.previous.advancedRouteMapRefs.attachedHostRouteRedistRef != ""
873 - l3out_1_update_ospf.previous.advancedRouteMapRefs.connectedRouteRedistRef != ""
874 - l3out_1_update_ospf.previous.advancedRouteMapRefs.interleakRef != ""
875 - l3out_1_update_ospf.previous.advancedRouteMapRefs.staticRouteRedistRef != ""
876 - l3out_1_update_ospf.previous.defaultRouteLeak.always == false
877 - l3out_1_update_ospf.previous.defaultRouteLeak.originateDefaultRoute == "only"
878 - l3out_1_update_ospf.previous.description == "add_log"
879 - l3out_1_update_ospf.previous.importRouteControl == false
880 - l3out_1_update_ospf.previous.l3domain == "ans_l3_domain"
881 - l3out_1_update_ospf.previous.name == "l3out_1_updated"
882 - l3out_1_update_ospf.previous.ospfAreaConfig.areaType == "regular"
883 - l3out_1_update_ospf.previous.ospfAreaConfig.control.originate == true
884 - l3out_1_update_ospf.previous.ospfAreaConfig.control.redistribute == true
885 - l3out_1_update_ospf.previous.ospfAreaConfig.control.suppressFA == true
886 - l3out_1_update_ospf.previous.ospfAreaConfig.cost == 1
887 - l3out_1_update_ospf.previous.ospfAreaConfig.id == "0.0.0.1"
888 - l3out_1_update_ospf.previous.pim == true
889 - l3out_1_update_ospf.previous.routingProtocol == "bgpOspf"
890 - l3out_1_update_ospf.previous.tagAnnotations == []
891 - l3out_1_update_ospf.previous.targetDscp == "af11"
892 - l3out_1_update_ospf.previous.uuid is defined
893 - l3out_1_update_ospf.previous.vrfRef != ""
894
895 - name: Clear ospf originate_default_route for L3Out l3out_1_updated object
896 cisco.mso.ndo_l3out_template:
897 <<: *mso_info
898 l3out_template: '{{ ansible_l3out_template | default("ansible_test") }}'
899 name: l3out_1_updated
900 ospf:
901 area_id: "0.0.0.1"
902 area_type: "regular"
903 cost: 1
904 send_redistributed_lsas: false
905 originate_summary_lsa: false
906 suppress_forwarding_addr_translated_lsa: false
907 originate_default_route: ""
908 originate_default_route_always: false
909 state: present
910 register: l3out_1_update_ospf_default_route
911
912 - name: Assertion check for clear ospf originate_default_route for L3Out l3out_1_updated object
913 ansible.builtin.assert:
914 that:
915 - l3out_1_update_ospf_default_route is changed
916 - l3out_1_update_ospf_default_route.current.advancedRouteMapRefs.attachedHostRouteRedistRef != ""
917 - l3out_1_update_ospf_default_route.current.advancedRouteMapRefs.connectedRouteRedistRef != ""
918 - l3out_1_update_ospf_default_route.current.advancedRouteMapRefs.interleakRef != ""
919 - l3out_1_update_ospf_default_route.current.advancedRouteMapRefs.staticRouteRedistRef != ""
920 - l3out_1_update_ospf_default_route.current.description == "add_log"
921 - l3out_1_update_ospf_default_route.current.importRouteControl == false
922 - l3out_1_update_ospf_default_route.current.l3domain == "ans_l3_domain"
923 - l3out_1_update_ospf_default_route.current.name == "l3out_1_updated"
924 - l3out_1_update_ospf_default_route.current.ospfAreaConfig.areaType == "regular"
925 - l3out_1_update_ospf_default_route.current.ospfAreaConfig.control.originate == false
926 - l3out_1_update_ospf_default_route.current.ospfAreaConfig.control.redistribute == false
927 - l3out_1_update_ospf_default_route.current.ospfAreaConfig.control.suppressFA == false
928 - l3out_1_update_ospf_default_route.current.ospfAreaConfig.cost == 1
929 - l3out_1_update_ospf_default_route.current.ospfAreaConfig.id == "0.0.0.1"
930 - l3out_1_update_ospf_default_route.current.pim == true
931 - l3out_1_update_ospf_default_route.current.routingProtocol == "bgpOspf"
932 - l3out_1_update_ospf_default_route.current.tagAnnotations == []
933 - l3out_1_update_ospf_default_route.current.targetDscp == "af11"
934 - l3out_1_update_ospf_default_route.current.uuid is defined
935 - l3out_1_update_ospf_default_route.current.vrfRef != ""
936 - l3out_1_update_ospf_default_route.previous.advancedRouteMapRefs.attachedHostRouteRedistRef != ""
937 - l3out_1_update_ospf_default_route.previous.advancedRouteMapRefs.connectedRouteRedistRef != ""
938 - l3out_1_update_ospf_default_route.previous.advancedRouteMapRefs.interleakRef != ""
939 - l3out_1_update_ospf_default_route.previous.advancedRouteMapRefs.staticRouteRedistRef != ""
940 - l3out_1_update_ospf_default_route.previous.defaultRouteLeak.always == false
941 - l3out_1_update_ospf_default_route.previous.defaultRouteLeak.originateDefaultRoute == "inAddition"
942 - l3out_1_update_ospf_default_route.previous.description == "add_log"
943 - l3out_1_update_ospf_default_route.previous.importRouteControl == false
944 - l3out_1_update_ospf_default_route.previous.l3domain == "ans_l3_domain"
945 - l3out_1_update_ospf_default_route.previous.name == "l3out_1_updated"
946 - l3out_1_update_ospf_default_route.previous.ospfAreaConfig.areaType == "regular"
947 - l3out_1_update_ospf_default_route.previous.ospfAreaConfig.control.originate == false
948 - l3out_1_update_ospf_default_route.previous.ospfAreaConfig.control.redistribute == false
949 - l3out_1_update_ospf_default_route.previous.ospfAreaConfig.control.suppressFA == false
950 - l3out_1_update_ospf_default_route.previous.ospfAreaConfig.cost == 1
951 - l3out_1_update_ospf_default_route.previous.ospfAreaConfig.id == "0.0.0.1"
952 - l3out_1_update_ospf_default_route.previous.pim == true
953 - l3out_1_update_ospf_default_route.previous.routingProtocol == "bgpOspf"
954 - l3out_1_update_ospf_default_route.previous.tagAnnotations == []
955 - l3out_1_update_ospf_default_route.previous.targetDscp == "af11"
956 - l3out_1_update_ospf_default_route.previous.uuid is defined
957 - l3out_1_update_ospf_default_route.previous.vrfRef != ""
958
959 - name: Clear bgp from L3Out l3out_1_updated object
960 cisco.mso.ndo_l3out_template:
961 <<: *mso_info
962 l3out_template: '{{ ansible_l3out_template | default("ansible_test") }}'
963 name: l3out_1_updated
964 bgp:
965 state: disabled
966 state: present
967 register: l3out_1_update_disable_bgp
968
969 - name: Assertion check for clear bgp from L3Out l3out_1_updated object
970 ansible.builtin.assert:
971 that:
972 - l3out_1_update_disable_bgp is changed
973 - l3out_1_update_disable_bgp.current.advancedRouteMapRefs.attachedHostRouteRedistRef != ""
974 - l3out_1_update_disable_bgp.current.advancedRouteMapRefs.connectedRouteRedistRef != ""
975 - l3out_1_update_disable_bgp.current.advancedRouteMapRefs.interleakRef != ""
976 - l3out_1_update_disable_bgp.current.advancedRouteMapRefs.staticRouteRedistRef != ""
977 - l3out_1_update_disable_bgp.current.description == "add_log"
978 - l3out_1_update_disable_bgp.current.importRouteControl == false
979 - l3out_1_update_disable_bgp.current.l3domain == "ans_l3_domain"
980 - l3out_1_update_disable_bgp.current.name == "l3out_1_updated"
981 - l3out_1_update_disable_bgp.current.ospfAreaConfig.areaType == "regular"
982 - l3out_1_update_disable_bgp.current.ospfAreaConfig.control.originate == false
983 - l3out_1_update_disable_bgp.current.ospfAreaConfig.control.redistribute == false
984 - l3out_1_update_disable_bgp.current.ospfAreaConfig.control.suppressFA == false
985 - l3out_1_update_disable_bgp.current.ospfAreaConfig.cost == 1
986 - l3out_1_update_disable_bgp.current.ospfAreaConfig.id == "0.0.0.1"
987 - l3out_1_update_disable_bgp.current.pim == true
988 - l3out_1_update_disable_bgp.current.routingProtocol == "ospf"
989 - l3out_1_update_disable_bgp.current.tagAnnotations == []
990 - l3out_1_update_disable_bgp.current.targetDscp == "af11"
991 - l3out_1_update_disable_bgp.current.uuid is defined
992 - l3out_1_update_disable_bgp.current.vrfRef != ""
993 - l3out_1_update_disable_bgp.previous.advancedRouteMapRefs.attachedHostRouteRedistRef != ""
994 - l3out_1_update_disable_bgp.previous.advancedRouteMapRefs.connectedRouteRedistRef != ""
995 - l3out_1_update_disable_bgp.previous.advancedRouteMapRefs.interleakRef != ""
996 - l3out_1_update_disable_bgp.previous.advancedRouteMapRefs.staticRouteRedistRef != ""
997 - l3out_1_update_disable_bgp.previous.description == "add_log"
998 - l3out_1_update_disable_bgp.previous.importRouteControl == false
999 - l3out_1_update_disable_bgp.previous.l3domain == "ans_l3_domain"
1000 - l3out_1_update_disable_bgp.previous.name == "l3out_1_updated"
1001 - l3out_1_update_disable_bgp.previous.ospfAreaConfig.areaType == "regular"
1002 - l3out_1_update_disable_bgp.previous.ospfAreaConfig.control.originate == false
1003 - l3out_1_update_disable_bgp.previous.ospfAreaConfig.control.redistribute == false
1004 - l3out_1_update_disable_bgp.previous.ospfAreaConfig.control.suppressFA == false
1005 - l3out_1_update_disable_bgp.previous.ospfAreaConfig.cost == 1
1006 - l3out_1_update_disable_bgp.previous.ospfAreaConfig.id == "0.0.0.1"
1007 - l3out_1_update_disable_bgp.previous.pim == true
1008 - l3out_1_update_disable_bgp.previous.routingProtocol == "bgpOspf"
1009 - l3out_1_update_disable_bgp.previous.tagAnnotations == []
1010 - l3out_1_update_disable_bgp.previous.targetDscp == "af11"
1011 - l3out_1_update_disable_bgp.previous.uuid is defined
1012 - l3out_1_update_disable_bgp.previous.vrfRef != ""
1013
1014 - name: Update L3Out l3out_1_updated object ospf originate_default_route_always to true
1015 cisco.mso.ndo_l3out_template:
1016 <<: *mso_info
1017 l3out_template: '{{ ansible_l3out_template | default("ansible_test") }}'
1018 name: l3out_1_updated
1019 ospf:
1020 # when you enable originate_default_route_always, originate_default_route set to "only" when it is not configured and specified in the config
1021 area_id: "0.0.0.1"
1022 area_type: "regular"
1023 originate_default_route_always: true
1024 state: present
1025 register: l3out_1_update_ospf_default_route_true
1026
1027 - name: Assertion check for update L3Out l3out_1_updated object ospf originate_default_route_always to true
1028 ansible.builtin.assert:
1029 that:
1030 - l3out_1_update_ospf_default_route_true is changed
1031 - l3out_1_update_ospf_default_route_true.current.advancedRouteMapRefs.attachedHostRouteRedistRef != ""
1032 - l3out_1_update_ospf_default_route_true.current.advancedRouteMapRefs.connectedRouteRedistRef != ""
1033 - l3out_1_update_ospf_default_route_true.current.advancedRouteMapRefs.interleakRef != ""
1034 - l3out_1_update_ospf_default_route_true.current.advancedRouteMapRefs.staticRouteRedistRef != ""
1035 - l3out_1_update_ospf_default_route_true.current.defaultRouteLeak.always == true
1036 - l3out_1_update_ospf_default_route_true.current.description == "add_log"
1037 - l3out_1_update_ospf_default_route_true.current.importRouteControl == false
1038 - l3out_1_update_ospf_default_route_true.current.l3domain == "ans_l3_domain"
1039 - l3out_1_update_ospf_default_route_true.current.name == "l3out_1_updated"
1040 - l3out_1_update_ospf_default_route_true.current.ospfAreaConfig.areaType == "regular"
1041 - l3out_1_update_ospf_default_route_true.current.ospfAreaConfig.control.originate == false
1042 - l3out_1_update_ospf_default_route_true.current.ospfAreaConfig.control.redistribute == false
1043 - l3out_1_update_ospf_default_route_true.current.ospfAreaConfig.control.suppressFA == false
1044 - l3out_1_update_ospf_default_route_true.current.ospfAreaConfig.cost == 1
1045 - l3out_1_update_ospf_default_route_true.current.ospfAreaConfig.id == "0.0.0.1"
1046 - l3out_1_update_ospf_default_route_true.current.pim == true
1047 - l3out_1_update_ospf_default_route_true.current.routingProtocol == "ospf"
1048 - l3out_1_update_ospf_default_route_true.current.tagAnnotations == []
1049 - l3out_1_update_ospf_default_route_true.current.targetDscp == "af11"
1050 - l3out_1_update_ospf_default_route_true.current.uuid is defined
1051 - l3out_1_update_ospf_default_route_true.current.vrfRef != ""
1052 - l3out_1_update_ospf_default_route_true.previous.advancedRouteMapRefs.attachedHostRouteRedistRef != ""
1053 - l3out_1_update_ospf_default_route_true.previous.advancedRouteMapRefs.connectedRouteRedistRef != ""
1054 - l3out_1_update_ospf_default_route_true.previous.advancedRouteMapRefs.interleakRef != ""
1055 - l3out_1_update_ospf_default_route_true.previous.advancedRouteMapRefs.staticRouteRedistRef != ""
1056 - l3out_1_update_ospf_default_route_true.previous.description == "add_log"
1057 - l3out_1_update_ospf_default_route_true.previous.importRouteControl == false
1058 - l3out_1_update_ospf_default_route_true.previous.l3domain == "ans_l3_domain"
1059 - l3out_1_update_ospf_default_route_true.previous.name == "l3out_1_updated"
1060 - l3out_1_update_ospf_default_route_true.previous.ospfAreaConfig.areaType == "regular"
1061 - l3out_1_update_ospf_default_route_true.previous.ospfAreaConfig.control.originate == false
1062 - l3out_1_update_ospf_default_route_true.previous.ospfAreaConfig.control.redistribute == false
1063 - l3out_1_update_ospf_default_route_true.previous.ospfAreaConfig.control.suppressFA == false
1064 - l3out_1_update_ospf_default_route_true.previous.ospfAreaConfig.cost == 1
1065 - l3out_1_update_ospf_default_route_true.previous.ospfAreaConfig.id == "0.0.0.1"
1066 - l3out_1_update_ospf_default_route_true.previous.pim == true
1067 - l3out_1_update_ospf_default_route_true.previous.routingProtocol == "ospf"
1068 - l3out_1_update_ospf_default_route_true.previous.tagAnnotations == []
1069 - l3out_1_update_ospf_default_route_true.previous.targetDscp == "af11"
1070 - l3out_1_update_ospf_default_route_true.previous.uuid is defined
1071 - l3out_1_update_ospf_default_route_true.previous.vrfRef != ""
1072
1073 - name: Update L3Out l3out_1_updated object ospf area_type, cost and originate_default_route
1074 cisco.mso.ndo_l3out_template:
1075 <<: *mso_info
1076 l3out_template: '{{ ansible_l3out_template | default("ansible_test") }}'
1077 name: l3out_1_updated
1078 ospf:
1079 area_id: "0.0.0.1"
1080 area_type: "stub"
1081 cost: 3
1082 originate_default_route: "only"
1083 state: present
1084 register: l3out_1_update_ospf_type_and_cost
1085
1086 - name: Assertion check for update L3Out l3out_1_updated object ospf area_type, cost and originate_default_route
1087 ansible.builtin.assert:
1088 that:
1089 - l3out_1_update_ospf_type_and_cost is changed
1090 - l3out_1_update_ospf_type_and_cost.current.advancedRouteMapRefs.attachedHostRouteRedistRef != ""
1091 - l3out_1_update_ospf_type_and_cost.current.advancedRouteMapRefs.connectedRouteRedistRef != ""
1092 - l3out_1_update_ospf_type_and_cost.current.advancedRouteMapRefs.interleakRef != ""
1093 - l3out_1_update_ospf_type_and_cost.current.advancedRouteMapRefs.staticRouteRedistRef != ""
1094 - l3out_1_update_ospf_type_and_cost.current.defaultRouteLeak.always == true
1095 - l3out_1_update_ospf_type_and_cost.current.defaultRouteLeak.originateDefaultRoute == "only"
1096 - l3out_1_update_ospf_type_and_cost.current.description == "add_log"
1097 - l3out_1_update_ospf_type_and_cost.current.importRouteControl == false
1098 - l3out_1_update_ospf_type_and_cost.current.l3domain == "ans_l3_domain"
1099 - l3out_1_update_ospf_type_and_cost.current.name == "l3out_1_updated"
1100 - l3out_1_update_ospf_type_and_cost.current.ospfAreaConfig.areaType == "stub"
1101 - l3out_1_update_ospf_type_and_cost.current.ospfAreaConfig.control.originate == false
1102 - l3out_1_update_ospf_type_and_cost.current.ospfAreaConfig.control.redistribute == false
1103 - l3out_1_update_ospf_type_and_cost.current.ospfAreaConfig.control.suppressFA == false
1104 - l3out_1_update_ospf_type_and_cost.current.ospfAreaConfig.cost == 3
1105 - l3out_1_update_ospf_type_and_cost.current.ospfAreaConfig.id == "0.0.0.1"
1106 - l3out_1_update_ospf_type_and_cost.current.pim == true
1107 - l3out_1_update_ospf_type_and_cost.current.routingProtocol == "ospf"
1108 - l3out_1_update_ospf_type_and_cost.current.tagAnnotations == []
1109 - l3out_1_update_ospf_type_and_cost.current.targetDscp == "af11"
1110 - l3out_1_update_ospf_type_and_cost.current.uuid is defined
1111 - l3out_1_update_ospf_type_and_cost.current.vrfRef != ""
1112 - l3out_1_update_ospf_type_and_cost.previous.advancedRouteMapRefs.attachedHostRouteRedistRef != ""
1113 - l3out_1_update_ospf_type_and_cost.previous.advancedRouteMapRefs.connectedRouteRedistRef != ""
1114 - l3out_1_update_ospf_type_and_cost.previous.advancedRouteMapRefs.interleakRef != ""
1115 - l3out_1_update_ospf_type_and_cost.previous.advancedRouteMapRefs.staticRouteRedistRef != ""
1116 - l3out_1_update_ospf_type_and_cost.previous.defaultRouteLeak.always == true
1117 - l3out_1_update_ospf_type_and_cost.previous.defaultRouteLeak.originateDefaultRoute == "only"
1118 - l3out_1_update_ospf_type_and_cost.previous.description == "add_log"
1119 - l3out_1_update_ospf_type_and_cost.previous.importRouteControl == false
1120 - l3out_1_update_ospf_type_and_cost.previous.l3domain == "ans_l3_domain"
1121 - l3out_1_update_ospf_type_and_cost.previous.name == "l3out_1_updated"
1122 - l3out_1_update_ospf_type_and_cost.previous.ospfAreaConfig.areaType == "regular"
1123 - l3out_1_update_ospf_type_and_cost.previous.ospfAreaConfig.control.originate == false
1124 - l3out_1_update_ospf_type_and_cost.previous.ospfAreaConfig.control.redistribute == false
1125 - l3out_1_update_ospf_type_and_cost.previous.ospfAreaConfig.control.suppressFA == false
1126 - l3out_1_update_ospf_type_and_cost.previous.ospfAreaConfig.cost == 1
1127 - l3out_1_update_ospf_type_and_cost.previous.ospfAreaConfig.id == "0.0.0.1"
1128 - l3out_1_update_ospf_type_and_cost.previous.pim == true
1129 - l3out_1_update_ospf_type_and_cost.previous.routingProtocol == "ospf"
1130 - l3out_1_update_ospf_type_and_cost.previous.tagAnnotations == []
1131 - l3out_1_update_ospf_type_and_cost.previous.targetDscp == "af11"
1132 - l3out_1_update_ospf_type_and_cost.previous.uuid is defined
1133 - l3out_1_update_ospf_type_and_cost.previous.vrfRef != ""
1134
1135 - name: Update L3Out l3out_1_updated object ospf area_id
1136 cisco.mso.ndo_l3out_template:
1137 <<: *mso_info
1138 l3out_template: '{{ ansible_l3out_template | default("ansible_test") }}'
1139 name: l3out_1_updated
1140 ospf:
1141 area_id: "0.0.0.2"
1142 area_type: "stub"
1143 state: present
1144 register: l3out_1_update_ospf_id
1145
1146 - name: Assertion check for update L3Out l3out_1_updated object ospf area_id
1147 ansible.builtin.assert:
1148 that:
1149 - l3out_1_update_ospf_id is changed
1150 - l3out_1_update_ospf_id.current.advancedRouteMapRefs.attachedHostRouteRedistRef != ""
1151 - l3out_1_update_ospf_id.current.advancedRouteMapRefs.connectedRouteRedistRef != ""
1152 - l3out_1_update_ospf_id.current.advancedRouteMapRefs.interleakRef != ""
1153 - l3out_1_update_ospf_id.current.advancedRouteMapRefs.staticRouteRedistRef != ""
1154 - l3out_1_update_ospf_id.current.defaultRouteLeak.always == true
1155 - l3out_1_update_ospf_id.current.defaultRouteLeak.originateDefaultRoute == "only"
1156 - l3out_1_update_ospf_id.current.description == "add_log"
1157 - l3out_1_update_ospf_id.current.importRouteControl == false
1158 - l3out_1_update_ospf_id.current.l3domain == "ans_l3_domain"
1159 - l3out_1_update_ospf_id.current.name == "l3out_1_updated"
1160 - l3out_1_update_ospf_id.current.ospfAreaConfig.areaType == "stub"
1161 - l3out_1_update_ospf_id.current.ospfAreaConfig.control.originate == false
1162 - l3out_1_update_ospf_id.current.ospfAreaConfig.control.redistribute == false
1163 - l3out_1_update_ospf_id.current.ospfAreaConfig.control.suppressFA == false
1164 - l3out_1_update_ospf_id.current.ospfAreaConfig.cost == 3
1165 - l3out_1_update_ospf_id.current.ospfAreaConfig.id == "0.0.0.2"
1166 - l3out_1_update_ospf_id.current.pim == true
1167 - l3out_1_update_ospf_id.current.routingProtocol == "ospf"
1168 - l3out_1_update_ospf_id.current.tagAnnotations == []
1169 - l3out_1_update_ospf_id.current.targetDscp == "af11"
1170 - l3out_1_update_ospf_id.current.uuid is defined
1171 - l3out_1_update_ospf_id.current.vrfRef != ""
1172 - l3out_1_update_ospf_id.previous.advancedRouteMapRefs.attachedHostRouteRedistRef != ""
1173 - l3out_1_update_ospf_id.previous.advancedRouteMapRefs.connectedRouteRedistRef != ""
1174 - l3out_1_update_ospf_id.previous.advancedRouteMapRefs.interleakRef != ""
1175 - l3out_1_update_ospf_id.previous.advancedRouteMapRefs.staticRouteRedistRef != ""
1176 - l3out_1_update_ospf_id.previous.defaultRouteLeak.always == true
1177 - l3out_1_update_ospf_id.previous.defaultRouteLeak.originateDefaultRoute == "only"
1178 - l3out_1_update_ospf_id.previous.description == "add_log"
1179 - l3out_1_update_ospf_id.previous.importRouteControl == false
1180 - l3out_1_update_ospf_id.previous.l3domain == "ans_l3_domain"
1181 - l3out_1_update_ospf_id.previous.name == "l3out_1_updated"
1182 - l3out_1_update_ospf_id.previous.ospfAreaConfig.areaType == "stub"
1183 - l3out_1_update_ospf_id.previous.ospfAreaConfig.control.originate == false
1184 - l3out_1_update_ospf_id.previous.ospfAreaConfig.control.redistribute == false
1185 - l3out_1_update_ospf_id.previous.ospfAreaConfig.control.suppressFA == false
1186 - l3out_1_update_ospf_id.previous.ospfAreaConfig.cost == 3
1187 - l3out_1_update_ospf_id.previous.ospfAreaConfig.id == "0.0.0.1"
1188 - l3out_1_update_ospf_id.previous.pim == true
1189 - l3out_1_update_ospf_id.previous.routingProtocol == "ospf"
1190 - l3out_1_update_ospf_id.previous.tagAnnotations == []
1191 - l3out_1_update_ospf_id.previous.targetDscp == "af11"
1192 - l3out_1_update_ospf_id.previous.uuid is defined
1193 - l3out_1_update_ospf_id.previous.vrfRef != ""
1194
1195 - name: Clear ospf from L3Out l3out_1_updated object
1196 cisco.mso.ndo_l3out_template:
1197 <<: *mso_info
1198 l3out_template: '{{ ansible_l3out_template | default("ansible_test") }}'
1199 name: l3out_1_updated
1200 ospf:
1201 state: disabled
1202 state: present
1203 register: l3out_1_disable_ospf
1204
1205 - name: Assertion check for clear ospf from L3Out l3out_1_updated object
1206 ansible.builtin.assert:
1207 that:
1208 - l3out_1_disable_ospf is changed
1209 - l3out_1_disable_ospf.current.advancedRouteMapRefs.attachedHostRouteRedistRef != ""
1210 - l3out_1_disable_ospf.current.advancedRouteMapRefs.connectedRouteRedistRef != ""
1211 - l3out_1_disable_ospf.current.advancedRouteMapRefs.interleakRef != ""
1212 - l3out_1_disable_ospf.current.advancedRouteMapRefs.staticRouteRedistRef != ""
1213 - l3out_1_disable_ospf.current.description == "add_log"
1214 - l3out_1_disable_ospf.current.importRouteControl == false
1215 - l3out_1_disable_ospf.current.l3domain == "ans_l3_domain"
1216 - l3out_1_disable_ospf.current.name == "l3out_1_updated"
1217 - l3out_1_disable_ospf.current.pim == true
1218 - l3out_1_disable_ospf.current.routingProtocol == "none"
1219 - l3out_1_disable_ospf.current.tagAnnotations == []
1220 - l3out_1_disable_ospf.current.targetDscp == "af11"
1221 - l3out_1_disable_ospf.current.uuid is defined
1222 - l3out_1_disable_ospf.current.vrfRef != ""
1223 - l3out_1_disable_ospf.previous.advancedRouteMapRefs.attachedHostRouteRedistRef != ""
1224 - l3out_1_disable_ospf.previous.advancedRouteMapRefs.connectedRouteRedistRef != ""
1225 - l3out_1_disable_ospf.previous.advancedRouteMapRefs.interleakRef != ""
1226 - l3out_1_disable_ospf.previous.advancedRouteMapRefs.staticRouteRedistRef != ""
1227 - l3out_1_disable_ospf.previous.defaultRouteLeak.always == true
1228 - l3out_1_disable_ospf.previous.defaultRouteLeak.originateDefaultRoute == "only"
1229 - l3out_1_disable_ospf.previous.description == "add_log"
1230 - l3out_1_disable_ospf.previous.importRouteControl == false
1231 - l3out_1_disable_ospf.previous.l3domain == "ans_l3_domain"
1232 - l3out_1_disable_ospf.previous.name == "l3out_1_updated"
1233 - l3out_1_disable_ospf.previous.ospfAreaConfig.areaType == "stub"
1234 - l3out_1_disable_ospf.previous.ospfAreaConfig.control.originate == false
1235 - l3out_1_disable_ospf.previous.ospfAreaConfig.control.redistribute == false
1236 - l3out_1_disable_ospf.previous.ospfAreaConfig.control.suppressFA == false
1237 - l3out_1_disable_ospf.previous.ospfAreaConfig.cost == 3
1238 - l3out_1_disable_ospf.previous.ospfAreaConfig.id == "0.0.0.2"
1239 - l3out_1_disable_ospf.previous.pim == true
1240 - l3out_1_disable_ospf.previous.routingProtocol == "ospf"
1241 - l3out_1_disable_ospf.previous.tagAnnotations == []
1242 - l3out_1_disable_ospf.previous.targetDscp == "af11"
1243 - l3out_1_disable_ospf.previous.uuid is defined
1244 - l3out_1_disable_ospf.previous.vrfRef != ""
1245
1246 - name: Clear bgp and ospf from L3Out l3out_1_updated object when it is not configured
1247 cisco.mso.ndo_l3out_template:
1248 <<: *mso_info
1249 l3out_template: '{{ ansible_l3out_template | default("ansible_test") }}'
1250 name: l3out_1_updated
1251 bgp:
1252 state: disabled
1253 ospf:
1254 state: disabled
1255 state: present
1256 register: l3out_1_disable_bgp_ospf_again
1257
1258 - name: Assertion check for clear bgp and ospf from L3Out l3out_1_updated object when it is not configured
1259 ansible.builtin.assert:
1260 that:
1261 - l3out_1_disable_bgp_ospf_again is not changed
1262 - l3out_1_disable_bgp_ospf_again.current.advancedRouteMapRefs.attachedHostRouteRedistRef != ""
1263 - l3out_1_disable_bgp_ospf_again.current.advancedRouteMapRefs.connectedRouteRedistRef != ""
1264 - l3out_1_disable_bgp_ospf_again.current.advancedRouteMapRefs.interleakRef != ""
1265 - l3out_1_disable_bgp_ospf_again.current.advancedRouteMapRefs.staticRouteRedistRef != ""
1266 - l3out_1_disable_bgp_ospf_again.current.description == "add_log"
1267 - l3out_1_disable_bgp_ospf_again.current.importRouteControl == false
1268 - l3out_1_disable_bgp_ospf_again.current.l3domain == "ans_l3_domain"
1269 - l3out_1_disable_bgp_ospf_again.current.name == "l3out_1_updated"
1270 - l3out_1_disable_bgp_ospf_again.current.pim == true
1271 - l3out_1_disable_bgp_ospf_again.current.routingProtocol == "none"
1272 - l3out_1_disable_bgp_ospf_again.current.tagAnnotations == []
1273 - l3out_1_disable_bgp_ospf_again.current.targetDscp == "af11"
1274 - l3out_1_disable_bgp_ospf_again.current.uuid is defined
1275 - l3out_1_disable_bgp_ospf_again.current.vrfRef != ""
1276 - l3out_1_disable_bgp_ospf_again.previous.advancedRouteMapRefs.attachedHostRouteRedistRef != ""
1277 - l3out_1_disable_bgp_ospf_again.previous.advancedRouteMapRefs.connectedRouteRedistRef != ""
1278 - l3out_1_disable_bgp_ospf_again.previous.advancedRouteMapRefs.interleakRef != ""
1279 - l3out_1_disable_bgp_ospf_again.previous.advancedRouteMapRefs.staticRouteRedistRef != ""
1280 - l3out_1_disable_bgp_ospf_again.previous.description == "add_log"
1281 - l3out_1_disable_bgp_ospf_again.previous.importRouteControl == false
1282 - l3out_1_disable_bgp_ospf_again.previous.l3domain == "ans_l3_domain"
1283 - l3out_1_disable_bgp_ospf_again.previous.name == "l3out_1_updated"
1284 - l3out_1_disable_bgp_ospf_again.previous.pim == true
1285 - l3out_1_disable_bgp_ospf_again.previous.routingProtocol == "none"
1286 - l3out_1_disable_bgp_ospf_again.previous.tagAnnotations == []
1287 - l3out_1_disable_bgp_ospf_again.previous.targetDscp == "af11"
1288 - l3out_1_disable_bgp_ospf_again.previous.uuid is defined
1289 - l3out_1_disable_bgp_ospf_again.previous.vrfRef != ""
1290
1291 - name: Create l3out_2 object with full details
1292 cisco.mso.ndo_l3out_template:
1293 <<: *mso_info
1294 l3out_template: '{{ ansible_l3out_template | default("ansible_test") }}'
1295 name: "l3out_2"
1296 l3_domain: ans_l3_domain
1297 vrf:
1298 name: "VRF1"
1299 schema: '{{ mso_schema | default("ansible_test") }}'
1300 template: "Template1"
1301 description: "test description"
1302 pim: false
1303 target_dscp: "unspecified"
1304 interleak: "ans_route_map"
1305 static_route_redistribution: "ans_route_map"
1306 connected_route_redistribution: "ans_route_map"
1307 attached_host_route_redistribution: "ans_route_map"
1308 ospf:
1309 state: enabled
1310 area_id: "0.0.0.1"
1311 area_type: "regular"
1312 cost: 1
1313 send_redistributed_lsas: true
1314 originate_summary_lsa: true
1315 suppress_forwarding_addr_translated_lsa: true
1316 originate_default_route: "only"
1317 originate_default_route_always: false
1318 bgp:
1319 state: enabled
1320 route_dampening_ipv4: "ans_route_map"
1321 route_dampening_ipv6: "ans_route_map"
1322 inbound_route_map: "ans_route_map"
1323 outbound_route_map: "ans_route_map"
1324 state: "present"
1325 register: l3out_2_full_config
1326
1327 - name: Assertion check for create l3out_2 object with full details
1328 ansible.builtin.assert:
1329 that:
1330 - l3out_2_full_config is changed
1331 - l3out_2_full_config.current.advancedRouteMapRefs.attachedHostRouteRedistRef != ""
1332 - l3out_2_full_config.current.advancedRouteMapRefs.connectedRouteRedistRef != ""
1333 - l3out_2_full_config.current.advancedRouteMapRefs.interleakRef != ""
1334 - l3out_2_full_config.current.advancedRouteMapRefs.routeDampeningV4Ref != ""
1335 - l3out_2_full_config.current.advancedRouteMapRefs.routeDampeningV6Ref != ""
1336 - l3out_2_full_config.current.advancedRouteMapRefs.staticRouteRedistRef != ""
1337 - l3out_2_full_config.current.defaultRouteLeak.always == false
1338 - l3out_2_full_config.current.defaultRouteLeak.originateDefaultRoute == "only"
1339 - l3out_2_full_config.current.description == "test description"
1340 - l3out_2_full_config.current.exportRouteMapRef != ""
1341 - l3out_2_full_config.current.importRouteControl == true
1342 - l3out_2_full_config.current.importRouteMapRef != ""
1343 - l3out_2_full_config.current.l3domain == "ans_l3_domain"
1344 - l3out_2_full_config.current.name == "l3out_2"
1345 - l3out_2_full_config.current.ospfAreaConfig.areaType == "regular"
1346 - l3out_2_full_config.current.ospfAreaConfig.control.originate == true
1347 - l3out_2_full_config.current.ospfAreaConfig.control.redistribute == true
1348 - l3out_2_full_config.current.ospfAreaConfig.control.suppressFA == true
1349 - l3out_2_full_config.current.ospfAreaConfig.cost == 1
1350 - l3out_2_full_config.current.ospfAreaConfig.id == "0.0.0.1"
1351 - l3out_2_full_config.current.pim == false
1352 - l3out_2_full_config.current.routingProtocol == "bgpOspf"
1353 - l3out_2_full_config.current.targetDscp == "unspecified"
1354 - l3out_2_full_config.current.vrfRef != ""
1355 - l3out_2_full_config.previous == {}
1356
1357 - name: Create l3out_3 object with min config of bgp and ospf
1358 cisco.mso.ndo_l3out_template:
1359 <<: *mso_info
1360 l3out_template: '{{ ansible_l3out_template | default("ansible_test") }}'
1361 name: "l3out_3"
1362 l3_domain: ans_l3_domain
1363 vrf:
1364 name: "VRF1"
1365 schema: '{{ mso_schema | default("ansible_test") }}'
1366 template: "Template1"
1367 description: "test description"
1368 pim: false
1369 target_dscp: "unspecified"
1370 interleak: "ans_route_map"
1371 static_route_redistribution: "ans_route_map"
1372 connected_route_redistribution: "ans_route_map"
1373 attached_host_route_redistribution: "ans_route_map"
1374 ospf:
1375 state: enabled
1376 area_id: "0.0.0.1"
1377 area_type: "regular"
1378 cost: 1
1379 bgp:
1380 state: enabled
1381 state: "present"
1382 register: l3out_3_min_config
1383
1384 - name: Assertion check for create l3out_3 object with min config of bgp and ospf
1385 ansible.builtin.assert:
1386 that:
1387 - l3out_3_min_config is changed
1388 - l3out_3_min_config.current.advancedRouteMapRefs.attachedHostRouteRedistRef != ""
1389 - l3out_3_min_config.current.advancedRouteMapRefs.connectedRouteRedistRef != ""
1390 - l3out_3_min_config.current.advancedRouteMapRefs.interleakRef != ""
1391 - l3out_3_min_config.current.advancedRouteMapRefs.staticRouteRedistRef != ""
1392 - l3out_3_min_config.current.description == "test description"
1393 - l3out_3_min_config.current.importRouteControl == false
1394 - l3out_3_min_config.current.l3domain == "ans_l3_domain"
1395 - l3out_3_min_config.current.name == "l3out_3"
1396 - l3out_3_min_config.current.ospfAreaConfig.areaType == "regular"
1397 - l3out_3_min_config.current.ospfAreaConfig.cost == 1
1398 - l3out_3_min_config.current.ospfAreaConfig.id == "0.0.0.1"
1399 - l3out_3_min_config.current.pim == false
1400 - l3out_3_min_config.current.routingProtocol == "bgpOspf"
1401 - l3out_3_min_config.current.targetDscp == "unspecified"
1402 - l3out_3_min_config.current.vrfRef != ""
1403 - l3out_3_min_config.previous == {}
1404
1405 - name: Update l3out_3 object with min config of bgp
1406 cisco.mso.ndo_l3out_template:
1407 <<: *mso_info
1408 l3out_template: '{{ ansible_l3out_template | default("ansible_test") }}'
1409 name: "l3out_3"
1410 l3_domain: ans_l3_domain
1411 vrf:
1412 name: "VRF1"
1413 schema: '{{ mso_schema | default("ansible_test") }}'
1414 template: "Template1"
1415 description: "test description"
1416 pim: false
1417 target_dscp: "unspecified"
1418 interleak: "ans_route_map"
1419 static_route_redistribution: "ans_route_map"
1420 connected_route_redistribution: "ans_route_map"
1421 attached_host_route_redistribution: "ans_route_map"
1422 bgp:
1423 state: enabled
1424 state: "present"
1425 register: update_l3out_3_bgp_min_config
1426
1427 - name: Assertion check for update l3out_3 object with min config of bgp
1428 ansible.builtin.assert:
1429 that:
1430 - update_l3out_3_bgp_min_config is not changed
1431 - update_l3out_3_bgp_min_config.current.advancedRouteMapRefs.attachedHostRouteRedistRef != ""
1432 - update_l3out_3_bgp_min_config.current.advancedRouteMapRefs.connectedRouteRedistRef != ""
1433 - update_l3out_3_bgp_min_config.current.advancedRouteMapRefs.interleakRef != ""
1434 - update_l3out_3_bgp_min_config.current.advancedRouteMapRefs.staticRouteRedistRef != ""
1435 - update_l3out_3_bgp_min_config.current.description == "test description"
1436 - update_l3out_3_bgp_min_config.current.importRouteControl == false
1437 - update_l3out_3_bgp_min_config.current.l3domain == "ans_l3_domain"
1438 - update_l3out_3_bgp_min_config.current.name == "l3out_3"
1439 - update_l3out_3_bgp_min_config.current.ospfAreaConfig.areaType == "regular"
1440 - update_l3out_3_bgp_min_config.current.ospfAreaConfig.control.originate == false
1441 - update_l3out_3_bgp_min_config.current.ospfAreaConfig.control.redistribute == false
1442 - update_l3out_3_bgp_min_config.current.ospfAreaConfig.control.suppressFA == false
1443 - update_l3out_3_bgp_min_config.current.ospfAreaConfig.cost == 1
1444 - update_l3out_3_bgp_min_config.current.ospfAreaConfig.id == "0.0.0.1"
1445 - update_l3out_3_bgp_min_config.current.pim == false
1446 - update_l3out_3_bgp_min_config.current.routingProtocol == "bgpOspf"
1447 - update_l3out_3_bgp_min_config.current.tagAnnotations == []
1448 - update_l3out_3_bgp_min_config.current.targetDscp == "unspecified"
1449 - update_l3out_3_bgp_min_config.current.uuid is defined
1450 - update_l3out_3_bgp_min_config.current.vrfRef != ""
1451 - update_l3out_3_bgp_min_config.previous.advancedRouteMapRefs.attachedHostRouteRedistRef != ""
1452 - update_l3out_3_bgp_min_config.previous.advancedRouteMapRefs.connectedRouteRedistRef != ""
1453 - update_l3out_3_bgp_min_config.previous.advancedRouteMapRefs.interleakRef != ""
1454 - update_l3out_3_bgp_min_config.previous.advancedRouteMapRefs.staticRouteRedistRef != ""
1455 - update_l3out_3_bgp_min_config.previous.description == "test description"
1456 - update_l3out_3_bgp_min_config.previous.importRouteControl == false
1457 - update_l3out_3_bgp_min_config.previous.l3domain == "ans_l3_domain"
1458 - update_l3out_3_bgp_min_config.previous.name == "l3out_3"
1459 - update_l3out_3_bgp_min_config.previous.ospfAreaConfig.areaType == "regular"
1460 - update_l3out_3_bgp_min_config.previous.ospfAreaConfig.control.originate == false
1461 - update_l3out_3_bgp_min_config.previous.ospfAreaConfig.control.redistribute == false
1462 - update_l3out_3_bgp_min_config.previous.ospfAreaConfig.control.suppressFA == false
1463 - update_l3out_3_bgp_min_config.previous.ospfAreaConfig.cost == 1
1464 - update_l3out_3_bgp_min_config.previous.ospfAreaConfig.id == "0.0.0.1"
1465 - update_l3out_3_bgp_min_config.previous.pim == false
1466 - update_l3out_3_bgp_min_config.previous.routingProtocol == "bgpOspf"
1467 - update_l3out_3_bgp_min_config.previous.tagAnnotations == []
1468 - update_l3out_3_bgp_min_config.previous.targetDscp == "unspecified"
1469 - update_l3out_3_bgp_min_config.previous.uuid is defined
1470 - update_l3out_3_bgp_min_config.previous.vrfRef != ""
1471
1472 - name: Query a L3Out with name
1473 cisco.mso.ndo_l3out_template:
1474 <<: *mso_info
1475 l3out_template: '{{ ansible_l3out_template | default("ansible_test") }}'
1476 name: "l3out_2"
1477 state: query
1478 register: query_l3out_with_name
1479
1480 - name: Query a L3Out with uuid
1481 cisco.mso.ndo_l3out_template:
1482 <<: *mso_info
1483 l3out_template: '{{ ansible_l3out_template | default("ansible_test") }}'
1484 uuid: "{{ query_l3out_with_name.current.uuid }}"
1485 state: query
1486 register: query_l3out_with_uuid
1487
1488 - name: Assertion check for query l3out with name and uuid
1489 ansible.builtin.assert:
1490 that:
1491 - query_l3out_with_name is not changed
1492 - query_l3out_with_uuid is not changed
1493 - query_l3out_with_name.current.name == query_l3out_with_uuid.current.name == "l3out_2"
1494 - query_l3out_with_name.current.uuid == query_l3out_with_uuid.current.uuid
1495 - query_l3out_with_uuid.current.advancedRouteMapRefs.attachedHostRouteRedistName == "ans_route_map"
1496 - query_l3out_with_uuid.current.advancedRouteMapRefs.attachedHostRouteRedistRef != ""
1497 - query_l3out_with_uuid.current.advancedRouteMapRefs.connectedRouteRedistName == "ans_route_map"
1498 - query_l3out_with_uuid.current.advancedRouteMapRefs.connectedRouteRedistRef != ""
1499 - query_l3out_with_uuid.current.advancedRouteMapRefs.interleakName == "ans_route_map"
1500 - query_l3out_with_uuid.current.advancedRouteMapRefs.interleakRef != ""
1501 - query_l3out_with_uuid.current.advancedRouteMapRefs.routeDampeningV4Name == "ans_route_map"
1502 - query_l3out_with_uuid.current.advancedRouteMapRefs.routeDampeningV4Ref != ""
1503 - query_l3out_with_uuid.current.advancedRouteMapRefs.routeDampeningV6Name == "ans_route_map"
1504 - query_l3out_with_uuid.current.advancedRouteMapRefs.routeDampeningV6Ref != ""
1505 - query_l3out_with_uuid.current.advancedRouteMapRefs.staticRouteRedistName == "ans_route_map"
1506 - query_l3out_with_uuid.current.advancedRouteMapRefs.staticRouteRedistRef != ""
1507 - query_l3out_with_uuid.current.defaultRouteLeak.always == false
1508 - query_l3out_with_uuid.current.defaultRouteLeak.originateDefaultRoute == "only"
1509 - query_l3out_with_uuid.current.description == "test description"
1510 - query_l3out_with_uuid.current.exportRouteMapName == "ans_route_map"
1511 - query_l3out_with_uuid.current.exportRouteMapRef != ""
1512 - query_l3out_with_uuid.current.importRouteControl == true
1513 - query_l3out_with_uuid.current.importRouteMapName == "ans_route_map"
1514 - query_l3out_with_uuid.current.importRouteMapRef != ""
1515 - query_l3out_with_uuid.current.l3domain == "ans_l3_domain"
1516 - query_l3out_with_uuid.current.ospfAreaConfig.areaType == "regular"
1517 - query_l3out_with_uuid.current.ospfAreaConfig.control.originate == true
1518 - query_l3out_with_uuid.current.ospfAreaConfig.control.redistribute == true
1519 - query_l3out_with_uuid.current.ospfAreaConfig.control.suppressFA == true
1520 - query_l3out_with_uuid.current.ospfAreaConfig.cost == 1
1521 - query_l3out_with_uuid.current.ospfAreaConfig.id == "0.0.0.1"
1522 - query_l3out_with_uuid.current.pim == false
1523 - query_l3out_with_uuid.current.routingProtocol == "bgpOspf"
1524 - query_l3out_with_uuid.current.tagAnnotations == []
1525 - query_l3out_with_uuid.current.targetDscp == "unspecified"
1526 - query_l3out_with_uuid.current.vrfName == "VRF1"
1527 - query_l3out_with_uuid.current.vrfRef != ""
1528
1529 - name: Delete l3out_2 object - check_mode
1530 cisco.mso.ndo_l3out_template: &cm_l3out_2_absent
1531 <<: *mso_info
1532 l3out_template: '{{ ansible_l3out_template | default("ansible_test") }}'
1533 name: "l3out_2"
1534 state: absent
1535 output_level: debug
1536 check_mode: true
1537 register: cm_l3out_2_absent
1538
1539 - name: Assertion check for delete l3out_2 object - check_mode
1540 ansible.builtin.assert:
1541 that:
1542 - cm_l3out_2_absent is changed
1543 - cm_l3out_2_absent.current == {}
1544 - cm_l3out_2_absent.previous.name == "l3out_2"
1545
1546 - name: Delete l3out_2 object - normal_mode
1547 cisco.mso.ndo_l3out_template:
1548 <<: *cm_l3out_2_absent
1549 register: nm_l3out_2_absent
1550
1551 - name: Assertion check for delete l3out_2 object - normal_mode
1552 ansible.builtin.assert:
1553 that:
1554 - nm_l3out_2_absent is changed
1555 - nm_l3out_2_absent.current == {}
1556 - nm_l3out_2_absent.previous.name == "l3out_2"
1557
1558 - name: Delete l3out_2 object - normal_mode again
1559 cisco.mso.ndo_l3out_template:
1560 <<: *cm_l3out_2_absent
1561 register: nm_l3out_2_absent_again
1562
1563 - name: Assertion check for delete l3out_2 object - normal_mode again
1564 ansible.builtin.assert:
1565 that:
1566 - nm_l3out_2_absent_again is not changed
1567 - nm_l3out_2_absent_again.current == {}
1568 - nm_l3out_2_absent_again.previous == {}
1569
1570 # Negative test part begins
1571 - name: Update l3out_3 object name using invalid uuid
1572 cisco.mso.ndo_l3out_template:
1573 <<: *mso_info
1574 l3out_template: '{{ ansible_l3out_template | default("ansible_test") }}'
1575 name: "l3out_3_nt"
1576 uuid: "invalid_uuid"
1577 l3_domain: ans_l3_domain
1578 vrf:
1579 name: "VRF1"
1580 schema: '{{ mso_schema | default("ansible_test") }}'
1581 template: "Template1"
1582 state: "present"
1583 register: update_with_invalid_uuid
1584 ignore_errors: true
1585
1586 - name: Set error message for invalid uuid
1587 ansible.builtin.set_fact:
1588 error_message_invalid_uuid: "L3Out with the uuid: 'invalid_uuid' not found"
1589
1590 - name: Assertion check for update l3out_3 object name using invalid uuid
1591 ansible.builtin.assert:
1592 that:
1593 - update_with_invalid_uuid is not changed
1594 - update_with_invalid_uuid.msg == error_message_invalid_uuid
1595
1596 - name: Update l3out_3 object without ospf - id and type
1597 cisco.mso.ndo_l3out_template:
1598 <<: *mso_info
1599 l3out_template: '{{ ansible_l3out_template | default("ansible_test") }}'
1600 name: "l3out_3"
1601 l3_domain: ans_l3_domain
1602 vrf:
1603 name: "VRF1"
1604 schema: '{{ mso_schema | default("ansible_test") }}'
1605 template: "Template1"
1606 ospf:
1607 cost: 5
1608 state: "present"
1609 register: update_l3out_3_ospf_nt
1610 ignore_errors: true
1611
1612 - name: Assertion check for update l3out_3 object without ospf - id and type
1613 ansible.builtin.assert:
1614 that:
1615 - update_l3out_3_ospf_nt is not changed
1616 - 'update_l3out_3_ospf_nt.msg == "state is enabled but all of the following are missing: area_id, area_type found in ospf"'
1617
1618 - name: Enable pim with L3 Multicast disabled vrf
1619 cisco.mso.ndo_l3out_template:
1620 <<: *mso_info
1621 l3out_template: '{{ ansible_l3out_template | default("ansible_test") }}'
1622 name: "l3out_nt"
1623 l3_domain: ans_l3_domain
1624 vrf:
1625 name: "VRF1"
1626 schema: '{{ mso_schema | default("ansible_test") }}'
1627 template: "Template1"
1628 pim: true
1629 state: present
1630 register: enable_pim_with_invalid_vrf
1631 ignore_errors: true
1632
1633 - name: Set error message for enable pim with L3 Multicast disabled vrf
1634 ansible.builtin.set_fact:
1635 error_message_invalid_vrf: "Invalid configuration in L3Out Name: l3out_nt, 'PIM' cannot be enabled while using the VRF 'VRF1' with L3 Multicast disabled"
1636
1637 - name: Assertion check for enable pim with L3 Multicast disabled vrf
1638 ansible.builtin.assert:
1639 that:
1640 - enable_pim_with_invalid_vrf is not changed
1641 - enable_pim_with_invalid_vrf.msg == error_message_invalid_vrf
1642
1643 - name: Update l3out_3 object to enable with L3 Multicast disabled vrf
1644 cisco.mso.ndo_l3out_template:
1645 <<: *mso_info
1646 l3out_template: '{{ ansible_l3out_template | default("ansible_test") }}'
1647 uuid: "{{ update_l3out_3_bgp_min_config.current.uuid }}"
1648 l3_domain: ans_l3_domain
1649 vrf:
1650 name: "VRF1"
1651 schema: '{{ mso_schema | default("ansible_test") }}'
1652 template: "Template1"
1653 pim: true
1654 state: "present"
1655 register: update_l3out_3_pim_nt
1656 ignore_errors: true
1657
1658 - name: Assertion check for update l3out_3 object to enable with L3 Multicast disabled vrf
1659 ansible.builtin.assert:
1660 that:
1661 - update_l3out_3_pim_nt is not changed
1662 - update_l3out_3_pim_nt.msg is match("Invalid configuration in L3Out UUID.+, 'PIM' cannot be enabled while using the VRF 'VRF1' with L3 Multicast disabled")
1663
1664 - name: Create L3Out object without ospf area_id
1665 cisco.mso.ndo_l3out_template:
1666 <<: *mso_info
1667 l3out_template: '{{ ansible_l3out_template | default("ansible_test") }}'
1668 name: "l3out_nt"
1669 l3_domain: ans_l3_domain
1670 vrf:
1671 name: "VRF1"
1672 schema: '{{ mso_schema | default("ansible_test") }}'
1673 template: "Template1"
1674 ospf:
1675 area_type: "stub"
1676 state: present
1677 register: create_ospf_without_area_id
1678 ignore_errors: true
1679
1680 - name: Assertion check for create L3Out object without ospf area_id
1681 ansible.builtin.assert:
1682 that:
1683 - create_ospf_without_area_id is not changed
1684 - 'create_ospf_without_area_id.msg == "state is enabled but all of the following are missing: area_id found in ospf"'
1685
1686 - name: Create L3Out object without vrf
1687 cisco.mso.ndo_l3out_template:
1688 <<: *mso_info
1689 l3out_template: '{{ ansible_l3out_template | default("ansible_test") }}'
1690 name: "l3out_nt"
1691 l3_domain: ans_l3_domain
1692 state: present
1693 register: create_without_vrf
1694 ignore_errors: true
1695
1696 - name: Assertion check for create L3Out object without vrf
1697 ansible.builtin.assert:
1698 that:
1699 - create_without_vrf is not changed
1700 - create_without_vrf.msg == "The O(vrf) is required during the creation."
1701 # Negative test part ends
1702
1703 - name: Query all L3Out objects
1704 cisco.mso.ndo_l3out_template:
1705 <<: *mso_info
1706 l3out_template: '{{ ansible_l3out_template | default("ansible_test") }}'
1707 state: "query"
1708 register: query_all_l3outs
1709
1710 - name: Assertion check for query all L3Out objects
1711 ansible.builtin.assert:
1712 that:
1713 - query_all_l3outs is not changed
1714 - query_all_l3outs.current | length == 2
1715
1716 - name: Delete L3Out using uuid
1717 cisco.mso.ndo_l3out_template:
1718 <<: *mso_info
1719 l3out_template: '{{ ansible_l3out_template | default("ansible_test") }}'
1720 uuid: "{{ update_l3out_3_bgp_min_config.current.uuid }}"
1721 state: "absent"
1722 register: absent_with_uuid
1723
1724 - name: Assertion check for delete L3Out using uuid
1725 ansible.builtin.assert:
1726 that:
1727 - absent_with_uuid is changed
1728 - absent_with_uuid.current == {}
1729 - absent_with_uuid.previous.name == "l3out_3"
1730
1731 # Cleanup Part
1732 - name: Remove l3out tenant template
1733 cisco.mso.ndo_template:
1734 <<: *ndo_l3out_template_absent
1735
1736 - name: Remove tenant policy template
1737 cisco.mso.ndo_template:
1738 <<: *tenant_pol_template_absent
1739
1740 - name: Remove fabric_policy template
1741 cisco.mso.ndo_template:
1742 <<: *fabric_pol_template_absent
1743
1744 - name: Remove ansible_test schema template not exist
1745 cisco.mso.mso_schema_template:
1746 <<: *mso_schema_template_absent