Skip to content

Commit

Permalink
[docker-lldp] Fix lldpcli issue when description has special characte…
Browse files Browse the repository at this point in the history
…rs (sonic-net#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 <zxu@linkedin.com>
  • Loading branch information
zhenggen-xu authored and tiantianlv committed Apr 24, 2020
1 parent 6858315 commit b25b6e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dockers/docker-lldp-sv2/lldpmgrd
Original file line number Diff line number Diff line change
Expand Up @@ -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))

Expand Down

0 comments on commit b25b6e0

Please sign in to comment.