def get_interfaces(self):
interfaces = {}<EOL>command = "<STR_LIT>"<EOL>output = self._send_command(command)<EOL>if not output:<EOL><INDENT>return {}<EOL><DEDENT>separator1 = r"<STR_LIT>"<EOL>separator2 = r"<STR_LIT>"<EOL>separator3 = r"<STR_LIT>"<EOL>separators = r"<STR_LIT>".format(separator1, separator2, separator3)<EOL>interface_lines = re.split(separators, output, flags=re.M)<EOL>if len(interface_lines) == <NUM_LIT:1>:<EOL><INDENT>msg = "<STR_LIT>".format(<EOL>command, interface_lines<EOL>)<EOL>raise ValueError(msg)<EOL><DEDENT>interface_lines.pop(<NUM_LIT:0>)<EOL>if len(interface_lines) % <NUM_LIT:2> != <NUM_LIT:0>:<EOL><INDENT>msg = "<STR_LIT>".format(<EOL>command, interface_lines<EOL>)<EOL>raise ValueError(msg)<EOL><DEDENT>intf_iter = iter(interface_lines)<EOL>try:<EOL><INDENT>new_interfaces = [line + next(intf_iter, "<STR_LIT>") for line in intf_iter]<EOL><DEDENT>except TypeError:<EOL><INDENT>raise ValueError()<EOL><DEDENT>for entry in new_interfaces:<EOL><INDENT>interfaces.update(parse_intf_section(entry))<EOL><DEDENT>return interfaces<EOL>
Get interface details.

last_flapped is not implemented

Example Output:

{   u'Vlan1': {   'description': u'',
              'is_enabled': True,
              'is_up': True,
              'last_flapped': -1.0,
              'mac_address': u'a493.4cc1.67a7',
              'speed': 100},
u'Vlan100': {   'description': u'Data Network',
                'is_enabled': True,
                'is_up': True,
                'last_flapped': -1.0,
                'mac_address': u'a493.4cc1.67a7',
                'speed': 100},
u'Vlan200': {   'description': u'Voice Network',
                'is_enabled': True,
                'is_up': True,
                'last_flapped': -1.0,
                'mac_address': u'a493.4cc1.67a7',
                'speed': 100}}