< Home

Enabling the Switch to Automatically Execute the Python Script After the LLDP Neighbor Changes

Prerequisites

  1. The Python script automatically executed after the LLDP neighbor changes has been prepared, uploaded, and installed, and the Python script assistant has been configured. For details, see "Configuring OPS" in OPS Configuration in S2720, S5700, and S6700 V200R019C10 Configuration Guide - Device Management.
  2. LLDP has been enabled globally using the lldp enable (system view) command.

Context

The configuration workload can be reduced after the switch is enabled to automatically execute the Python script after the LLDP neighbor changes.

If a switch has multiple types of LLDP neighbors and needs to deliver different configurations to different types of LLDP neighbors, configure the Python script in advance and run the lldp device-classifier enable command to enable the switch to automatically execute the Python script after the LLDP neighbor changes. If the switch detects that a specified type of LLDP neighbor is added or deleted on an interface, the switch automatically delivers the predefined configuration in the Python script, reducing the configuration workload.

Procedure

  1. Run system-view

    The system view is displayed.

  2. Run lldp device-classifier enable

    The switch is enabled to automatically execute the Python script after the LLDP neighbor changes.

    By default, the switch is enabled to automatically execute the Python script after the LLDP neighbor changes.

Verifying the Configuration

Run the display lldp device-classifier information command to view the LLDP neighbor information on the switch.

Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic