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

Fix sonic routes version 4.2 #947

Merged
merged 4 commits into from
May 23, 2024
Merged

Fix sonic routes version 4.2 #947

merged 4 commits into from
May 23, 2024

Conversation

AndryNick98
Copy link
Collaborator

Description

SONIC 4.2 doesn't provide the VRF name in the route table output. We need to extract the vrf from the output of ip vrf.
This PR implement the fix

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Double Check

  • I have read the comments and followed the CONTRIBUTING.md.
  • I have explained my PR according to the information in the comments or in a linked issue.
  • My PR source branch is created from the develop branch.
  • My PR targets the develop branch.
  • All my commits have --signoff applied

it separate sonic in a list to be able to differentiate
between versions higher than 4.2 and lower than that.
It add for sonic 4.2 the command to retrive the vrfs name associated
with ids

Signed-off-by: AndryNick98 <[email protected]>
- created sonic_routes_v42.tfsm: template specific for route command in
sonic v42 where entries contains the vrf id instead of the vrf name
- created sonic_vrf_show.tfsm: template to parse the output of the
ip vrf show command, useful to get the vrf name

Signed-off-by: AndryNick98 <[email protected]>
we swap the order of operators in the operators dict because
otherwise operators like ge(>=) and le(<=) don't work correctly.
without this change for example gt(>) would be selected
instead of ge(>=)

Signed-off-by: AndryNick98 <[email protected]>
Added the code to manage correctly those routing table entries
that have the vrf id instead of the vrf name

Signed-off-by: AndryNick98 <[email protected]>
@ddutt ddutt merged commit a57d62c into develop May 23, 2024
13 checks passed
@ddutt ddutt deleted the fix-sonic-routes branch May 23, 2024 21:44
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.

3 participants