-
Notifications
You must be signed in to change notification settings - Fork 543
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
swss-orchagent: add new orch for vnet routes/tunnel routes tables in CONFIG_DB #907
Conversation
retest this please |
Depends on this PR |
orchagent/vnetorch.cpp
Outdated
auto t = it->second; | ||
const std::string & op = kfvOp(t); | ||
|
||
if (op == SET_COMMAND) |
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.
You can pass the op
and handle in a single function to avoid code duplication
tests/test_vnet.py
Outdated
attrs, | ||
) | ||
|
||
|
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.
You can remove this extra line
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.
will fix it
orchagent/vnetorch.h
Outdated
@@ -10,6 +10,8 @@ | |||
#include "request_parser.h" | |||
#include "ipaddresses.h" | |||
|
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.
Line skip is not required. You can add it along with other includes
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.
will fix it
…uplication of code Signed-off-by: weixi.chen@microsoft.com
retest this please |
retest this please |
1 similar comment
retest this please |
orchagent/vnetorch.cpp
Outdated
{ | ||
bool task_result = false; | ||
auto t = it->second; | ||
const std::string & op = kfvOp(t); |
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.
could you remove the std::
in the cpp file?
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.
remove them all for my changes in this .cpp files
Will list all RIDs that are not present in rid2vid map right after warm boot.
Signed-off-by: Weixi Chen Weixi.Chen@microsoft.com
What I did
Why I did it
Static vnet routes provisioned in sonic are not persistence. Switch reboot leads to the loss of static routes. Tables in CONFIG_DB will be persistent if a config save is manually performed.
How I verified it
run vs test: sudo pytest test_vnet.py -s -v --dvsname=vs
output:
/usr/local/lib/python2.7/dist-packages/requests/init.py:83: RequestsDependencyWarning: Old version of cryptography ([1, 2, 3]) may cause slowdown.
warnings.warn(warning, RequestsDependencyWarning)
======================================================================== test session starts ========================================================================
platform linux2 -- Python 2.7.12, pytest-3.3.0, py-1.8.0, pluggy-0.6.0 -- /usr/bin/python
cachedir: .cache
rootdir: /home/weixi-vs/sonic-buildimage/src/sonic-swss/tests, inifile:
collected 3 items
test_vnet.py::TestVnetOrch::test_vnet_orch_2 PASSED [ 33%]
test_vnet.py::TestVnetOrch::test_vnet_orch_3 PASSED [ 66%]
test_vnet.py::TestVnetOrch::test_vnet_orch_1 PASSED [100%]
==================================================================== 3 passed in 174.11 seconds =====================================================================