-
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
Parse rfc1583 compatibility #617
Parse rfc1583 compatibility #617
Conversation
@Override public void exitRo_rfc1583_compatibility(Ro_rfc1583_compatibilityContext ctx) { | ||
_configuration.getCf().setRfc1583Compatible(ctx.NO() == null); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My understanding here is that the method is only called if there's a line about RFC 1583 compatibility, and then ctx.NO() is null iff there's no no
in that line.
Reviewed 4 of 8 files at r1. projects/batfish-common-protocol/src/main/java/org/batfish/datamodel/vendor_family/cisco/CiscoFamily.java, line 120 at r1 (raw file):
Annotate both the return value and the local variable as projects/batfish-common-protocol/src/main/java/org/batfish/datamodel/vendor_family/cisco/CiscoFamily.java, line 198 at r1 (raw file):
It looks like you have not followed the Batfish instructions and set up the auto formatter. Please do so, and then reformat all java files you've modified. projects/batfish/src/main/java/org/batfish/bdp/VirtualRouter.java, line 261 at r1 (raw file):
Do this, and delete the TODO? projects/batfish/src/main/java/org/batfish/bdp/VirtualRouter.java, line 294 at r1 (raw file):
This doesn't seem like the right part of the model to have this flag -- it's a per-OSPF process flag. E.g., here's a recommended config; can you support this?
projects/batfish/src/test/resources/org/batfish/grammar/cisco/testconfigs/rfc1583Compatible, line 6 at r1 (raw file):
Make this 1 file with 2 OSPF routers and verify that we can set compatibility separately for the two of them. projects/batfish/src/test/resources/org/batfish/grammar/cisco/testconfigs/rfc1583NoCompatible, line 5 at r1 (raw file):
(can delete this file now) Comments from Reviewable |
@@ -291,13 +291,17 @@ boolean computeInterAreaSummaries() { | |||
Long metric = null; | |||
// Compute the metric from any possible contributing routes, use older RFC by default | |||
// as it seems consistent with the GNS3 simulations | |||
Boolean useMin = _c.getVendorFamily().getCisco().getRfc1583Compatible(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At this point we should rely only on vendor-independent config. I believe there should be a toVendorIndependentConfiguration() method that will need to be changed to keep track of this var. Then it can be propagated to the Vrf & Ospf process
Reviewed 10 of 10 files at r2. projects/batfish-common-protocol/src/main/java/org/batfish/datamodel/OspfProcess.java, line 73 at r2 (raw file):
reformat file projects/batfish/src/main/java/org/batfish/bdp/VirtualRouter.java, line 294 at r1 (raw file): Previously, progwriter (Victor Heorhiadi) wrote…
Done projects/batfish/src/main/java/org/batfish/bdp/VirtualRouter.java, line 294 at r1 (raw file): Previously, dhalperi (Dan Halperin) wrote…
Ignore - as Batfish doesn't currently support multiple ospf processes, multiple files is better. projects/batfish/src/main/java/org/batfish/bdp/VirtualRouter.java, line 271 at r2 (raw file):
simpler: boolean useMin = MoreObjects.firstNonNull(proc.getRfc1583Compatible(), true); and I'd probably add a comment that contains some of the comments from the other note, perhaps along the lines of: // Between the original RFC1583 and the newer RFC2328, the OSPF summary metric
// was changed from min to max. Routers (Cisco, Juniper at least) default to RFC1583
// unless explicitly disabled. projects/batfish/src/main/java/org/batfish/grammar/cisco/CiscoControlPlaneExtractor.java, line 1779 at r2 (raw file):
auto-format here, too. projects/batfish/src/main/java/org/batfish/representation/cisco/OspfProcess.java, line 155 at r2 (raw file):
autoformat projects/batfish/src/test/java/org/batfish/grammar/cisco/CiscoGrammarTest.java, line 207 at r2 (raw file):
autoformat, but LGTM Comments from Reviewable |
Review status: 3 of 11 files reviewed at latest revision, 5 unresolved discussions. projects/batfish/src/main/java/org/batfish/bdp/VirtualRouter.java, line 294 at r1 (raw file): Previously, dhalperi (Dan Halperin) wrote…
No, can't support that. Moved the flag down into OspfProcess, though. projects/batfish-common-protocol/src/main/java/org/batfish/datamodel/vendor_family/cisco/CiscoFamily.java, line 120 at r1 (raw file): Previously, dhalperi (Dan Halperin) wrote…
Should the argument of the setter be marked Comments from Reviewable |
Reviewed 8 of 8 files at r3. projects/batfish-common-protocol/src/main/java/org/batfish/datamodel/vendor_family/cisco/CiscoFamily.java, line 120 at r1 (raw file): Previously, corinaminer (Corina Miner) wrote…
Yes, probably. Good point. Comments from Reviewable |
Review status: all files reviewed at latest revision, 5 unresolved discussions. Comments from Reviewable |
Review status: all files reviewed at latest revision, 6 unresolved discussions. projects/batfish/src/main/java/org/batfish/bdp/VirtualRouter.java, line 271 at r2 (raw file): Previously, dhalperi (Dan Halperin) wrote…
Done. projects/batfish/src/main/java/org/batfish/grammar/cisco/CiscoControlPlaneExtractor.java, line 1779 at r2 (raw file): Previously, dhalperi (Dan Halperin) wrote…
Done. projects/batfish/src/main/java/org/batfish/representation/cisco/OspfProcess.java, line 155 at r2 (raw file): Previously, dhalperi (Dan Halperin) wrote…
Done. projects/batfish/src/test/java/org/batfish/grammar/cisco/CiscoGrammarTest.java, line 207 at r2 (raw file): Previously, dhalperi (Dan Halperin) wrote…
Done. projects/batfish-common-protocol/src/main/java/org/batfish/datamodel/vendor_family/cisco/CiscoFamily.java, line 120 at r1 (raw file): Previously, dhalperi (Dan Halperin) wrote…
Done. Comments from Reviewable |
Reviewed 2 of 2 files at r4. Comments from Reviewable |
Changes are grouped by commit.
Let me know if I need to add to any other files to make the RFC compatibility info more accessible.
This change is