To verify that the LLDP_ENTRY_TABLE
entries in the SONiC APPL_DB
correctly reflect the LLDP information for all interfaces and are consistent with the output of lldpctl -f json
under various conditions.
LLDP_ENTRY_TABLE
will be used for SONiC SNMP, the data accuracy is important.
- Objective: Ensure that all interfaces present in the system have corresponding entries in the
LLDP_ENTRY_TABLE
. - Steps:
- Execute the command
sonic-db-cli APPL_DB keys 'LLDP_ENTRY_TABLE:*'
. - Compare the list of interfaces in
LLDP_ENTRY_TABLE
with the expected list of system interfaces.
- Execute the command
- Expected Result: Every active interface in the system should have a corresponding entry in the
LLDP_ENTRY_TABLE
.
- Objective: Ensure that the content of each interface's
LLDP_ENTRY_TABLE
entry matches the output oflldpctl -f json
. - Steps:
- For each interface, retrieve the LLDP information using
sonic-db-cli APPL_DB hgetall LLDP_ENTRY_TABLE:<interface>
. - Retrieve the LLDP information using
lldpctl -f json
and parse the output. - Compare the data from
LLDP_ENTRY_TABLE
with the corresponding data in thelldpctl -f json
output.
- For each interface, retrieve the LLDP information using
- Expected Result: The data in
LLDP_ENTRY_TABLE
should match the data fromlldpctl -f json
for each interface.
- Objective: Ensure that
LLDP_ENTRY_TABLE
entries are correctly updated after an interface flap. - Steps:
- Simulate an interface flap by running
shutdown
andno shutdown
commands on an interface. - Repeat tests from scenarios 1 and 2.
- Simulate an interface flap by running
- Expected Result: The
LLDP_ENTRY_TABLE
should update correctly after the interface flap, and the entries should still match the output oflldpctl -f json
.
- Objective: Ensure that
LLDP_ENTRY_TABLE
entries are correctly updated after restarting the LLDP service. - Steps:
- Restart the LLDP service using the appropriate command.
- Repeat tests from scenarios 1 and 2 after the LLDP service has restarted.
- Expected Result: The
LLDP_ENTRY_TABLE
entries should be updated correctly after the LLDP service restart and should match the output oflldpctl -f json
.
- Objective: Ensure that
LLDP_ENTRY_TABLE
entries are preserved and accurate after a system reboot. - Steps:
- Reboot the SONiC device.
- Repeat tests from scenarios 1 and 2 after the system has fully rebooted.
- Expected Result: The
LLDP_ENTRY_TABLE
entries should persist across reboots and match thelldpctl -f json
output.
- APPL_DB Commands:
sonic-db-cli APPL_DB keys
,sonic-db-cli APPL_DB hgetall
- LLDP Command:
lldpctl -f json
- Interfaces: List of interfaces to be tested, retrieved dynamically from the device.
This test plan outlines the steps required to verify that the LLDP_ENTRY_TABLE
in SONiC's APPL_DB
is correctly populated, updated, and persistent under various conditions. The expected outcomes should confirm that the LLDP_ENTRY_TABLE
is in sync with the LLDP information reported by the lldpctl
command.