def get_lldp_neighbors(self):
lldp = {}<EOL>neighbors_detail = self.get_lldp_neighbors_detail()<EOL>for intf_name, entries in neighbors_detail.items():<EOL><INDENT>lldp[intf_name] = []<EOL>for lldp_entry in entries:<EOL><INDENT>hostname = lldp_entry["<STR_LIT>"]<EOL>if not hostname:<EOL><INDENT>hostname = lldp_entry["<STR_LIT>"]<EOL><DEDENT>lldp_dict = {"<STR_LIT:port>": lldp_entry["<STR_LIT>"], "<STR_LIT>": hostname}<EOL>lldp[intf_name].append(lldp_dict)<EOL><DEDENT><DEDENT>return lldp<EOL>
IOS implementation of get_lldp_neighbors.