-
Notifications
You must be signed in to change notification settings - Fork 121
Implement rfc4363 FdbUpdater for lag inside vlan #203
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
Changes from all commits
09888a0
0f549b8
7aeac92
755ace1
dafbf42
908b9b5
b81077d
6afaaa3
7207f15
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,11 +17,16 @@ | |
from ax_interface.constants import PduTypes | ||
from sonic_ax_impl.mibs.ietf import rfc4363 | ||
from sonic_ax_impl.main import SonicMIB | ||
from swsssdk.port_util import BaseIdx | ||
|
||
class TestSonicMIB(TestCase): | ||
@classmethod | ||
def setUpClass(cls): | ||
cls.lut = MIBTable(SonicMIB) | ||
for updater in cls.lut.updater_instances: | ||
updater.update_data() | ||
updater.reinit_data() | ||
updater.update_data() | ||
|
||
def test_getpdu(self): | ||
oid = ObjectIdentifier(20, 0, 0, 0, (1, 3, 6, 1, 2, 1, 17, 7, 1, 2, 2, 1, 2, 1000, 124, 254, 144, 128, 159, 4)) | ||
|
@@ -43,7 +48,7 @@ def test_getnextpdu(self): | |
get_pdu = GetNextPDU( | ||
header=PDUHeader(1, PduTypes.GET, 16, 0, 42, 0, 0, 0), | ||
oids=( | ||
ObjectIdentifier(20, 0, 0, 0, (1, 3, 6, 1, 2, 1, 17, 7, 1, 2, 2, 1, 2)), | ||
ObjectIdentifier(20, 0, 0, 0, (1, 3, 6, 1, 2, 1, 17, 7, 1, 2, 2, 1, 2, 999)), | ||
) | ||
) | ||
|
||
|
@@ -56,6 +61,20 @@ def test_getnextpdu(self): | |
self.assertEqual(value0.type_, ValueType.INTEGER) | ||
self.assertEqual(value0.data, 113) | ||
|
||
def test_getnextpdu_lag(self): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can we add same case for multi-asic also . There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we currently skip the tests/namespace/test_fdb.py as fdb MIB is not modified to support for mulit-asic as it is a T0 topology feature. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ok ideally we should remove test itself then. |
||
get_pdu = GetNextPDU( | ||
header=PDUHeader(1, PduTypes.GET, 16, 0, 42, 0, 0, 0), | ||
oids=( | ||
ObjectIdentifier(20, 0, 0, 0, (1, 3, 6, 1, 2, 1, 17, 7, 1, 2, 2, 1, 2, 101)), | ||
) | ||
) | ||
|
||
response = get_pdu.make_response(self.lut) | ||
|
||
value0 = response.values[0] | ||
self.assertEqual(value0.type_, ValueType.INTEGER) | ||
self.assertEqual(value0.data, BaseIdx.portchannel_base_idx + 101) | ||
|
||
def test_getnextpdu_exactmatch(self): | ||
# oid.include = 1 | ||
oid = ObjectIdentifier(20, 0, 1, 0, (1, 3, 6, 1, 2, 1, 17, 7, 1, 2, 2, 1, 2, 1000, 124, 254, 144, 128, 159, 4)) | ||
|
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.
Can we use if_lag_name_map from port_util.if_lag_name_map() ? #Resolved
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.
The function
get_interface_oid_map
returns both port and lag. So not fit well.In reply to: 594597081 [](ancestors = 594597081)