-
Notifications
You must be signed in to change notification settings - Fork 113
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
Support multiple IP addresses in LLDPRemManAddrTable #136
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Sangita Maity <samaity@linkedin.com>
logger.warning("Invalid management IP {}".format(mgmt_ip_str)) | ||
return | ||
|
||
sub_id = (if_oid,) + (remote_index,) + (subtype,) + mgmt_ip_sub_oid |
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.
(remote_index,) + (subtype,) + mgmt_ip_sub_oid [](start = 37, length = 46)
You don't need first element in other places, why not just remove? #Closed
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.
Yeah, I tried to do it. But to maintain the uniformity with other OS, I kept it this way. Also, during testing, I faced issues to pass some test cases which is currently not part of the current repo like test_ipv6_rem_man_addr, test_ipv4_rem_man_addr etc. as those test cases were removed from repo by #112 PR.
mgmt_ip_sub_oid = (addr_subtype_sub_oid,) + tuple(i for i in ipa.packed) | ||
elif subtype == ManAddrConst.man_addr_subtype_ipv6: | ||
|
||
addr_subtype_sub_oid = 16 |
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.
16 [](start = 43, length = 2)
Could you double check whether it is 6?
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.
Sure. I checked other OS like cisco and did the snmpwalk for the same oid i.e. 1.0.8802.1.1.2.1.4.2
. It's 16.
OBJECT peerAddressType
SYNTAX InetAddressType { ipv4(1), ipv6(2) }
DESCRIPTION
"An implementation is only required to support IPv4
and IPv6 addresses."
OBJECT peerAddress
SYNTAX InetAddress (SIZE(4|16))
DESCRIPTION
"An implementation is only required to support IPv4
and globally unique IPv6 addresses."
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.
As comments
Signed-off-by: Sangita Maity <samaity@linkedin.com>
@@ -591,11 +593,11 @@ def get_next(self, sub_id): | |||
def lookup(self, sub_id, callable): | |||
if len(sub_id) == 0: |
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.
if len(sub_id) == 0 [](start = 8, length = 19)
What happened if len(sub_id) == 1
…dpRemManAddrOID. Signed-off-by: Sangita Maity <samaity@linkedin.com>
4c27582
to
9aa6c94
Compare
Signed-off-by: Sangita Maity samaity@linkedin.com
LLDPRemManAddrTable now supports multiple IP address just like lldpLocManAddrTable.
- What I did
Currently, Error occurs when "lldp_rem_man_addr" field has a list of IP strings like below.
Before the fix
was getting log message like below.
"May 20 21:34:42.691758 lnos-x1-a-csw05 INFO snmp#snmp-subagent [ax_interface] ERROR: Invalid mgmt IP 10.0.1.1,2000:0:1::1 ---- multiple IP Addresses
LLDPRemManAddrTable now supports multiple IP address just like lldpLocManAddrTable.
- How I did it
Used split method to separate multiple mgmt_ip, and write a string to redis database.
- How to verify it
no error log in Syslog.
successfully able to snmpwalk 1.0.8802.1.1.2.1.4.2 oid. However,
- Description for the changelog