Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[LLDP][T2] Advertise Chassis Hostname when present. #19076

Merged
merged 8 commits into from
May 29, 2024
5 changes: 4 additions & 1 deletion dockers/docker-lldp/lldpmgrd
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,10 @@ class LldpManager(daemon_base.DaemonBase):
if not op in ["SET", "DEL"]:
return
self.log_info("Device Config Opcode: {} Dict {} Key {}".format(op, device_dict, key))
hostname = device_dict.get("hostname")
try:
hostname = device_dict["chassis_hostname"]
except:
hostname = device_dict.get("hostname")
if not self.hostname == hostname:
self.log_info("Hostname changed old {0}, new {1}".format(self.hostname, hostname))
self.update_hostname(hostname)
Expand Down
Loading