Skip to content

Commit

Permalink
Merge pull request #221 from networktocode/clean
Browse files Browse the repository at this point in the history
Cleanup
  • Loading branch information
itdependsnetworks authored Jul 5, 2018
2 parents 1150e13 + 466d054 commit bba2891
Show file tree
Hide file tree
Showing 12 changed files with 78 additions and 81 deletions.
4 changes: 2 additions & 2 deletions templates/cisco_nxos_show_ip_ospf_neighbor_vrf.template
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
Value Filldown OSPF_PID (\d+)
Value Filldown VRF (\S+)
Value NEIGHBOR_IPADDR (\d+\.\d+\.\d+\.\d+)
Value STATE (\S+.\/.\S+)
Value STATE (\S+.\/.\S+)
Value UPTIME (\S+)
Value LOCAL_IPADDR (\d+\.\d+\.\d+\.\d+)
Value Required INTERFACE (\S+)

Start
^\s+\w+\s+\w+\s+\w+\s+${OSPF_PID}\s+[Vv][Rr][Ff]\s+${VRF} -> Record
^\s+${NEIGHBOR_IPADDR}\s+\d+\s+${STATE}\s+${UPTIME}\s+${LOCAL_IPADDR}\s+${INTERFACE}.+ -> Record
^\s+${NEIGHBOR_IPADDR}\s+\d+\s+${STATE}\s+${UPTIME}\s+${LOCAL_IPADDR}\s+${INTERFACE} -> Record
Original file line number Diff line number Diff line change
Expand Up @@ -6,30 +6,30 @@ parsed_sample:
deployed: 'Y'
trunkid: '5'
primaryinterface: '2/3/1'
portlist: 'e 2/3/1 to 2/3/2 '
portlist: 'e 2/3/1 to 2/3/2'
portlistcont: ''

- lagnameshort: '1G-Lag '
lagtype: 'dynamic'
deployed: 'Y'
trunkid: '3'
primaryinterface: '1/1/24'
portlist: 'e 1/1/24 '
portlist: 'e 1/1/24'
portlistcont: ''

- lagnameshort: '1G-Lag-2 '
lagtype: 'dynamic'
deployed: 'Y'
trunkid: '4'
primaryinterface: '2/1/1'
portlist: 'e 2/1/1 '
portlist: 'e 2/1/1'
portlistcont: ''

- lagnameshort: 'SW2.XR-SW1A.TE'
lagtype: 'dynamic'
deployed: 'Y'
trunkid: '1'
primaryinterface: '1/3/1'
portlist: 'e 1/3/1 to 1/3/2 '
portlist: 'e 1/3/1 to 1/3/2'
portlistcont: ''

Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ LACP Long timeout: 90, default: 90
LACP Short timeout: 3, default: 3

LAG Type Deploy Trunk Primary Port List
10G-Lag2 dynamic Y 5 2/3/1 e 2/3/1 to 2/3/2
1G-Lag dynamic Y 3 1/1/24 e 1/1/24
1G-Lag-2 dynamic Y 4 2/1/1 e 2/1/1
SW2.XR-SW1A.TEdynamic Y 1 1/3/1 e 1/3/1 to 1/3/2
10G-Lag2 dynamic Y 5 2/3/1 e 2/3/1 to 2/3/2
1G-Lag dynamic Y 3 1/1/24 e 1/1/24
1G-Lag-2 dynamic Y 4 2/1/1 e 2/1/1
SW2.XR-SW1A.TEdynamic Y 1 1/3/1 e 1/3/1 to 1/3/2
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
parsed_sample:

- monitoredport: '10'
inputmirror: '18 '
outputmirror: '18 '
inputmirror: '18'
outputmirror: '18'

- monitoredport: '16'
inputmirror: '18 '
outputmirror: '18 '
inputmirror: '18'
outputmirror: '18'

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Monitored Port 10
Input mirrored by : 18
Output mirrored by : 18
Input mirrored by : 18
Output mirrored by : 18
Monitored Port 16
Input mirrored by : 18
Output mirrored by : 18
Input mirrored by : 18
Output mirrored by : 18
Original file line number Diff line number Diff line change
Expand Up @@ -6,87 +6,87 @@ parsed_sample:
deployed: 'Y'
trunkid: '11'
primaryinterface: '1/13'
portlist: 'e 1/13 e 2/13 '
portlist: 'e 1/13 e 2/13'
portlistcont: ''

- lagnameshort: 'CLMAMOFW-FLTNHT '
lagtype: 'dynamic'
deployed: 'Y'
trunkid: '7'
primaryinterface: '4/2'
portlist: 'e 3/2 e 4/2 '
portlist: 'e 3/2 e 4/2'
portlistcont: ''

- lagnameshort: 'LAG5 '
lagtype: 'dynamic'
deployed: 'Y'
trunkid: '5'
primaryinterface: '3/3'
portlist: 'e 3/3 to 3/4 '
portlist: 'e 3/3 to 3/4'
portlistcont: ''

- lagnameshort: 'LAG6 '
lagtype: 'dynamic'
deployed: 'Y'
trunkid: '6'
primaryinterface: '4/3'
portlist: 'e 4/3 to 4/4 '
portlist: 'e 4/3 to 4/4'
portlistcont: ''

- lagnameshort: 'MLX-1a '
lagtype: 'dynamic'
deployed: 'Y'
trunkid: '4'
primaryinterface: '2/2'
portlist: 'e 2/2 '
portlist: 'e 2/2'
portlistcont: ''

- lagnameshort: 'MLX-CLMAMOXE '
lagtype: 'dynamic'
deployed: 'Y'
trunkid: '3'
primaryinterface: '2/1'
portlist: 'e 2/1 '
portlist: 'e 2/1'
portlistcont: ''

- lagnameshort: 'Switch1e.clmamofw '
lagtype: 'dynamic'
deployed: 'Y'
trunkid: '10'
primaryinterface: '1/5'
portlist: 'e 1/5 e 2/21 '
portlist: 'e 1/5 e 2/21'
portlistcont: ''

- lagnameshort: 'fw1-inside '
lagtype: 'dynamic'
deployed: 'Y'
trunkid: '12'
primaryinterface: '1/24'
portlist: 'e 1/24 e 2/24 '
portlist: 'e 1/24 e 2/24'
portlistcont: ''

- lagnameshort: 'fw1-outside '
lagtype: 'dynamic'
deployed: 'Y'
trunkid: '13'
primaryinterface: '1/10'
portlist: 'e 1/10 e 2/10 '
portlist: 'e 1/10 e 2/10'
portlistcont: ''

- lagnameshort: 'speedtest '
lagtype: 'dynamic'
deployed: 'Y'
trunkid: '9'
primaryinterface: '2/23'
portlist: 'e 1/11 e 2/23 '
portlist: 'e 1/11 e 2/23'
portlistcont: ''

- lagnameshort: 'switch1c-MLX-FW '
lagtype: 'dynamic'
deployed: 'Y'
trunkid: '2'
primaryinterface: '1/1'
portlist: 'e 1/1 '
portlist: 'e 1/1'
portlistcont: ''

- lagnameshort: 'videouplink '
Expand All @@ -95,5 +95,4 @@ parsed_sample:
trunkid: '8'
primaryinterface: '2/15'
portlist: 'e 1/15 to 1/18 e 2/15 t'
portlistcont: 'o 2/18 '

portlistcont: 'o 2/18'
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ LACP Long timeout :90, default: 90
LACP Short timeout :3, default: 3

LAG Type Deploy Trunk Primary Port List
Akamai Uplink dynamic Y 11 1/13 e 1/13 e 2/13
CLMAMOFW-FLTNHT dynamic Y 7 4/2 e 3/2 e 4/2
LAG5 dynamic Y 5 3/3 e 3/3 to 3/4
LAG6 dynamic Y 6 4/3 e 4/3 to 4/4
MLX-1a dynamic Y 4 2/2 e 2/2
MLX-CLMAMOXE dynamic Y 3 2/1 e 2/1
Switch1e.clmamofw dynamic Y 10 1/5 e 1/5 e 2/21
fw1-inside dynamic Y 12 1/24 e 1/24 e 2/24
fw1-outside dynamic Y 13 1/10 e 1/10 e 2/10
speedtest dynamic Y 9 2/23 e 1/11 e 2/23
switch1c-MLX-FW dynamic Y 2 1/1 e 1/1
Akamai Uplink dynamic Y 11 1/13 e 1/13 e 2/13
CLMAMOFW-FLTNHT dynamic Y 7 4/2 e 3/2 e 4/2
LAG5 dynamic Y 5 3/3 e 3/3 to 3/4
LAG6 dynamic Y 6 4/3 e 4/3 to 4/4
MLX-1a dynamic Y 4 2/2 e 2/2
MLX-CLMAMOXE dynamic Y 3 2/1 e 2/1
Switch1e.clmamofw dynamic Y 10 1/5 e 1/5 e 2/21
fw1-inside dynamic Y 12 1/24 e 1/24 e 2/24
fw1-outside dynamic Y 13 1/10 e 1/10 e 2/10
speedtest dynamic Y 9 2/23 e 1/11 e 2/23
switch1c-MLX-FW dynamic Y 2 1/1 e 1/1
videouplink static Y 8 2/15 e 1/15 to 1/18 e 2/15 t
o 2/18
o 2/18
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,17 @@
parsed_sample:

- monitoredport: '1/10'
inputmirror: '1/13 '
outputmirror: '1/13 '
inputmirror: '1/13'
outputmirror: '1/13'

- monitoredport: '1/11'
inputmirror: '1/13 '
outputmirror: '1/13 '
inputmirror: '1/13'
outputmirror: '1/13'

- monitoredport: '2/10'
inputmirror: '1/13 '
outputmirror: '1/13 '
inputmirror: '1/13'
outputmirror: '1/13'

- monitoredport: '2/11'
inputmirror: '1/13 '
outputmirror: '1/13 '

inputmirror: '1/13'
outputmirror: '1/13'
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
Monitored Port 1/10
Input traffic mirrored to: 1/13
Output traffic mirrored to: 1/13
Input traffic mirrored to: 1/13
Output traffic mirrored to: 1/13
Monitored Port 1/11
Input traffic mirrored to: 1/13
Output traffic mirrored to: 1/13
Input traffic mirrored to: 1/13
Output traffic mirrored to: 1/13
Monitored Port 2/10
Input traffic mirrored to: 1/13
Output traffic mirrored to: 1/13
Input traffic mirrored to: 1/13
Output traffic mirrored to: 1/13
Monitored Port 2/11
Input traffic mirrored to: 1/13
Output traffic mirrored to: 1/13
Input traffic mirrored to: 1/13
Output traffic mirrored to: 1/13
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,17 @@
parsed_sample:

- monitoredport: '1/10'
inputmirror: '1/13 '
outputmirror: '1/13 '
inputmirror: '1/13'
outputmirror: '1/13'

- monitoredport: '1/11'
inputmirror: '1/13 '
outputmirror: '1/13 '
inputmirror: '1/13'
outputmirror: '1/13'

- monitoredport: '2/10'
inputmirror: '1/13 '
outputmirror: '1/13 '
inputmirror: '1/13'
outputmirror: '1/13'

- monitoredport: '2/11'
inputmirror: '1/13 '
outputmirror: '1/13 '

inputmirror: '1/13'
outputmirror: '1/13'
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
Monitored Port 1/10
Input traffic mirrored to: 1/13
Output traffic mirrored to: 1/13
Input traffic mirrored to: 1/13
Output traffic mirrored to: 1/13
Monitored Port 1/11
Input traffic mirrored to: 1/13
Output traffic mirrored to: 1/13
Input traffic mirrored to: 1/13
Output traffic mirrored to: 1/13
Monitored Port 2/10
Input traffic mirrored to: 1/13
Output traffic mirrored to: 1/13
Input traffic mirrored to: 1/13
Output traffic mirrored to: 1/13
Monitored Port 2/11
Input traffic mirrored to: 1/13
Output traffic mirrored to: 1/13
Input traffic mirrored to: 1/13
Output traffic mirrored to: 1/13
8 changes: 4 additions & 4 deletions tests/test_index_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def check_order(current_os, prior_os,cmd_len, prior_len, os_choices, used_os, cm
return False, msg

if not prior_os and prior_len == 0:
# Starting Point
# Starting Point
return True , ''
elif current_os == prior_os and cmd_len == prior_len and cmd == min(prior_cmd, cmd):
msg = "OS is the same and command same length, please set {} before {} to be in alphabetical order".format(cmd, prior_cmd)
Expand Down Expand Up @@ -65,9 +65,9 @@ def test_index_ordering():
'brocade_fastiron', 'brocade_netiron', 'brocade_nos', 'brocade_vdx', 'brocade_vyos',
'checkpoint_gaia', 'cisco_asa', 'cisco_ios', 'cisco_nxos', 'cisco_s300', 'cisco_wlc',
'cisco_xe', 'cisco_xr', 'dell_force10', 'enterasys', 'extreme', 'f5_ltm', 'fortinet',
'hp_comware', 'hp_procurve', 'huawei', 'juniper', 'juniper_junos', 'linux', 'ovs_linux',
'paloalto_panos', 'quanta_mesh', 'vmware_nsxv', 'vyatta_vyos', 'vyos'
]
'hp_comware', 'hp_procurve', 'huawei', 'juniper', 'juniper_junos', 'alcatel_sros',
'linux', 'ovs_linux', 'paloalto_panos', 'quanta_mesh', 'vmware_nsxv', 'vyatta_vyos', 'vyos'
]

prior_os = ""
prior_len = 0
Expand Down

0 comments on commit bba2891

Please sign in to comment.