Skip to content

Commit

Permalink
parsing-tests: add arista line to all files (#6084)
Browse files Browse the repository at this point in the history
And fix a few minor parsing gaps.
  • Loading branch information
dhalperi committed Aug 11, 2020
1 parent a5d9d5c commit 4231c78
Show file tree
Hide file tree
Showing 19 changed files with 142 additions and 132 deletions.
Expand Up @@ -8656,6 +8656,11 @@ ROLE
'role'
;

ROOT
:
'root'
;

ROTARY
:
'rotary'
Expand Down
Expand Up @@ -2697,6 +2697,12 @@ s_name
NAME variable variable null_rest_of_line
;

s_no
:
NO
no_aaa
;

s_no_access_list_extended
:
NO ACCESS_LIST ACL_NUM_EXTENDED NEWLINE
Expand Down Expand Up @@ -3540,6 +3546,7 @@ stanza
| s_netdestination
| s_netdestination6
| s_netservice
| s_no
| s_no_access_list_extended
| s_no_access_list_standard
| s_no_bfd
Expand Down
Expand Up @@ -1096,7 +1096,7 @@ null_aaa_substanza

s_aaa
:
NO? AAA
AAA
(
aaa_accounting
| aaa_authentication
Expand All @@ -1117,3 +1117,13 @@ s_aaa
)
;

no_aaa
:
AAA
no_aaa_root
;

no_aaa_root
:
ROOT NEWLINE
;
Expand Up @@ -332,6 +332,7 @@ ifipdhcp_relay_eos
RELAY
(
ifipdhcpr_all_subnets_eos
| ifipdhcpr_client_eos
| ifipdhcpr_information_eos
)
;
Expand All @@ -341,6 +342,11 @@ ifipdhcpr_all_subnets_eos
ALL_SUBNETS NEWLINE
;

ifipdhcpr_client_eos
:
CLIENT NEWLINE
;

ifipdhcpr_information_eos
:
INFORMATION OPTION CIRCUIT_ID id = word NEWLINE
Expand Down
Expand Up @@ -3796,7 +3796,6 @@ public void enterRs_vrf(Rs_vrfContext ctx) {

@Override
public void enterS_aaa(S_aaaContext ctx) {
_no = ctx.NO() != null;
if (_configuration.getCf().getAaa() == null) {
_configuration.getCf().setAaa(new Aaa());
}
Expand Down Expand Up @@ -7230,11 +7229,6 @@ public void exitRs_vrf(Rs_vrfContext ctx) {
_currentVrf = Configuration.DEFAULT_VRF_NAME;
}

@Override
public void exitS_aaa(S_aaaContext ctx) {
_no = false;
}

@Override
public void exitS_domain_name(S_domain_nameContext ctx) {
String domainName = ctx.hostname.getText();
Expand Down
1 change: 1 addition & 0 deletions tests/parsing-tests/networks/unit-tests/configs/arista_acl
@@ -1,3 +1,4 @@
!RANCID-CONTENT-TYPE: arista
!
hostname arista_acl
!
Expand Down
1 change: 1 addition & 0 deletions tests/parsing-tests/networks/unit-tests/configs/arista_bgp
@@ -1,3 +1,4 @@
!RANCID-CONTENT-TYPE: arista
!
hostname arista_bgp
!
Expand Down
@@ -1,3 +1,4 @@
!RANCID-CONTENT-TYPE: arista
!
hostname arista_bgp_asn
!
Expand Down
@@ -1,3 +1,4 @@
!RANCID-CONTENT-TYPE: arista
!
hostname arista_dhcp_relay
!
Expand Down
@@ -1,3 +1,4 @@
!RANCID-CONTENT-TYPE: arista
!
hostname arista_ip_route
!
Expand Down
2 changes: 2 additions & 0 deletions tests/parsing-tests/networks/unit-tests/configs/arista_nat
@@ -1,3 +1,5 @@
!RANCID-CONTENT-TYPE: arista
!
boot system flash this-is-an-arista-device.swi
!
hostname arista_nat
Expand Down
@@ -1,3 +1,4 @@
!RANCID-CONTENT-TYPE: arista
!
hostname arista_queue_monitor
!
Expand Down
@@ -1,3 +1,4 @@
!RANCID-CONTENT-TYPE: arista
!
hostname arista_username
!
Expand Down
1 change: 1 addition & 0 deletions tests/parsing-tests/networks/unit-tests/configs/arista_vrf
@@ -1,3 +1,4 @@
!RANCID-CONTENT-TYPE: arista
!
hostname arista_vrf
!
Expand Down
4 changes: 2 additions & 2 deletions tests/parsing-tests/unit-tests-undefined.ref
Expand Up @@ -50,7 +50,7 @@
"Lines" : {
"filename" : "configs/arista_bgp",
"lines" : [
11
12
]
}
},
Expand All @@ -62,7 +62,7 @@
"Lines" : {
"filename" : "configs/arista_bgp",
"lines" : [
13
14
]
}
},
Expand Down
8 changes: 4 additions & 4 deletions tests/parsing-tests/unit-tests-unused.ref
Expand Up @@ -34,10 +34,10 @@
"Source_Lines" : {
"filename" : "configs/arista_acl",
"lines" : [
4,
5,
6,
7
7,
8
]
}
},
Expand All @@ -47,7 +47,7 @@
"Source_Lines" : {
"filename" : "configs/arista_nat",
"lines" : [
9
11
]
}
},
Expand All @@ -57,7 +57,7 @@
"Source_Lines" : {
"filename" : "configs/arista_nat",
"lines" : [
10
12
]
}
},
Expand Down
78 changes: 28 additions & 50 deletions tests/parsing-tests/unit-tests-vimodel.ref
Expand Up @@ -13997,11 +13997,11 @@
}
},
"arista_acl" : {
"configurationFormat" : "CISCO_IOS",
"configurationFormat" : "ARISTA",
"name" : "arista_acl",
"defaultCrossZoneAction" : "PERMIT",
"defaultInboundAction" : "PERMIT",
"deviceModel" : "CISCO_UNSPECIFIED",
"deviceModel" : "ARISTA_UNSPECIFIED",
"deviceType" : "SWITCH",
"ipAccessLists" : {
"abcd" : {
Expand Down Expand Up @@ -14128,10 +14128,7 @@
},
"vendorFamily" : {
"cisco" : {
"hostname" : "arista_acl",
"logging" : {
"on" : true
}
"hostname" : "arista_acl"
}
},
"vrfs" : {
Expand Down Expand Up @@ -14258,11 +14255,11 @@
}
},
"arista_dhcp_relay" : {
"configurationFormat" : "CISCO_IOS",
"configurationFormat" : "ARISTA",
"name" : "arista_dhcp_relay",
"defaultCrossZoneAction" : "PERMIT",
"defaultInboundAction" : "PERMIT",
"deviceModel" : "CISCO_UNSPECIFIED",
"deviceModel" : "ARISTA_UNSPECIFIED",
"deviceType" : "SWITCH",
"interfaces" : {
"Ethernet0" : {
Expand All @@ -14273,22 +14270,18 @@
},
"allowedVlans" : "",
"autostate" : true,
"bandwidth" : 1.0E7,
"bandwidth" : 1.0E9,
"declaredNames" : [
"Ethernet0"
],
"dhcpRelayAddresses" : [
"1.2.3.4",
"2.3.4.5"
],
"mtu" : 1500,
"proxyArp" : true,
"proxyArp" : false,
"ripEnabled" : false,
"ripPassive" : false,
"spanningTreePortfast" : false,
"speed" : 1.0E7,
"switchport" : false,
"switchportMode" : "NONE",
"speed" : 1.0E9,
"switchport" : true,
"switchportMode" : "ACCESS",
"switchportTrunkEncapsulation" : "DOT1Q",
"type" : "PHYSICAL",
"vrf" : "default"
Expand All @@ -14301,29 +14294,26 @@
},
"allowedVlans" : "",
"autostate" : true,
"bandwidth" : 1.0E7,
"bandwidth" : 1.0E9,
"declaredNames" : [
"Ethernet1"
],
"mtu" : 1500,
"proxyArp" : true,
"proxyArp" : false,
"ripEnabled" : false,
"ripPassive" : false,
"spanningTreePortfast" : false,
"speed" : 1.0E7,
"switchport" : false,
"switchportMode" : "NONE",
"speed" : 1.0E9,
"switchport" : true,
"switchportMode" : "ACCESS",
"switchportTrunkEncapsulation" : "DOT1Q",
"type" : "PHYSICAL",
"vrf" : "default"
}
},
"vendorFamily" : {
"cisco" : {
"hostname" : "arista_dhcp_relay",
"logging" : {
"on" : true
}
"hostname" : "arista_dhcp_relay"
}
},
"vrfs" : {
Expand Down Expand Up @@ -14396,18 +14386,15 @@
}
},
"arista_ip_route" : {
"configurationFormat" : "CISCO_IOS",
"configurationFormat" : "ARISTA",
"name" : "arista_ip_route",
"defaultCrossZoneAction" : "PERMIT",
"defaultInboundAction" : "PERMIT",
"deviceModel" : "CISCO_UNSPECIFIED",
"deviceModel" : "ARISTA_UNSPECIFIED",
"deviceType" : "SWITCH",
"vendorFamily" : {
"cisco" : {
"hostname" : "arista_ip_route",
"logging" : {
"on" : true
}
"hostname" : "arista_ip_route"
}
},
"vrfs" : {
Expand Down Expand Up @@ -14681,18 +14668,15 @@
}
},
"arista_queue_monitor" : {
"configurationFormat" : "CISCO_IOS",
"configurationFormat" : "ARISTA",
"name" : "arista_queue_monitor",
"defaultCrossZoneAction" : "PERMIT",
"defaultInboundAction" : "PERMIT",
"deviceModel" : "CISCO_UNSPECIFIED",
"deviceModel" : "ARISTA_UNSPECIFIED",
"deviceType" : "SWITCH",
"vendorFamily" : {
"cisco" : {
"hostname" : "arista_queue_monitor",
"logging" : {
"on" : true
}
"hostname" : "arista_queue_monitor"
}
},
"vrfs" : {
Expand All @@ -14702,19 +14686,16 @@
}
},
"arista_username" : {
"configurationFormat" : "CISCO_IOS",
"configurationFormat" : "ARISTA",
"name" : "arista_username",
"defaultCrossZoneAction" : "PERMIT",
"defaultInboundAction" : "PERMIT",
"deviceModel" : "CISCO_UNSPECIFIED",
"deviceModel" : "ARISTA_UNSPECIFIED",
"deviceType" : "SWITCH",
"vendorFamily" : {
"cisco" : {
"enableSecret" : "6a04b2b4f67a9c3a69b681b1782b6cbcddf018f7dd810a274e71e012c83f5efe",
"hostname" : "arista_username",
"logging" : {
"on" : true
},
"users" : {
"admin" : {
"name" : "admin",
Expand All @@ -14723,7 +14704,7 @@
},
"noc" : {
"name" : "noc",
"password" : "57eaabe63a5726f36e16ec9ba5aba7bd944d511a2c2226c131fb3aade3671252"
"password" : "bee05f48f9aed7d383bf9b82553b31b06fc417df4ac06a02120c51271d396453"
}
}
}
Expand All @@ -14735,18 +14716,15 @@
}
},
"arista_vrf" : {
"configurationFormat" : "CISCO_IOS",
"configurationFormat" : "ARISTA",
"name" : "arista_vrf",
"defaultCrossZoneAction" : "PERMIT",
"defaultInboundAction" : "PERMIT",
"deviceModel" : "CISCO_UNSPECIFIED",
"deviceModel" : "ARISTA_UNSPECIFIED",
"deviceType" : "SWITCH",
"vendorFamily" : {
"cisco" : {
"hostname" : "arista_vrf",
"logging" : {
"on" : true
}
"hostname" : "arista_vrf"
}
},
"vrfs" : {
Expand Down

0 comments on commit 4231c78

Please sign in to comment.