From 02e3cadacfc2316a1a202210ac1b361d739aab15 Mon Sep 17 00:00:00 2001 From: zhenggen-xu Date: Sun, 9 Feb 2020 20:34:55 -0800 Subject: [PATCH] [docker-lldp] Fix lldpcli issue when description has special characters (#4133) Before the fix: lldpcli configure ports Ethernet96 lldp portidsubtype local 'Eth1/1' description 50G|sonic1|Eth1/3/2 bash: sonic1: command not found bash: Eth1/3/2: No such file or directory After fix: lldpcli configure ports Ethernet96 lldp portidsubtype local 'Eth1/1' description '50G|sonic1|Eth1/3/2' run successfully. Signed-off-by: Zhenggen Xu --- dockers/docker-lldp-sv2/lldpmgrd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dockers/docker-lldp-sv2/lldpmgrd b/dockers/docker-lldp-sv2/lldpmgrd index 36b6e67a5f47..7e9ef1642a06 100755 --- a/dockers/docker-lldp-sv2/lldpmgrd +++ b/dockers/docker-lldp-sv2/lldpmgrd @@ -153,7 +153,7 @@ class LldpManager(object): # if there is a description available, also configure that if port_desc: - lldpcli_cmd += " description {}".format(port_desc) + lldpcli_cmd += " description '{}'".format(port_desc) else: log_info("Unable to retrieve description for port '{}'. Not adding port description".format(port_name))