def get_interfaces(self):
result = {}<EOL>interfaces = junos_views.junos_iface_table(self.device)<EOL>interfaces.get()<EOL>interfaces_logical = junos_views.junos_logical_iface_table(self.device)<EOL>interfaces_logical.get()<EOL>def _convert_to_dict(interfaces):<EOL><INDENT>interfaces = dict(interfaces)<EOL>for iface, iface_data in interfaces.items():<EOL><INDENT>result[iface] = {<EOL>"<STR_LIT>": iface_data["<STR_LIT>"],<EOL>"<STR_LIT>": (<EOL>True<EOL>if iface_data["<STR_LIT>"] is None<EOL>else iface_data["<STR_LIT>"]<EOL>),<EOL>"<STR_LIT:description>": (iface_data["<STR_LIT:description>"] or "<STR_LIT>"),<EOL>"<STR_LIT>": float((iface_data["<STR_LIT>"] or -<NUM_LIT:1>)),<EOL>"<STR_LIT>": napalm.base.helpers.convert(<EOL>napalm.base.helpers.mac,<EOL>iface_data["<STR_LIT>"],<EOL>py23_compat.text_type(iface_data["<STR_LIT>"]),<EOL>),<EOL>"<STR_LIT>": -<NUM_LIT:1>,<EOL>"<STR_LIT>": <NUM_LIT:0>,<EOL>}<EOL>match_mtu = re.search(r"<STR_LIT>", str(iface_data["<STR_LIT>"]) or "<STR_LIT>")<EOL>mtu = napalm.base.helpers.convert(int, match_mtu.group(<NUM_LIT:0>), <NUM_LIT:0>)<EOL>result[iface]["<STR_LIT>"] = mtu<EOL>match = re.search(r"<STR_LIT>", iface_data["<STR_LIT>"] or "<STR_LIT>")<EOL>if match and match.group(<NUM_LIT:1>).lower() == "<STR_LIT>":<EOL><INDENT>match = re.search(<EOL>r"<STR_LIT>", iface_data["<STR_LIT>"] or "<STR_LIT>"<EOL>)<EOL><DEDENT>if match is None:<EOL><INDENT>continue<EOL><DEDENT>speed_value = napalm.base.helpers.convert(int, match.group(<NUM_LIT:1>), -<NUM_LIT:1>)<EOL>if speed_value == -<NUM_LIT:1>:<EOL><INDENT>continue<EOL><DEDENT>speed_unit = match.group(<NUM_LIT:2>)<EOL>if speed_unit.lower() == "<STR_LIT>":<EOL><INDENT>speed_value *= <NUM_LIT:1000><EOL><DEDENT>result[iface]["<STR_LIT>"] = speed_value<EOL><DEDENT>return result<EOL><DEDENT>result = _convert_to_dict(interfaces)<EOL>result.update(_convert_to_dict(interfaces_logical))<EOL>return result<EOL>
Return interfaces details.