Add router interface reference on Port to track port dependency on ro… #18
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
…uter interface (neighbor, next hop, route)
What I did
Add router interface reference count on portorch to track neighbor/nexthop/route dependency on Port
Why I did it
Make sure no neighbors/nexthop/routes on the port when deleting the port for Dynamic port breakout
How I verified it
vs tests:
sudo pytest -v --dvsname=vs-pm test_port_dpb_neigh.py
======================================================================= test session starts =======================================================================
platform linux2 -- Python 2.7.15+, pytest-3.3.0, py-1.8.0, pluggy-0.6.0 -- /usr/bin/python
cachedir: .cache
rootdir: /home/pmao/sonic1/sonic-buildimage/src/sonic-swss/tests, inifile:
collected 5 items
test_port_dpb_neigh.py::TestPortDPBNeigh::test_set_neighbor_DPB PASSED [ 20%]
test_port_dpb_neigh.py::TestPortDPBNeigh::test_arp_neigh_DPB PASSED [ 40%]
test_port_dpb_neigh.py::TestPortDPBNeigh::test_nexthop_DPB PASSED [ 60%]
test_port_dpb_neigh.py::TestPortDPBNeigh::test_route_DPB PASSED [ 80%]
test_port_dpb_neigh.py::TestPortDPBNeigh::test_vlan_DPB PASSED [100%]
=================================================================== 5 passed in 262.56 seconds ====================================================================
Details if related