mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
Assorted nxos_bgp_* fixes (#25080)
* Simplify apply_key_map * Fix nxapi * Clean up get_value * Fix missing non-values * Add test for existing bgp_af case * Fix small issues with bgp_neighbor_af
This commit is contained in:
@@ -5,4 +5,7 @@ router bgp 65535
|
||||
event-history cli size medium
|
||||
event-history detail
|
||||
vrf test2
|
||||
address-family ipv4 unicast
|
||||
timers bgp 1 10
|
||||
neighbor 3.3.3.5
|
||||
address-family ipv4 unicast
|
||||
|
||||
@@ -48,17 +48,21 @@ class TestNxosBgpAfModule(TestNxosModule):
|
||||
def test_nxos_bgp_af(self):
|
||||
set_module_args(dict(asn=65535, afi='ipv4', safi='unicast'))
|
||||
self.execute_module(
|
||||
changed=True,
|
||||
changed=True, sort=False,
|
||||
commands=['router bgp 65535', 'address-family ipv4 unicast']
|
||||
)
|
||||
|
||||
def test_nxos_bgp_af_vrf(self):
|
||||
set_module_args(dict(asn=65535, vrf='test', afi='ipv4', safi='unicast'))
|
||||
self.execute_module(
|
||||
changed=True,
|
||||
changed=True, sort=False,
|
||||
commands=['router bgp 65535', 'vrf test', 'address-family ipv4 unicast']
|
||||
)
|
||||
|
||||
def test_nxos_bgp_af_vrf_exists(self):
|
||||
set_module_args(dict(asn=65535, vrf='test2', afi='ipv4', safi='unicast'))
|
||||
self.execute_module(changed=False, commands=[])
|
||||
|
||||
def test_nxos_bgp_af_dampening_routemap(self):
|
||||
set_module_args(dict(asn=65535, afi='ipv4', safi='unicast',
|
||||
dampening_routemap='route-map-a'))
|
||||
|
||||
@@ -53,3 +53,14 @@ class TestNxosBgpNeighborAfModule(TestNxosModule):
|
||||
'router bgp 65535', 'neighbor 3.3.3.3', 'address-family ipv4 unicast',
|
||||
'route-reflector-client'
|
||||
])
|
||||
|
||||
def test_nxos_bgp_neighbor_af_exists(self):
|
||||
set_module_args(dict(asn=65535, neighbor='3.3.3.5', afi='ipv4', safi='unicast'))
|
||||
self.execute_module(changed=False, commands=[])
|
||||
|
||||
def test_nxos_bgp_neighbor_af_absent(self):
|
||||
set_module_args(dict(asn=65535, neighbor='3.3.3.5', afi='ipv4', safi='unicast', state='absent'))
|
||||
self.execute_module(
|
||||
changed=True, sort=False,
|
||||
commands=['router bgp 65535', 'neighbor 3.3.3.5', 'no address-family ipv4 unicast']
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user