Skip to content

Commit

Permalink
Merge pull request #257 from batfish/ari-dhcp-helper-ciscolike-fix
Browse files Browse the repository at this point in the history
prepare for 0.29.2
  • Loading branch information
arifogel committed Jul 27, 2017
2 parents 84cff57 + 18357e8 commit 28c5bb8
Show file tree
Hide file tree
Showing 31 changed files with 67 additions and 55 deletions.
2 changes: 1 addition & 1 deletion projects/allinone/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.batfish</groupId>
<artifactId>batfish-parent</artifactId>
<version>0.29.1</version>
<version>0.29.2</version>
</parent>

<artifactId>allinone</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion projects/batfish-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.batfish</groupId>
<artifactId>batfish-parent</artifactId>
<version>0.29.1</version>
<version>0.29.2</version>
</parent>

<artifactId>batfish-client</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion projects/batfish-common-protocol/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.batfish</groupId>
<artifactId>batfish-parent</artifactId>
<version>0.29.1</version>
<version>0.29.2</version>
</parent>

<artifactId>batfish-common-protocol</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion projects/batfish/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.batfish</groupId>
<artifactId>batfish-parent</artifactId>
<version>0.29.1</version>
<version>0.29.2</version>
</parent>

<artifactId>batfish</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2689,7 +2689,7 @@ public void exitIf_ip_address_secondary(If_ip_address_secondaryContext ctx) {
public void exitIf_ip_helper_address(If_ip_helper_addressContext ctx) {
for (Interface iface : _currentInterfaces) {
Ip dhcpRelayAddress = toIp(ctx.address);
iface.setDhcpRelayAddress(dhcpRelayAddress);
iface.getDhcpRelayAddresses().add(dhcpRelayAddress);
}
}

Expand Down Expand Up @@ -2975,7 +2975,7 @@ public void exitIf_vrf_member(If_vrf_memberContext ctx) {
public void exitIfdhcpr_address(Ifdhcpr_addressContext ctx) {
for (Interface iface : _currentInterfaces) {
Ip address = toIp(ctx.address);
iface.setDhcpRelayAddress(address);
iface.getDhcpRelayAddresses().add(address);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1778,10 +1778,7 @@ private org.batfish.datamodel.Interface toInterface(
newIface.setAutoState(iface.getAutoState());
newIface.setVrf(c.getVrfs().get(vrfName));
newIface.setBandwidth(iface.getBandwidth());
Ip dhcpRelayAddress = iface.getDhcpRelayAddress();
if (dhcpRelayAddress != null) {
newIface.setDhcpRelayAddresses(new TreeSet<>(Collections.singleton(dhcpRelayAddress)));
}
newIface.setDhcpRelayAddresses(iface.getDhcpRelayAddresses());
newIface.setMtu(iface.getMtu());
newIface.setProxyArp(iface.getProxyArp());
newIface.setSpanningTreePortfast(iface.getSpanningTreePortfast());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Set;
import java.util.SortedSet;
import java.util.TreeSet;
import org.batfish.common.BatfishException;
import org.batfish.common.util.ComparableStructure;
Expand Down Expand Up @@ -76,7 +77,7 @@ public static int getDefaultMtu() {

private String _description;

private Ip _dhcpRelayAddress;
private SortedSet<Ip> _dhcpRelayAddresses;

private String _incomingFilter;

Expand Down Expand Up @@ -145,6 +146,7 @@ public Interface(String name, CiscoConfiguration c) {
_active = true;
_autoState = true;
_allowedVlans = new ArrayList<>();
_dhcpRelayAddresses = new TreeSet<>();
_isisInterfaceMode = IsisInterfaceMode.UNSET;
_nativeVlan = 1;
_secondaryPrefixes = new LinkedHashSet<>();
Expand Down Expand Up @@ -214,8 +216,8 @@ public String getDescription() {
return _description;
}

public Ip getDhcpRelayAddress() {
return _dhcpRelayAddress;
public SortedSet<Ip> getDhcpRelayAddresses() {
return _dhcpRelayAddresses;
}

public String getIncomingFilter() {
Expand Down Expand Up @@ -362,8 +364,8 @@ public void setDescription(String description) {
_description = description;
}

public void setDhcpRelayAddress(Ip dhcpRelayAddress) {
_dhcpRelayAddress = dhcpRelayAddress;
public void setDhcpRelayAddress(SortedSet<Ip> dhcpRelayAddress) {
_dhcpRelayAddresses = dhcpRelayAddress;
}

public void setIncomingFilter(String accessListName) {
Expand Down
2 changes: 1 addition & 1 deletion projects/coordinator/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.batfish</groupId>
<artifactId>batfish-parent</artifactId>
<version>0.29.1</version>
<version>0.29.2</version>
</parent>

<artifactId>coordinator</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion projects/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<groupId>org.batfish</groupId>
<artifactId>batfish-parent</artifactId>
<version>0.29.1</version>
<version>0.29.2</version>

<packaging>pom</packaging>

Expand Down
2 changes: 1 addition & 1 deletion projects/question/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.batfish</groupId>
<artifactId>batfish-parent</artifactId>
<version>0.29.1</version>
<version>0.29.2</version>
</parent>

<artifactId>question</artifactId>
Expand Down
4 changes: 2 additions & 2 deletions test_rigs/parsing-tests/dc-as-reuse.ref
Original file line number Diff line number Diff line change
Expand Up @@ -4680,7 +4680,7 @@
]
}
},
"version" : "0.29.1"
"version" : "0.29.2"
},
{
"class" : "org.batfish.datamodel.answers.ConvertConfigurationAnswerElement",
Expand Down Expand Up @@ -4836,7 +4836,7 @@
}
}
},
"version" : "0.29.1"
"version" : "0.29.2"
},
{
"class" : "org.batfish.datamodel.answers.InitInfoAnswerElement",
Expand Down
4 changes: 2 additions & 2 deletions test_rigs/parsing-tests/disable-as-suppression.ref
Original file line number Diff line number Diff line change
Expand Up @@ -269,11 +269,11 @@
]
}
},
"version" : "0.29.1"
"version" : "0.29.2"
},
{
"class" : "org.batfish.datamodel.answers.ConvertConfigurationAnswerElement",
"version" : "0.29.1"
"version" : "0.29.2"
},
{
"class" : "org.batfish.datamodel.answers.InitInfoAnswerElement",
Expand Down
4 changes: 2 additions & 2 deletions test_rigs/parsing-tests/example-juniper.ref
Original file line number Diff line number Diff line change
Expand Up @@ -10365,7 +10365,7 @@
]
}
},
"version" : "0.29.1"
"version" : "0.29.2"
},
{
"class" : "org.batfish.datamodel.answers.ConvertConfigurationAnswerElement",
Expand Down Expand Up @@ -10494,7 +10494,7 @@
}
}
},
"version" : "0.29.1",
"version" : "0.29.2",
"warnings" : {
"as1border1" : {
"Red flags" : {
Expand Down
4 changes: 2 additions & 2 deletions test_rigs/parsing-tests/example.ref
Original file line number Diff line number Diff line change
Expand Up @@ -10699,7 +10699,7 @@
]
}
},
"version" : "0.29.1"
"version" : "0.29.2"
},
{
"class" : "org.batfish.datamodel.answers.ConvertConfigurationAnswerElement",
Expand Down Expand Up @@ -10842,7 +10842,7 @@
}
}
},
"version" : "0.29.1",
"version" : "0.29.2",
"warnings" : {
"as1border1" : {
"Red flags" : {
Expand Down
4 changes: 2 additions & 2 deletions test_rigs/parsing-tests/indirection.ref
Original file line number Diff line number Diff line change
Expand Up @@ -944,11 +944,11 @@
]
}
},
"version" : "0.29.1"
"version" : "0.29.2"
},
{
"class" : "org.batfish.datamodel.answers.ConvertConfigurationAnswerElement",
"version" : "0.29.1"
"version" : "0.29.2"
},
{
"class" : "org.batfish.datamodel.answers.InitInfoAnswerElement",
Expand Down
4 changes: 2 additions & 2 deletions test_rigs/parsing-tests/isis.ref
Original file line number Diff line number Diff line change
Expand Up @@ -2445,11 +2445,11 @@
]
}
},
"version" : "0.29.1"
"version" : "0.29.2"
},
{
"class" : "org.batfish.datamodel.answers.ConvertConfigurationAnswerElement",
"version" : "0.29.1"
"version" : "0.29.2"
},
{
"class" : "org.batfish.datamodel.answers.InitInfoAnswerElement",
Expand Down
4 changes: 2 additions & 2 deletions test_rigs/parsing-tests/policy-routing.ref
Original file line number Diff line number Diff line change
Expand Up @@ -1904,11 +1904,11 @@
]
}
},
"version" : "0.29.1"
"version" : "0.29.2"
},
{
"class" : "org.batfish.datamodel.answers.ConvertConfigurationAnswerElement",
"version" : "0.29.1"
"version" : "0.29.2"
},
{
"class" : "org.batfish.datamodel.answers.InitInfoAnswerElement",
Expand Down
4 changes: 2 additions & 2 deletions test_rigs/parsing-tests/snat.ref
Original file line number Diff line number Diff line change
Expand Up @@ -458,11 +458,11 @@
]
}
},
"version" : "0.29.1"
"version" : "0.29.2"
},
{
"class" : "org.batfish.datamodel.answers.ConvertConfigurationAnswerElement",
"version" : "0.29.1"
"version" : "0.29.2"
},
{
"class" : "org.batfish.datamodel.answers.InitInfoAnswerElement",
Expand Down
4 changes: 2 additions & 2 deletions test_rigs/parsing-tests/srx-testbed.ref
Original file line number Diff line number Diff line change
Expand Up @@ -5912,7 +5912,7 @@
]
}
},
"version" : "0.29.1"
"version" : "0.29.2"
},
{
"class" : "org.batfish.datamodel.answers.ConvertConfigurationAnswerElement",
Expand All @@ -5930,7 +5930,7 @@
}
}
},
"version" : "0.29.1"
"version" : "0.29.2"
},
{
"class" : "org.batfish.datamodel.answers.InitInfoAnswerElement",
Expand Down
13 changes: 11 additions & 2 deletions test_rigs/parsing-tests/unit-tests.ref
Original file line number Diff line number Diff line change
Expand Up @@ -6405,6 +6405,15 @@
" DHCP:'dhcp' <== mode:DEFAULT_MODE",
" (ifdhcp_relay",
" RELAY:'relay' <== mode:DEFAULT_MODE",
" (ifdhcpr_address",
" ADDRESS:'address' <== mode:DEFAULT_MODE",
" IP_ADDRESS:'2.3.4.5' <== mode:DEFAULT_MODE",
" NEWLINE:'\\n' <== mode:DEFAULT_MODE)))",
" (if_ip_dhcp",
" IP:'ip' <== mode:DEFAULT_MODE",
" DHCP:'dhcp' <== mode:DEFAULT_MODE",
" (ifdhcp_relay",
" RELAY:'relay' <== mode:DEFAULT_MODE",
" (ifdhcpr_null",
" CLIENT:'client' <== mode:DEFAULT_MODE",
" NEWLINE:'\\n' <== mode:DEFAULT_MODE)))",
Expand Down Expand Up @@ -32111,7 +32120,7 @@
]
}
},
"version" : "0.29.1",
"version" : "0.29.2",
"warnings" : {
"bgp_address_family" : {
"Red flags" : {
Expand Down Expand Up @@ -33228,7 +33237,7 @@
}
}
},
"version" : "0.29.1",
"version" : "0.29.2",
"warnings" : {
"address_family" : {
"Red flags" : {
Expand Down
1 change: 1 addition & 0 deletions test_rigs/unit-tests/configs/cisco_dhcp_helper
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ hostname cisco_dhcp_helper
!
interface Ethernet0
ip dhcp relay address 1.2.3.4
ip dhcp relay address 2.3.4.5
ip dhcp relay client
ip dhcp relay information trusted
ip dhcp snooping limit rate 10
Expand Down
2 changes: 1 addition & 1 deletion tests/basic/genDp-delta.ref
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"8" : 301
},
"ospfInternalIterations" : 3,
"version" : "0.29.1"
"version" : "0.29.2"
}
],
"status" : "SUCCESS"
Expand Down
2 changes: 1 addition & 1 deletion tests/basic/genDp.ref
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"8" : 298
},
"ospfInternalIterations" : 3,
"version" : "0.29.1"
"version" : "0.29.2"
}
],
"status" : "SUCCESS"
Expand Down
4 changes: 2 additions & 2 deletions tests/basic/init-dc-as-reuse.ref
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"pod_1_tor_0" : "PASSED",
"pod_1_tor_1" : "PASSED"
},
"version" : "0.29.1"
"version" : "0.29.2"
},
{
"class" : "org.batfish.datamodel.answers.ConvertConfigurationAnswerElement",
Expand Down Expand Up @@ -182,7 +182,7 @@
}
}
},
"version" : "0.29.1"
"version" : "0.29.2"
},
{
"class" : "org.batfish.datamodel.answers.InitInfoAnswerElement",
Expand Down
4 changes: 2 additions & 2 deletions tests/basic/init-delta.ref
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"testrig/iptables/host1.iptables" : "PASSED",
"testrig/iptables/host2.iptables" : "PASSED"
},
"version" : "0.29.1"
"version" : "0.29.2"
},
{
"class" : "org.batfish.datamodel.answers.ConvertConfigurationAnswerElement",
Expand Down Expand Up @@ -180,7 +180,7 @@
}
}
},
"version" : "0.29.1",
"version" : "0.29.2",
"warnings" : {
"as1border1" : {
"Red flags" : {
Expand Down
4 changes: 2 additions & 2 deletions tests/basic/init-snat.ref
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
"us_border" : "PASSED",
"us_switch" : "PASSED"
},
"version" : "0.29.1"
"version" : "0.29.2"
},
{
"class" : "org.batfish.datamodel.answers.ConvertConfigurationAnswerElement",
"version" : "0.29.1"
"version" : "0.29.2"
},
{
"class" : "org.batfish.datamodel.answers.InitInfoAnswerElement",
Expand Down

0 comments on commit 28c5bb8

Please sign in to comment.