Skip to content

[config] Update unit tests for static routes#1619

Closed
d-dashkov wants to merge 2 commits intosonic-net:masterfrom
d-dashkov:fix_static_route_dev
Closed

[config] Update unit tests for static routes#1619
d-dashkov wants to merge 2 commits intosonic-net:masterfrom
d-dashkov:fix_static_route_dev

Conversation

@d-dashkov
Copy link
Copy Markdown
Contributor

@d-dashkov d-dashkov commented May 18, 2021

What I did
Update unit tests with ethernet and vlan cases

Also solved #1534 (comment) with notifying the user.

How I did it
Add unit tests and add verification for blackhole

New command output (if the output of a command-line utility has changed)

If user trying to set blackhole on existing route
"Error: this route is already configured on nexthop, remove it before configuring to black hole"

Signed-off-by: d-dashkov [email protected]

config/main.py Outdated
# If defined intf name, check if it belongs to interface
if 'ifname' in route:
if (not route['ifname'] in config_db.get_keys('VLAN_INTERFACE') and
if (not route['ifname'] in config_db.get_keys('VLAN') and
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This will break the assumption made as part of PR #1535 (comment)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I see that this will allow configuring a route to ifname without ip, but this seems to be the only way to solve this problem.

@d-dashkov
Copy link
Copy Markdown
Contributor Author

retest this please

@dprital
Copy link
Copy Markdown
Collaborator

dprital commented Jun 8, 2021

@d-dashkov , @prsunny - What is the status with this PR ? Do you have plans to approve it ?

@prsunny
Copy link
Copy Markdown
Contributor

prsunny commented Jun 9, 2021

@d-dashkov , @prsunny - What is the status with this PR ? Do you have plans to approve it ?

As mentioned, this poses another challenge in the delete flow. Hence, not planning to merge

Signed-off-by: d-dashkov <[email protected]>
@d-dashkov d-dashkov changed the title [config] Fix adding dev to static route [config] Update unit tests for static routes Jun 22, 2021
@d-dashkov
Copy link
Copy Markdown
Contributor Author

@prsunny could you check this PR, I returned the rules for vlan and just left a warning about a black hole

@d-dashkov d-dashkov requested a review from prsunny June 22, 2021 20:58
@d-dashkov d-dashkov closed this Oct 6, 2021
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