mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-03 06:49:10 -07:00
Replace bogus (but routeable) ip addresses with RFC 5737 example addresses (#40554)
* Remove 1.1.1.1 from *_config tests * remove from *_smoke and *_system * Miscellaneous other tests * Remove from module documentation as well * Remove from unit tests as well * Remove accidental duplication from rebase
This commit is contained in:
parent
91eb4a034e
commit
82dfa542c2
111 changed files with 1136 additions and 1136 deletions
|
@ -1,6 +1,6 @@
|
|||
IP Interface Status for VRF "default"(1)
|
||||
Ethernet2/4, Interface status: protocol-up/link-up/admin-up, iod: 39,
|
||||
IP address: 1.1.1.1, IP subnet: 1.1.1.0/8 route-preference: 0, tag: 0
|
||||
IP address: 192.0.2.1, IP subnet: 1.1.1.0/8 route-preference: 0, tag: 0
|
||||
IP broadcast address: 255.255.255.255
|
||||
IP multicast groups locally joined: none
|
||||
IP MTU: 1500 bytes (using link MTU)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
ip access-list ANSIBLE_OUT
|
||||
10 permit tcp 1.1.1.1/24 any
|
||||
10 permit tcp 192.0.2.1/24 any
|
||||
interface Ethernet1/41
|
||||
ip access-group copp-system-p-acl-bgp out
|
||||
|
|
|
@ -64,9 +64,9 @@ class TestNxosAclModule(TestNxosModule):
|
|||
|
||||
def test_nxos_acl(self):
|
||||
set_module_args(dict(name='ANSIBLE', seq=10, action='permit',
|
||||
proto='tcp', src='1.1.1.1/24', dest='any'))
|
||||
proto='tcp', src='192.0.2.1/24', dest='any'))
|
||||
result = self.execute_module(changed=True)
|
||||
self.assertEqual(result['commands'], ['ip access-list ANSIBLE', '10 permit tcp 1.1.1.1/24 any'])
|
||||
self.assertEqual(result['commands'], ['ip access-list ANSIBLE', '10 permit tcp 192.0.2.1/24 any'])
|
||||
|
||||
def test_nxos_acl_remove(self):
|
||||
set_module_args(dict(name='copp-system-p-acl-bgp', seq=10, state='absent'))
|
||||
|
|
|
@ -47,9 +47,9 @@ class TestNxosBgpModule(TestNxosModule):
|
|||
self.load_config.return_value = []
|
||||
|
||||
def test_nxos_bgp(self):
|
||||
set_module_args(dict(asn=65535, router_id='1.1.1.1'))
|
||||
set_module_args(dict(asn=65535, router_id='192.0.2.1'))
|
||||
result = self.execute_module(changed=True)
|
||||
self.assertEqual(result['commands'], ['router bgp 65535', 'router-id 1.1.1.1'])
|
||||
self.assertEqual(result['commands'], ['router bgp 65535', 'router-id 192.0.2.1'])
|
||||
|
||||
def test_nxos_bgp_change_nothing(self):
|
||||
set_module_args(dict(asn=65535, router_id='192.168.1.1'))
|
||||
|
@ -77,8 +77,8 @@ class TestNxosBgpModule(TestNxosModule):
|
|||
self.execute_module(changed=False)
|
||||
|
||||
def test_nxos_bgp_vrf(self):
|
||||
set_module_args(dict(asn=65535, vrf='test', router_id='1.1.1.1'))
|
||||
result = self.execute_module(changed=True, commands=['router bgp 65535', 'vrf test', 'router-id 1.1.1.1'])
|
||||
set_module_args(dict(asn=65535, vrf='test', router_id='192.0.2.1'))
|
||||
result = self.execute_module(changed=True, commands=['router bgp 65535', 'vrf test', 'router-id 192.0.2.1'])
|
||||
self.assertEqual(result['warnings'], ["VRF test doesn't exist."])
|
||||
|
||||
def test_nxos_bgp_global_param(self):
|
||||
|
|
|
@ -47,8 +47,8 @@ class TestNxosBgpNeighborModule(TestNxosModule):
|
|||
self.load_config.return_value = []
|
||||
|
||||
def test_nxos_bgp_neighbor(self):
|
||||
set_module_args(dict(asn=65535, neighbor='3.3.3.3', description='some words'))
|
||||
self.execute_module(changed=True, commands=['router bgp 65535', 'neighbor 3.3.3.3', 'description some words'])
|
||||
set_module_args(dict(asn=65535, neighbor='192.0.2.3', description='some words'))
|
||||
self.execute_module(changed=True, commands=['router bgp 65535', 'neighbor 192.0.2.3', 'description some words'])
|
||||
|
||||
def test_nxos_bgp_neighbor_remove_private_as(self):
|
||||
set_module_args(dict(asn=65535, neighbor='3.3.3.4', remove_private_as='all'))
|
||||
|
|
|
@ -47,11 +47,11 @@ class TestNxosBgpNeighborAfModule(TestNxosModule):
|
|||
self.load_config.return_value = []
|
||||
|
||||
def test_nxos_bgp_neighbor_af(self):
|
||||
set_module_args(dict(asn=65535, neighbor='3.3.3.3', afi='ipv4',
|
||||
set_module_args(dict(asn=65535, neighbor='192.0.2.3', afi='ipv4',
|
||||
safi='unicast', route_reflector_client=True))
|
||||
result = self.execute_module(changed=True)
|
||||
self.assertEqual(result['commands'], [
|
||||
'router bgp 65535', 'neighbor 3.3.3.3', 'address-family ipv4 unicast',
|
||||
'router bgp 65535', 'neighbor 192.0.2.3', 'address-family ipv4 unicast',
|
||||
'route-reflector-client'
|
||||
])
|
||||
|
||||
|
|
|
@ -63,17 +63,17 @@ class TestNxosIPInterfaceModule(TestNxosModule):
|
|||
result = self.execute_module(changed=True)
|
||||
self.assertEqual(result['commands'],
|
||||
['interface eth2/1',
|
||||
'no ip address 1.1.1.1/8',
|
||||
'no ip address 192.0.2.1/8',
|
||||
'ip address 1.1.1.2/8'])
|
||||
|
||||
def test_nxos_ip_interface_ip_idempotent(self):
|
||||
set_module_args(dict(interface='eth2/1', addr='1.1.1.1', mask=8))
|
||||
set_module_args(dict(interface='eth2/1', addr='192.0.2.1', mask=8))
|
||||
result = self.execute_module(changed=False)
|
||||
self.assertEqual(result['commands'], [])
|
||||
|
||||
def test_nxos_ip_interface_ip_absent(self):
|
||||
set_module_args(dict(interface='eth2/1', state='absent',
|
||||
addr='1.1.1.1', mask=8))
|
||||
addr='192.0.2.1', mask=8))
|
||||
result = self.execute_module(changed=True)
|
||||
self.assertEqual(result['commands'],
|
||||
['interface eth2/1', 'no ip address 1.1.1.1/8'])
|
||||
['interface eth2/1', 'no ip address 192.0.2.1/8'])
|
||||
|
|
|
@ -47,17 +47,17 @@ class TestNxosStaticRouteModule(TestNxosModule):
|
|||
self.load_config.return_value = None
|
||||
|
||||
def test_nxos_static_route_present(self):
|
||||
set_module_args(dict(prefix='192.168.20.64/24', next_hop='3.3.3.3'))
|
||||
self.execute_module(changed=True, commands=['ip route 192.168.20.0/24 3.3.3.3'])
|
||||
set_module_args(dict(prefix='192.168.20.64/24', next_hop='192.0.2.3'))
|
||||
self.execute_module(changed=True, commands=['ip route 192.168.20.0/24 192.0.2.3'])
|
||||
|
||||
def test_nxos_static_route_present_no_defaults(self):
|
||||
set_module_args(dict(prefix='192.168.20.64/24', next_hop='3.3.3.3',
|
||||
set_module_args(dict(prefix='192.168.20.64/24', next_hop='192.0.2.3',
|
||||
route_name='testing', pref=100))
|
||||
self.execute_module(changed=True, commands=['ip route 192.168.20.0/24 3.3.3.3 name testing 100'])
|
||||
self.execute_module(changed=True, commands=['ip route 192.168.20.0/24 192.0.2.3 name testing 100'])
|
||||
|
||||
def test_nxos_static_route_present_vrf(self):
|
||||
set_module_args(dict(prefix='192.168.20.64/24', next_hop='3.3.3.3', vrf='test'))
|
||||
self.execute_module(changed=True, sort=False, commands=['vrf context test', 'ip route 192.168.20.0/24 3.3.3.3'])
|
||||
set_module_args(dict(prefix='192.168.20.64/24', next_hop='192.0.2.3', vrf='test'))
|
||||
self.execute_module(changed=True, sort=False, commands=['vrf context test', 'ip route 192.168.20.0/24 192.0.2.3'])
|
||||
|
||||
def test_nxos_static_route_no_change(self):
|
||||
set_module_args(dict(prefix='10.10.30.64/24', next_hop='1.2.4.8'))
|
||||
|
@ -68,7 +68,7 @@ class TestNxosStaticRouteModule(TestNxosModule):
|
|||
self.execute_module(changed=True, commands=['no ip route 10.10.30.0/24 1.2.4.8'])
|
||||
|
||||
def test_nxos_static_route_absent_no_change(self):
|
||||
set_module_args(dict(prefix='192.168.20.6/24', next_hop='3.3.3.3', state='absent'))
|
||||
set_module_args(dict(prefix='192.168.20.6/24', next_hop='192.0.2.3', state='absent'))
|
||||
self.execute_module(changed=False, commands=[])
|
||||
|
||||
def test_nxos_static_route_absent_vrf(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue