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:
Nathaniel Case 2018-05-30 13:03:20 -04:00 committed by GitHub
commit 82dfa542c2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
111 changed files with 1136 additions and 1136 deletions

View file

@ -221,10 +221,10 @@ EXAMPLES = """
- name: load an acl into the device
eos_config:
lines:
- 10 permit ip 1.1.1.1/32 any log
- 20 permit ip 2.2.2.2/32 any log
- 30 permit ip 3.3.3.3/32 any log
- 40 permit ip 4.4.4.4/32 any log
- 10 permit ip 192.0.2.1/32 any log
- 20 permit ip 192.0.2.2/32 any log
- 30 permit ip 192.0.2.3/32 any log
- 40 permit ip 192.0.2.4/32 any log
parents: ip access-list test
before: no ip access-list test
replace: block

View file

@ -241,11 +241,11 @@ EXAMPLES = """
- name: load new acl into device
ios_config:
lines:
- 10 permit ip host 1.1.1.1 any log
- 20 permit ip host 2.2.2.2 any log
- 30 permit ip host 3.3.3.3 any log
- 40 permit ip host 4.4.4.4 any log
- 50 permit ip host 5.5.5.5 any log
- 10 permit ip host 192.0.2.1 any log
- 20 permit ip host 192.0.2.2 any log
- 30 permit ip host 192.0.2.3 any log
- 40 permit ip host 192.0.2.4 any log
- 50 permit ip host 192.0.2.5 any log
parents: ip access-list extended test
before: no ip access-list extended test
match: exact
@ -279,12 +279,12 @@ updates:
description: The set of commands that will be pushed to the remote device
returned: always
type: list
sample: ['hostname foo', 'router ospf 1', 'router-id 1.1.1.1']
sample: ['hostname foo', 'router ospf 1', 'router-id 192.0.2.1']
commands:
description: The set of commands that will be pushed to the remote device
returned: always
type: list
sample: ['hostname foo', 'router ospf 1', 'router-id 1.1.1.1']
sample: ['hostname foo', 'router ospf 1', 'router-id 192.0.2.1']
backup_path:
description: The full path to the backup file
returned: when backup is yes

View file

@ -74,18 +74,18 @@ EXAMPLES = """
junos_l3_interface:
aggregate:
- name: ge-0/0/1
ipv4: 1.1.1.1
ipv4: 192.0.2.1
- name: ge-0/0/2
ipv4: 2.2.2.2
ipv4: 192.0.2.2
ipv6: fd5d:12c9:2201:2::2
- name: Delete ipv4 address using aggregate
junos_l3_interface:
aggregate:
- name: ge-0/0/1
ipv4: 1.1.1.1
ipv4: 192.0.2.1
- name: ge-0/0/2
ipv4: 2.2.2.2
ipv4: 192.0.2.2
state: absent
"""
@ -96,7 +96,7 @@ diff:
type: string
sample: >
[edit interfaces ge-0/0/1 unit 0 family inet]
+ address 1.1.1.1/32;
+ address 192.0.2.1/32;
[edit interfaces ge-0/0/1 unit 0 family inet6]
+ address fd5d:12c9:2201:1::1/128;
"""

View file

@ -94,7 +94,7 @@ EXAMPLES = """
interfaces:
- ge-0/0/3
- ge-0/0/2
rd: 1.1.1.1:10
rd: 192.0.2.1:10
target: target:65514:113
state: present
@ -105,7 +105,7 @@ EXAMPLES = """
interfaces:
- ge-0/0/3
- ge-0/0/2
rd: 1.1.1.1:10
rd: 192.0.2.1:10
target: target:65514:113
state: absent
@ -116,7 +116,7 @@ EXAMPLES = """
interfaces:
- ge-0/0/3
- ge-0/0/2
rd: 1.1.1.1:10
rd: 192.0.2.1:10
target: target:65514:113
active: False
@ -127,7 +127,7 @@ EXAMPLES = """
interfaces:
- ge-0/0/3
- ge-0/0/2
rd: 1.1.1.1:10
rd: 192.0.2.1:10
target: target:65514:113
active: True
@ -139,14 +139,14 @@ EXAMPLES = """
interfaces:
- ge-0/0/3
- ge-0/0/2
rd: 1.1.1.1:10
rd: 192.0.2.1:10
target: target:65514:113
- name: test-2
description: test-vrf-2
interfaces:
- ge-0/0/4
- ge-0/0/5
rd: 2.2.2.2:10
rd: 192.0.2.2:10
target: target:65515:114
state: present
"""
@ -163,7 +163,7 @@ diff.prepared:
+ instance-type vrf;
+ interface ge-0/0/2.0;
+ interface ge-0/0/3.0;
+ route-distinguisher 1.1.1.1:10;
+ route-distinguisher 192.0.2.1:10;
+ vrf-target target:65514:113;
+ }
"""

View file

@ -158,7 +158,7 @@ EXAMPLES = '''
seq: 10
action: permit
proto: tcp
src: 1.1.1.1/24
src: 192.0.2.1/24
dest: any
state: present
'''
@ -168,7 +168,7 @@ commands:
description: commands sent to the device
returned: always
type: list
sample: ["ip access-list ANSIBLE", "10 permit tcp 1.1.1.1/24 any"]
sample: ["ip access-list ANSIBLE", "10 permit tcp 192.0.2.1/24 any"]
'''
from ansible.module_utils.network.nxos.nxos import load_config, run_commands
from ansible.module_utils.network.nxos.nxos import nxos_argument_spec, check_args

View file

@ -220,7 +220,7 @@ EXAMPLES = '''
nxos_bgp:
asn: 65535
vrf: test
router_id: 1.1.1.1
router_id: 192.0.2.1
state: present
'''
@ -229,7 +229,7 @@ commands:
description: commands sent to the device
returned: always
type: list
sample: ["router bgp 65535", "vrf test", "router-id 1.1.1.1"]
sample: ["router bgp 65535", "vrf test", "router-id 192.0.2.1"]
'''
import re

View file

@ -151,7 +151,7 @@ EXAMPLES = '''
# create a new neighbor
- nxos_bgp_neighbor:
asn: 65535
neighbor: 3.3.3.3
neighbor: 192.0.2.3
local_as: 20
remote_as: 30
description: "just a description"
@ -164,7 +164,7 @@ commands:
description: commands sent to the device
returned: always
type: list
sample: ["router bgp 65535", "neighbor 3.3.3.3",
sample: ["router bgp 65535", "neighbor 192.0.2.3",
"remote-as 30", "update-source Ethernet1/3",
"description just a description", "local-as 20"]
'''

View file

@ -213,7 +213,7 @@ EXAMPLES = '''
- name: configure RR client
nxos_bgp_neighbor_af:
asn: 65535
neighbor: '3.3.3.3'
neighbor: '192.0.2.3'
afi: ipv4
safi: unicast
route_reflector_client: true
@ -225,7 +225,7 @@ commands:
description: commands sent to the device
returned: always
type: list
sample: ["router bgp 65535", "neighbor 3.3.3.3",
sample: ["router bgp 65535", "neighbor 192.0.2.3",
"address-family ipv4 unicast", "route-reflector-client"]
'''

View file

@ -226,21 +226,21 @@ EXAMPLES = """
- nxos_config:
lines:
- 10 permit ip 1.1.1.1/32 any log
- 20 permit ip 2.2.2.2/32 any log
- 30 permit ip 3.3.3.3/32 any log
- 40 permit ip 4.4.4.4/32 any log
- 50 permit ip 5.5.5.5/32 any log
- 10 permit ip 192.0.2.1/32 any log
- 20 permit ip 192.0.2.2/32 any log
- 30 permit ip 192.0.2.3/32 any log
- 40 permit ip 192.0.2.4/32 any log
- 50 permit ip 192.0.2.5/32 any log
parents: ip access-list test
before: no ip access-list test
match: exact
- nxos_config:
lines:
- 10 permit ip 1.1.1.1/32 any log
- 20 permit ip 2.2.2.2/32 any log
- 30 permit ip 3.3.3.3/32 any log
- 40 permit ip 4.4.4.4/32 any log
- 10 permit ip 192.0.2.1/32 any log
- 20 permit ip 192.0.2.2/32 any log
- 30 permit ip 192.0.2.3/32 any log
- 40 permit ip 192.0.2.4/32 any log
parents: ip access-list test
before: no ip access-list test
replace: block

View file

@ -73,30 +73,30 @@ proposed:
description: k/v pairs of parameters passed into module
returned: always
type: dict
sample: {"address": "2.2.2.2", "key_id": "48",
sample: {"address": "192.0.2.2", "key_id": "48",
"peer_type": "server", "prefer": "enabled",
"source": "3.3.3.3", "source_type": "source"}
"source": "192.0.2.3", "source_type": "source"}
existing:
description:
- k/v pairs of existing ntp server/peer
returned: always
type: dict
sample: {"address": "2.2.2.2", "key_id": "32",
sample: {"address": "192.0.2.2", "key_id": "32",
"peer_type": "server", "prefer": "enabled",
"source": "ethernet2/1", "source_type": "source-interface"}
end_state:
description: k/v pairs of ntp info after module execution
returned: always
type: dict
sample: {"address": "2.2.2.2", "key_id": "48",
sample: {"address": "192.0.2.2", "key_id": "48",
"peer_type": "server", "prefer": "enabled",
"source": "3.3.3.3", "source_type": "source"}
"source": "192.0.2.3", "source_type": "source"}
updates:
description: command sent to the device
returned: always
type: list
sample: ["ntp server 2.2.2.2 prefer key 48",
"no ntp source-interface ethernet2/1", "ntp source 3.3.3.3"]
sample: ["ntp server 192.0.2.2 prefer key 48",
"no ntp source-interface ethernet2/1", "ntp source 192.0.2.3"]
changed:
description: check to see if a change was made on the device
returned: always

View file

@ -74,7 +74,7 @@ commands:
description: commands sent to the device
returned: always
type: list
sample: ["router bgp 65535", "vrf test", "router-id 1.1.1.1"]
sample: ["router bgp 65535", "vrf test", "router-id 192.0.2.1"]
'''

View file

@ -88,7 +88,7 @@ options:
EXAMPLES = '''
# ensure snmp host is configured
- nxos_snmp_host:
snmp_host: 3.3.3.3
snmp_host: 192.0.2.3
community: TESTING
state: present
'''
@ -98,7 +98,7 @@ commands:
description: commands sent to the device
returned: always
type: list
sample: ["snmp-server host 3.3.3.3 filter-vrf another_test_vrf"]
sample: ["snmp-server host 192.0.2.3 filter-vrf another_test_vrf"]
'''

View file

@ -74,7 +74,7 @@ options:
EXAMPLES = '''
- nxos_static_route:
prefix: "192.168.20.64/24"
next_hop: "3.3.3.3"
next_hop: "192.0.2.3"
route_name: testing
pref: 100
'''
@ -84,7 +84,7 @@ commands:
description: commands sent to the device
returned: always
type: list
sample: ["ip route 192.168.20.0/24 3.3.3.3 name testing 100"]
sample: ["ip route 192.168.20.0/24 192.0.2.3 name testing 100"]
'''
import re
from copy import deepcopy

View file

@ -65,7 +65,7 @@ EXAMPLES = """
- name: configure host logging
net_logging:
dest: host
name: 1.1.1.1
name: 192.0.2.1
facility: kernel
level: critical