Skip to content

[lldp] add lldpRemManAddrTable, lldpLocManAddrTable#8

Merged
qiluo-msft merged 5 commits intosonic-net:masterfrom
mykolaf:lldp2
Aug 2, 2018
Merged

[lldp] add lldpRemManAddrTable, lldpLocManAddrTable#8
qiluo-msft merged 5 commits intosonic-net:masterfrom
mykolaf:lldp2

Conversation

@mykolaf
Copy link
Contributor

@mykolaf mykolaf commented Jul 20, 2018

What I did:

  • Implemented lldpRemManAddrTable & lldpLocManAddrTable

Also requires sonic-net/sonic-snmpagent#72

lldpRemManAddrTable

OID SNMP counter Description
1.0.8802.1.1.2.1.4.2.1.1 lldpRemManAddrSubtype The type of management address identifier encoding used in the associated 'lldpRemManagmentAddr' object
1.0.8802.1.1.2.1.4.2.1.2 lldpRemManAddr The string value used to identify the management address component associated with the remote system. The purpose of this address is to contact the management entity
1.0.8802.1.1.2.1.4.2.1.3 lldpRemManAddrIfSubtype The enumeration value that identifies the interface numbering method used for defining the interface number, associated with the remote system
1.0.8802.1.1.2.1.4.2.1.4 lldpRemManAddrIfId The integer value used to identify the interface number regarding the management address component associated with the remote system
1.0.8802.1.1.2.1.4.2.1.5 lldpRemManAddrOID The OID value used to identify the type of hardware component or protocol entity associated with the management address advertised by the remote system agent

lldpLocManAddrTable

OID SNMP counter Description
1.0.8802.1.1.2.1.3.8.1.1 lldpLocManAddrSubtype The type of management address identifier encoding used in the associated 'lldpLocManagmentAddr' object
1.0.8802.1.1.2.1.3.8.1.2 lldpLocManAddr The string value used to identify the management address component associated with the local system. The purpose of this address is to contact the management entity.
1.0.8802.1.1.2.1.3.8.1.3 lldpLocManAddrLen The total length of the management address subtype and the management address fields in LLDPDUs transmitted by the local LLDP agent.
1.0.8802.1.1.2.1.3.8.1.4 lldpLocManAddrIfSubtype The enumeration value that identifies the interface numbering method used for defining the interface number, associated with the local system
1.0.8802.1.1.2.1.3.8.1.5 lldpLocManAddrIfId The integer value used to identify the interface number regarding the management address component associated with the local system.
1.0.8802.1.1.2.1.3.8.1.6 lldpLocManAddrOID The OID value used to identify the type of hardware component or protocol entity associated with the management address advertised by the local system agent.


def run(self):

self.port_table_init()
Copy link
Contributor

@qiluo-msft qiluo-msft Jul 20, 2018

Choose a reason for hiding this comment

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

del the empty line? #Closed

self.config_db.connect()
logger.info("[lldp dbsyncd] Connected to configdb")
self.port_table = {}
self.man_addr = None
Copy link
Contributor

@qiluo-msft qiluo-msft Jul 20, 2018

Choose a reason for hiding this comment

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

man_addr [](start = 13, length = 8)

not used? #Closed

from sonic_syncd import SonicSyncDaemon
from . import logger

MGMT_INTERFACE_PATTERN = r"MGMT_INTERFACE*"
Copy link
Contributor

@qiluo-msft qiluo-msft Jul 20, 2018

Choose a reason for hiding this comment

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

MGMT_INTERFACE_PATTERN [](start = 0, length = 22)

not used? #Closed

self.port_table[key] = data

def run(self):
def man_addr_init(self):
Copy link
Contributor

@qiluo-msft qiluo-msft Jul 20, 2018

Choose a reason for hiding this comment

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

man_addr_init [](start = 8, length = 13)

mgmt_addr_init #Closed

self.config_db.subscribe('PORT', lambda table, key, data:
self.port_handler(key, data))

self.man_addr_init()
Copy link
Contributor

@qiluo-msft qiluo-msft Jul 20, 2018

Choose a reason for hiding this comment

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

man_addr_init [](start = 13, length = 13)

man_addr_init before subscribe? #Closed

@qiluo-msft
Copy link
Contributor

qiluo-msft commented Jul 20, 2018

def parse_update(self, lldp_json):

Could you add or update test cases? #Closed


Refers to: src/lldp_syncd/daemon.py:192 in 7fcf58c. [](commit_id = 7fcf58c, deletion_comment = False)

Copy link
Contributor

@qiluo-msft qiluo-msft left a comment

Choose a reason for hiding this comment

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

As comments

@mykolaf
Copy link
Contributor Author

mykolaf commented Jul 26, 2018

Hi @qiluo-msft , I handled previous comments, can you take a look?

@qiluo-msft
Copy link
Contributor

qiluo-msft commented Aug 1, 2018

SONIC_ETHERNET_RE_PATTERN = r'^(Ethernet(\d+)|eth0)$'

It's normal practice to include management port in the LLDP. We checked at least on one vendor switch OS. #Closed


Refers to: src/lldp_syncd/daemon.py:19 in 4a61ab8. [](commit_id = 4a61ab8, deletion_comment = True)

Copy link
Contributor

@qiluo-msft qiluo-msft left a comment

Choose a reason for hiding this comment

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

As comments

@qiluo-msft qiluo-msft merged commit eeb678c into sonic-net:master Aug 2, 2018
self.hset(h, k, v)

elif db == 4:
with open(INPUT_DIR + '/CONFIG_DB.json') as f:
Copy link
Contributor

Choose a reason for hiding this comment

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

You missed this file?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm afraid so.

@mykolaf mykolaf deleted the lldp2 branch February 18, 2020 13:11
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.

2 participants