def get_lldp_neighbors_detail(self, interface="<STR_LIT>"):
lldp_neighbors = defaultdict(list)<EOL>lldp_table = junos_views.junos_lldp_neighbors_detail_table(self.device)<EOL>if not interface:<EOL><INDENT>try:<EOL><INDENT>lldp_table.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>interfaces = lldp_table.get().keys()<EOL><DEDENT>else:<EOL><INDENT>interfaces = [interface]<EOL><DEDENT>if self.device.facts.get("<STR_LIT>") == "<STR_LIT>":<EOL><INDENT>lldp_table.GET_RPC = "<STR_LIT>"<EOL>interface_variable = "<STR_LIT>"<EOL>alt_rpc = "<STR_LIT>"<EOL>alt_interface_variable = "<STR_LIT>"<EOL><DEDENT>else:<EOL><INDENT>lldp_table.GET_RPC = "<STR_LIT>"<EOL>interface_variable = "<STR_LIT>"<EOL>alt_rpc = "<STR_LIT>"<EOL>alt_interface_variable = "<STR_LIT>"<EOL><DEDENT>for interface in interfaces:<EOL><INDENT>try:<EOL><INDENT>interface_args = {interface_variable: interface}<EOL>lldp_table.get(**interface_args)<EOL><DEDENT>except RpcError as e:<EOL><INDENT>if "<STR_LIT>" in e.message:<EOL><INDENT>lldp_table.GET_RPC = alt_rpc<EOL>interface_variable = alt_interface_variable<EOL>interface_args = {interface_variable: interface}<EOL>lldp_table.get(**interface_args)<EOL><DEDENT><DEDENT>for item in lldp_table:<EOL><INDENT>lldp_neighbors[interface].append(<EOL>{<EOL>"<STR_LIT>": item.parent_interface,<EOL>"<STR_LIT>": item.remote_port or "<STR_LIT>",<EOL>"<STR_LIT>": napalm.base.helpers.convert(<EOL>napalm.base.helpers.mac,<EOL>item.remote_chassis_id,<EOL>item.remote_chassis_id,<EOL>),<EOL>"<STR_LIT>": napalm.base.helpers.convert(<EOL>py23_compat.text_type, item.remote_port_description<EOL>),<EOL>"<STR_LIT>": item.remote_system_name,<EOL>"<STR_LIT>": item.remote_system_description,<EOL>"<STR_LIT>": self._transform_lldp_capab(<EOL>item.remote_system_capab<EOL>),<EOL>"<STR_LIT>": self._transform_lldp_capab(<EOL>item.remote_system_enable_capab<EOL>),<EOL>}<EOL>)<EOL><DEDENT><DEDENT>return lldp_neighbors<EOL>
Detailed view of the LLDP neighbors.