-
Notifications
You must be signed in to change notification settings - Fork 228
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
allowing dst (node or IP) as a traceroute parameter #805
Conversation
Reviewed 10 of 10 files at r1. projects/batfish-common-protocol/src/main/java/org/batfish/datamodel/Configuration.java, line 325 at r1 (raw file):
Add projects/batfish-common-protocol/src/main/java/org/batfish/datamodel/Configuration.java, line 340 at r1 (raw file):
Use the java8 built-in support for minimum over a stream. /** Returns the lowest IP across all interfaces for now. We'll improve it later. */
@JsonIgnore
@Nullable
public Ip getCanonicalIp() {
return getVrfs()
.values()
.stream()
.flatMap(v -> v.getInterfaces().values().stream())
.flatMap(i -> i.getAllPrefixes().stream())
.map(Prefix::getAddress)
.min(Ip::compareTo)
.orElse(null);
} projects/batfish-common-protocol/src/main/java/org/batfish/datamodel/Ip.java, line 103 at r1 (raw file):
Would prefer to keep this logic inline where you have it now rather than in the Ip class itself. Does not seem very general. projects/question/src/main/java/org/batfish/question/TracerouteQuestionPlugin.java, line 600 at r1 (raw file):
Why delete this Comments from Reviewable |
Review status: all files reviewed at latest revision, 4 unresolved discussions. projects/batfish-common-protocol/src/main/java/org/batfish/datamodel/Configuration.java, line 325 at r1 (raw file): Previously, dhalperi (Dan Halperin) wrote…
Done. projects/batfish-common-protocol/src/main/java/org/batfish/datamodel/Configuration.java, line 340 at r1 (raw file): Previously, dhalperi (Dan Halperin) wrote…
Done. projects/batfish-common-protocol/src/main/java/org/batfish/datamodel/Ip.java, line 103 at r1 (raw file): Previously, dhalperi (Dan Halperin) wrote…
done. had to change the visibility of a function in Ip.java. projects/question/src/main/java/org/batfish/question/TracerouteQuestionPlugin.java, line 600 at r1 (raw file): Previously, dhalperi (Dan Halperin) wrote…
accident. done. Comments from Reviewable |
Reviewed 4 of 4 files at r2. projects/batfish-common-protocol/src/main/java/org/batfish/datamodel/Ip.java, line 37 at r2 (raw file):
Why do this vs just using the projects/question/src/main/java/org/batfish/question/TracerouteQuestionPlugin.java, line 307 at r2 (raw file):
I think this is the same as the existing Comments from Reviewable |
Review status: 9 of 11 files reviewed at latest revision, 2 unresolved discussions. projects/batfish-common-protocol/src/main/java/org/batfish/datamodel/Ip.java, line 37 at r2 (raw file): Previously, dhalperi (Dan Halperin) wrote…
argh. i am stupid. projects/question/src/main/java/org/batfish/question/TracerouteQuestionPlugin.java, line 307 at r2 (raw file):
Comments from Reviewable |
Reviewed 1 of 2 files at r3. Comments from Reviewable |
Reviewed 1 of 2 files at r3. Comments from Reviewable |
Partial fix to #622.
Change dstIp parameter to dst which can be an IP or a hostname. If the latter, we use the "canonical IP" for the host.
This change is