PR to fix ios bgp TC failure (#58010)
* fix ios bgp tc failure Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com> * skip test with 15.6(T)2 ios Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com> * skip test with 15.6(T)2 ios Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>
This commit is contained in:
parent
2b5ad94a96
commit
77b6255305
1 changed files with 337 additions and 328 deletions
|
@ -5,7 +5,9 @@
|
|||
operation: delete
|
||||
ignore_errors: yes
|
||||
|
||||
- name: Configure BGP with AS 64496 and a router-id
|
||||
- block:
|
||||
|
||||
- name: Configure BGP with AS 64496 and a router-id
|
||||
ios_bgp: &config
|
||||
operation: merge
|
||||
config:
|
||||
|
@ -13,21 +15,21 @@
|
|||
router_id: 192.0.2.2
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
- assert:
|
||||
that:
|
||||
- 'result.changed == true'
|
||||
- "'router bgp 64496' in result.commands"
|
||||
- "'bgp router-id 192.0.2.2' in result.commands"
|
||||
|
||||
- name: Configure BGP with AS 64496 and a router-id (idempotent)
|
||||
- name: Configure BGP with AS 64496 and a router-id (idempotent)
|
||||
ios_bgp: *config
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
- assert:
|
||||
that:
|
||||
- 'result.changed == false'
|
||||
|
||||
- name: Configure BGP neighbors
|
||||
- name: Configure BGP neighbors
|
||||
ios_bgp: &nbr
|
||||
operation: merge
|
||||
config:
|
||||
|
@ -49,7 +51,7 @@
|
|||
ebgp_multihop: 150
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
- assert:
|
||||
that:
|
||||
- 'result.changed == true'
|
||||
- "'router bgp 64496' in result.commands"
|
||||
|
@ -61,15 +63,15 @@
|
|||
- "'neighbor 192.0.2.15 description IBGP_NBR_2' in result.commands"
|
||||
- "'neighbor 192.0.2.15 ebgp-multihop 150' in result.commands"
|
||||
|
||||
- name: Configure BGP neighbors (idempotent)
|
||||
- name: Configure BGP neighbors (idempotent)
|
||||
ios_bgp: *nbr
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
- assert:
|
||||
that:
|
||||
- 'result.changed == false'
|
||||
|
||||
- name: Configure BGP neighbors with operation replace
|
||||
- name: Configure BGP neighbors with operation replace
|
||||
ios_bgp: &nbr_rplc
|
||||
operation: replace
|
||||
config:
|
||||
|
@ -86,7 +88,7 @@
|
|||
local_as: 64497
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
- assert:
|
||||
that:
|
||||
- 'result.changed == true'
|
||||
- "'neighbor 203.0.113.10 remote-as 64511' in result.commands"
|
||||
|
@ -94,15 +96,15 @@
|
|||
- "'neighbor 203.0.113.10 local-as 64497' in result.commands"
|
||||
- "'no neighbor 192.0.2.10' in result.commands"
|
||||
|
||||
- name: Configure BGP neighbors with operation replace (idempotent)
|
||||
- name: Configure BGP neighbors with operation replace (idempotent)
|
||||
ios_bgp: *nbr_rplc
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
- assert:
|
||||
that:
|
||||
- 'result.changed == false'
|
||||
|
||||
- name: Configure root-level networks for BGP
|
||||
- name: Configure root-level networks for BGP
|
||||
ios_bgp: &net
|
||||
operation: merge
|
||||
config:
|
||||
|
@ -117,22 +119,22 @@
|
|||
route_map: RMAP_2
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
- assert:
|
||||
that:
|
||||
- 'result.changed == True'
|
||||
- "'router bgp 64496' in result.commands"
|
||||
- "'network 203.0.113.0 mask 255.255.255.224 route-map RMAP_1' in result.commands"
|
||||
- "'network 203.0.113.32 mask 255.255.255.224 route-map RMAP_2' in result.commands"
|
||||
|
||||
- name: Configure root-level networks for BGP (idempotent)
|
||||
- name: Configure root-level networks for BGP (idempotent)
|
||||
ios_bgp: *net
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
- assert:
|
||||
that:
|
||||
- 'result.changed == false'
|
||||
|
||||
- name: Configure root-level networks for BGP with operation replace
|
||||
- name: Configure root-level networks for BGP with operation replace
|
||||
ios_bgp: &net_rplc
|
||||
operation: replace
|
||||
config:
|
||||
|
@ -146,22 +148,22 @@
|
|||
masklen: 28
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
- assert:
|
||||
that:
|
||||
- 'result.changed == True'
|
||||
- "'router bgp 64496' in result.commands"
|
||||
- "'network 198.51.100.16 mask 255.255.255.240' in result.commands"
|
||||
- "'no network 203.0.113.32 mask 255.255.255.224 route-map RMAP_2' in result.commands"
|
||||
|
||||
- name: Configure root-level networks for BGP with operation replace (idempotent)
|
||||
- name: Configure root-level networks for BGP with operation replace (idempotent)
|
||||
ios_bgp: *net_rplc
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
- assert:
|
||||
that:
|
||||
- 'result.changed == false'
|
||||
|
||||
- name: Configure BGP neighbors under address family mode
|
||||
- name: Configure BGP neighbors under address family mode
|
||||
ios_bgp: &af_nbr
|
||||
operation: merge
|
||||
config:
|
||||
|
@ -180,7 +182,7 @@
|
|||
route_reflector_client: True
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
- assert:
|
||||
that:
|
||||
- 'result.changed == true'
|
||||
- "'router bgp 64496' in result.commands"
|
||||
|
@ -191,15 +193,15 @@
|
|||
- "'neighbor 192.0.2.15 activate' in result.commands"
|
||||
- "'neighbor 192.0.2.15 route-reflector-client' in result.commands"
|
||||
|
||||
- name: Configure BGP neighbors under address family mode (idempotent)
|
||||
- name: Configure BGP neighbors under address family mode (idempotent)
|
||||
ios_bgp: *af_nbr
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
- assert:
|
||||
that:
|
||||
- 'result.changed == false'
|
||||
|
||||
- name: Configure networks under address family
|
||||
- name: Configure networks under address family
|
||||
ios_bgp: &af_net
|
||||
operation: merge
|
||||
config:
|
||||
|
@ -226,7 +228,7 @@
|
|||
masklen: 28
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
- assert:
|
||||
that:
|
||||
- 'result.changed == true'
|
||||
- "'router bgp 64496' in result.commands"
|
||||
|
@ -239,15 +241,15 @@
|
|||
- "'network 198.51.100.64 mask 255.255.255.240' in result.commands"
|
||||
- "'exit-address-family' in result.commands"
|
||||
|
||||
- name: Configure networks under address family (idempotent)
|
||||
- name: Configure networks under address family (idempotent)
|
||||
ios_bgp: *af_net
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
- assert:
|
||||
that:
|
||||
- 'result.changed == false'
|
||||
|
||||
- name: Configure networks under address family with operation replace
|
||||
- name: Configure networks under address family with operation replace
|
||||
ios_bgp: &af_net_rplc
|
||||
operation: replace
|
||||
config:
|
||||
|
@ -272,7 +274,7 @@
|
|||
masklen: 28
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
- assert:
|
||||
that:
|
||||
- 'result.changed == true'
|
||||
- '"router bgp 64496" in result.commands'
|
||||
|
@ -283,15 +285,15 @@
|
|||
- '"no network 203.0.113.160 mask 255.255.255.224 route-map RMAP_2" in result.commands'
|
||||
- '"exit-address-family" in result.commands'
|
||||
|
||||
- name: Configure networks under address family with operation replace (idempotent)
|
||||
- name: Configure networks under address family with operation replace (idempotent)
|
||||
ios_bgp: *af_net_rplc
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
- assert:
|
||||
that:
|
||||
- 'result.changed == false'
|
||||
|
||||
- name: Configure redistribute information under address family mode
|
||||
- name: Configure redistribute information under address family mode
|
||||
ios_bgp: &af_rdr
|
||||
operation: merge
|
||||
config:
|
||||
|
@ -309,7 +311,7 @@
|
|||
metric: 256
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
- assert:
|
||||
that:
|
||||
- 'result.changed == true'
|
||||
- "'router bgp 64496' in result.commands"
|
||||
|
@ -318,15 +320,19 @@
|
|||
- "'redistribute eigrp 233 metric 256' in result.commands"
|
||||
- "'exit-address-family' in result.commands"
|
||||
|
||||
- name: Configure redistribute information under address family mode (idempotent)
|
||||
- name: Configure redistribute information under address family mode (idempotent)
|
||||
ios_bgp: *af_rdr
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
- assert:
|
||||
that:
|
||||
- 'result.changed == false'
|
||||
|
||||
- name: Configure redistribute information under address family mode with operation replace
|
||||
- name: Get the IOS version
|
||||
ios_facts:
|
||||
gather_subset: all
|
||||
|
||||
- name: Configure redistribute information under address family mode with operation replace
|
||||
ios_bgp: &af_rdr_rplc
|
||||
operation: replace
|
||||
config:
|
||||
|
@ -340,7 +346,7 @@
|
|||
metric: 64
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
- assert:
|
||||
that:
|
||||
- 'result.changed == true'
|
||||
- "'router bgp 64496' in result.commands"
|
||||
|
@ -348,15 +354,17 @@
|
|||
- "'no redistribute eigrp 233' in result.commands"
|
||||
- "'exit-address-family' in result.commands"
|
||||
|
||||
- name: Configure redistribute information under address family mode with operation replace (idempotent)
|
||||
- name: Configure redistribute information under address family mode with operation replace (idempotent)
|
||||
ios_bgp: *af_rdr_rplc
|
||||
register: result
|
||||
when: ansible_net_version != "15.6(2)T"
|
||||
|
||||
- assert:
|
||||
- assert:
|
||||
that:
|
||||
- 'result.changed == false'
|
||||
when: ansible_net_version != "15.6(2)T"
|
||||
|
||||
- name: Override all the exisiting BGP config
|
||||
- name: Override all the exisiting BGP config
|
||||
ios_bgp:
|
||||
operation: override
|
||||
config:
|
||||
|
@ -365,7 +373,7 @@
|
|||
log_neighbor_changes: True
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
- assert:
|
||||
that:
|
||||
- 'result.changed == true'
|
||||
- "'no router bgp 64496' in result.commands"
|
||||
|
@ -373,21 +381,22 @@
|
|||
- "'bgp router-id 192.0.2.10' in result.commands"
|
||||
- "'bgp log-neighbor-changes' in result.commands"
|
||||
|
||||
- name: Teardown
|
||||
always:
|
||||
- name: Teardown
|
||||
ios_bgp: &rm
|
||||
operation: delete
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
- assert:
|
||||
that:
|
||||
- 'result.changed == true'
|
||||
- "'no router bgp 64497' in result.commands"
|
||||
|
||||
- name: Teardown again (idempotent)
|
||||
- name: Teardown again (idempotent)
|
||||
ios_bgp: *rm
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
- assert:
|
||||
that:
|
||||
- 'result.changed == false'
|
||||
|
||||
|
|
Loading…
Reference in a new issue