def get_lldp_neighbors(self):
lldp = junos_views.junos_lldp_table(self.device)<EOL>try:<EOL><INDENT>lldp.get()<EOL><DEDENT>except RpcError as rpcerr:<EOL><INDENT>log.error("<STR_LIT>")<EOL>log.error(py23_compat.text_type(rpcerr))<EOL>return {}<EOL><DEDENT>result = lldp.items()<EOL>neighbors = {}<EOL>for neigh in result:<EOL><INDENT>if neigh[<NUM_LIT:0>] not in neighbors.keys():<EOL><INDENT>neighbors[neigh[<NUM_LIT:0>]] = []<EOL><DEDENT>neighbors[neigh[<NUM_LIT:0>]].append(<EOL>{x[<NUM_LIT:0>]: py23_compat.text_type(x[<NUM_LIT:1>]) for x in neigh[<NUM_LIT:1>]}<EOL>)<EOL><DEDENT>return neighbors<EOL>
Return LLDP neighbors details.