Skip to content
This repository has been archived by the owner on Sep 7, 2023. It is now read-only.

End-to-End Path FIx #43

Merged
merged 2 commits into from
Sep 13, 2021
Merged

End-to-End Path FIx #43

merged 2 commits into from
Sep 13, 2021

Conversation

pke11y
Copy link
Contributor

@pke11y pke11y commented Sep 12, 2021

This PR fixes the errors experienced when nodes have no forwarding.

The following items were accounted for in this fix:

  • Change the header name to Src Fwd or Dst Fwd to account for IP or MPLS forwarding.
  • Add Forwarding Type and src and dst node type
  • Account for host, transit and cloud nodes that have very little forwarding information
  • Display (empty) like the web application for null fields

edge["dstAddr"],
edge["tlabel"],
nodes.get(edge["target"], {}).get("hostname"),
forwarding_type or "(empty)",
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe use a CONSTANT instead of "(empty)" ?
so we could change it in one shoot later

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, good one. Will update.

if dst_forwarding:
forwarding_type = dst_forwarding[0].get("search")

if src_forwarding and forwarding_type == "mpls":
Copy link
Contributor

Choose a reason for hiding this comment

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

I would group these 2 if statements in one:

if forwarding_type == "mpls":
    if src_forwarding:
    ...
    if dst_forwarding:
    ...

just to group all the mpls stuff together

@pke11y pke11y requested a review from chadell September 13, 2021 09:33
Copy link
Contributor

@chadell chadell left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants