mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 05:12:45 +00:00
nxos_bgp_af correct parents (#26996)
* move config location * client-to-client is inverse of BOOL_PARAMS
This commit is contained in:
11
test/units/modules/network/nxos/fixtures/nxos_bgp/config.cfg
Normal file
11
test/units/modules/network/nxos/fixtures/nxos_bgp/config.cfg
Normal file
@@ -0,0 +1,11 @@
|
||||
feature bgp
|
||||
|
||||
router bgp 65535
|
||||
router-id 192.168.1.1
|
||||
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
|
||||
@@ -42,7 +42,7 @@ class TestNxosBgpAfModule(TestNxosModule):
|
||||
self.mock_get_config.stop()
|
||||
|
||||
def load_fixtures(self, commands=None, device=''):
|
||||
self.get_config.return_value = load_fixture('', 'nxos_bgp_config.cfg')
|
||||
self.get_config.return_value = load_fixture('nxos_bgp', 'config.cfg')
|
||||
self.load_config.return_value = None
|
||||
|
||||
def test_nxos_bgp_af(self):
|
||||
@@ -89,3 +89,12 @@ class TestNxosBgpAfModule(TestNxosModule):
|
||||
dampening_reuse_time=1900, dampening_max_suppress_time=10))
|
||||
result = self.execute_module(failed=True)
|
||||
self.assertEqual(result['msg'], 'dampening_routemap cannot be used with the dampening_half_time param')
|
||||
|
||||
def test_nxos_bgp_af_client(self):
|
||||
set_module_args(dict(asn=65535, afi='ipv4', safi='unicast',
|
||||
client_to_client=False))
|
||||
self.execute_module(
|
||||
changed=True,
|
||||
commands=['router bgp 65535', 'address-family ipv4 unicast',
|
||||
'no client-to-client reflection']
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user