Skip to content
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

Unnumbered BGP in session questions #3797

Merged
merged 9 commits into from
May 7, 2019
Merged

Conversation

corinaminer
Copy link
Contributor

  • Adds remote interface column to answers
  • Local and remote interface columns are only populated for rows representing BGP unnumbered peers; local and remote IP columns are only populated for rows representing standard BGP peers (active or dynamic)
  • New session types EBGP_UNNUMBERED and IBGP_UNNUMBERED to help tell BGP unnumbered rows apart from misconfigured standard peers

@batfish-bot
Copy link

This change is Reviewable

@codecov
Copy link

codecov bot commented May 6, 2019

Codecov Report

Merging #3797 into master will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##             master    #3797   +/-   ##
=========================================
  Coverage     73.99%   73.99%           
  Complexity    24181    24181           
=========================================
  Files          2038     2038           
  Lines         98284    98284           
  Branches      11803    11803           
=========================================
  Hits          72723    72723           
  Misses        20273    20273           
  Partials       5288     5288

Copy link
Contributor

@progwriter progwriter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 11 of 12 files at r1, 2 of 2 files at r2.
Reviewable status: 13 of 14 files reviewed, 2 unresolved discussions (waiting on @corinaminer and @progwriter)


projects/question/src/main/java/org/batfish/question/bgpsessionstatus/BgpSessionCompatibilityAnswerer.java, line 90 at r2 (raw file):

      Set<String> remoteNodes,
      Map<String, ColumnMetadata> metadataMap,
      @Nullable Layer2Topology layer2Topology) {

Be mindful of #3795, there is no reason for this not to use calls to topologyProvider for pre/post DP topologies (applies to session status as well, obviously)


projects/question/src/main/java/org/batfish/question/bgpsessionstatus/BgpSessionStatusAnswerer.java, line 107 at r2 (raw file):

  }

  public static List<Row> getRows(

why is this public and what is the benefit of the function wrapping above?

Copy link
Contributor Author

@corinaminer corinaminer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 13 of 14 files reviewed, 2 unresolved discussions (waiting on @progwriter)


projects/question/src/main/java/org/batfish/question/bgpsessionstatus/BgpSessionCompatibilityAnswerer.java, line 90 at r2 (raw file):

Previously, progwriter (Victor Heorhiadi) wrote…

Be mindful of #3795, there is no reason for this not to use calls to topologyProvider for pre/post DP topologies (applies to session status as well, obviously)

The layer2Topology being passed in here is retrieved by the topologyProvider in the non-static getRows() method a few lines up. This static getRows() method is separate in order to make testing easier; same for the new static getRows() method in session status (which doesn't actually take a layer2Topology parameter, instead takes the BGP topologies directly to avoid needing a traceroute engine parameter).

Marked both answerers' static getRows() methods @VisibleForTesting and reduced their visibilities to package-private.


projects/question/src/main/java/org/batfish/question/bgpsessionstatus/BgpSessionStatusAnswerer.java, line 107 at r2 (raw file):

Previously, progwriter (Victor Heorhiadi) wrote…

why is this public and what is the benefit of the function wrapping above?

addressed in other comment -- separation is useful for testing.

@progwriter
Copy link
Contributor


projects/question/src/main/java/org/batfish/question/bgpsessionstatus/BgpSessionCompatibilityAnswerer.java, line 90 at r2 (raw file):
I was referring to the calls to

BgpTopologyUtils.initBgpTopology

seemingly all over the place. If you don't init the bgp topology, you don't need the l2 topology.

Copy link
Contributor Author

@corinaminer corinaminer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 9 of 14 files reviewed, 2 unresolved discussions (waiting on @progwriter)


projects/question/src/main/java/org/batfish/question/bgpsessionstatus/BgpSessionCompatibilityAnswerer.java, line 90 at r2 (raw file):

Previously, progwriter (Victor Heorhiadi) wrote…

I was referring to the calls to

BgpTopologyUtils.initBgpTopology

seemingly all over the place. If you don't init the bgp topology, you don't need the l2 topology.

The topology provider doesn't have the version of the topology that's needed here: i.e., including invalid peers and ignoring reachability. Replaced one of the initBgpTopology calls in BgpSessionStatusAnswerer with the topology provider's version.

Copy link
Contributor

@progwriter progwriter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 1 of 12 files at r1, 2 of 2 files at r3, 6 of 6 files at r4.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

@corinaminer corinaminer merged commit 38b4127 into master May 7, 2019
@corinaminer corinaminer deleted the bgp-session-qs-unnum branch May 7, 2019 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants