def cli(self, interface='', output=None):
    if (output is None):
        if interface:
            cmd = self.cli_command[1].format(interface=interface)
        else:
            cmd = self.cli_command[0]
        out = self.device.execute(cmd)
    else:
        out = output
    interface_dict = {}
    unnumbered_dict = {}
    for line in out.splitlines():
        line = line.strip()
        p1 = re.compile('^(?P<interface>[\\w\\/\\.\\-]+) +is +(?P<enabled>[\\w\\s]+), +line +protocol +is +(?P<oper_status>\\w+)$')
        m = p1.match(line)
        if m:
            interface = m.groupdict()['interface']
            enabled = m.groupdict()['enabled'].lower()
            if (interface not in interface_dict):
                interface_dict[interface] = {}
            if (('administratively down' in enabled) or ('delete' in enabled)):
                interface_dict[interface]['enabled'] = False
            else:
                interface_dict[interface]['enabled'] = True
            interface_dict[interface]['oper_status'] = m.groupdict()['oper_status'].lower()
            multicast_groups = []
            continue
        p2 = re.compile('^Internet +[A|a]ddress +is +(?P<ipv4>(?P<ip>[0-9\\.]+)\\/(?P<prefix_length>[0-9]+))$')
        m = p2.match(line)
        if m:
            ip = m.groupdict()['ip']
            prefix_length = m.groupdict()['prefix_length']
            address = m.groupdict()['ipv4']
            if ('ipv4' not in interface_dict[interface]):
                interface_dict[interface]['ipv4'] = {}
            if (address not in interface_dict[interface]['ipv4']):
                interface_dict[interface]['ipv4'][address] = {}
            interface_dict[interface]['ipv4'][address]['ip'] = ip
            interface_dict[interface]['ipv4'][address]['prefix_length'] = prefix_length
            interface_dict[interface]['ipv4'][address]['secondary'] = False
            continue
        p2_0 = re.compile('^Interface +is +unnumbered. +Using +address +of +(\\S+) +\\((?P<ipv4>(?P<ip>[0-9\\.]+))\\)$')
        m = p2_0.match(line)
        if m:
            ip = m.groupdict()['ip']
            address = m.groupdict()['ipv4']
            if ('ipv4' not in interface_dict[interface]):
                interface_dict[interface]['ipv4'] = {}
            if (address not in interface_dict[interface]['ipv4']):
                interface_dict[interface]['ipv4'][address] = {}
            interface_dict[interface]['ipv4'][address]['ip'] = ip
            interface_dict[interface]['ipv4'][address]['secondary'] = False
            continue
        p2_1 = re.compile('^Secondary +address +(?P<ipv4>(?P<ip>[0-9\\.]+)\\/(?P<prefix_length>[0-9]+))$')
        m = p2_1.match(line)
        if m:
            ip = m.groupdict()['ip']
            prefix_length = m.groupdict()['prefix_length']
            address = m.groupdict()['ipv4']
            if ('ipv4' not in interface_dict[interface]):
                interface_dict[interface]['ipv4'] = {}
            if (address not in interface_dict[interface]['ipv4']):
                interface_dict[interface]['ipv4'][address] = {}
            interface_dict[interface]['ipv4'][address]['ip'] = ip
            interface_dict[interface]['ipv4'][address]['prefix_length'] = prefix_length
            interface_dict[interface]['ipv4'][address]['secondary'] = True
            continue
        p2_2 = re.compile('^Internet +[A|a]ddress +will +be +negotiated +using +(?P<negotiated>DHCP|IPCP)$')
        m = p2_2.match(line)
        if m:
            negotiated_holder = m.groupdict()
            if ('DHCP' in negotiated_holder.get('negotiated')):
                address = 'dhcp_negotiated'
            if ('IPCP' in negotiated_holder.get('negotiated')):
                address = 'ipcp_negotiated'
            ipv4_dict = interface_dict[interface].setdefault('ipv4', {})
            ipv4_dict.setdefault(address, {})
            ipv4_dict[address]['ip'] = address
            continue
        p3 = re.compile('^Broadcast +address +is +(?P<address>[\\w\\.\\:]+)$')
        m = p3.match(line)
        if m:
            interface_dict[interface]['ipv4'][address]['broadcast_address'] = m.groupdict()['address']
            continue
        p36 = re.compile('^Address +determined +by +(?P<file>[\\w\\s\\-]+)$')
        m = p36.match(line)
        if m:
            interface_dict[interface]['address_determined_by'] = m.groupdict()['file']
            continue
        p4 = re.compile('^MTU +is +(?P<mtu>\\d+) +bytes$')
        m = p4.match(line)
        if m:
            interface_dict[interface]['mtu'] = int(m.groupdict()['mtu'])
            continue
        p5 = re.compile('^Helper +address +is +not +set$')
        m = p5.match(line)
        if m:
            continue
        p5_0 = re.compile('^Helper +address +is +(?P<address>[\\d\\.]+)$')
        m = p5_0.match(line)
        if m:
            interface_dict[interface]['helper_address'] = [m.groupdict()['address']]
            continue
        p5_1 = re.compile('^Helper +addresses +are +(?P<address>[\\w\\.\\:\\s]+)$')
        m = p5_1.match(line)
        if m:
            helper_flag = True
            if ('not set' not in m.groupdict()['address']):
                helper_list = []
                helper_list.append(m.groupdict()['address'])
                interface_dict[interface]['helper_address'] = helper_list
            continue
        p5_2 = re.compile('^(?P<address>[\\d\\.]+)$')
        m = p5_2.match(line)
        if m:
            if helper_flag:
                helper_list.append(m.groupdict()['address'])
                continue
        else:
            helper_flag = False
        p6 = re.compile('^Directed +broadcast +forwarding +is +(?P<status>\\w+)$')
        m = p6.match(line)
        if m:
            if ('disabled' in m.groupdict()['status']):
                interface_dict[interface]['directed_broadcast_forwarding'] = False
            else:
                interface_dict[interface]['directed_broadcast_forwarding'] = True
            continue
        p41 = re.compile('^Multicast +reserved +groups +joined: +(?P<multicast_groups>[\\w\\s\\.]+)$')
        m = p41.match(line)
        if m:
            multicast_groups_address = str(m.groupdict()['multicast_groups'])
            multicast_groups = multicast_groups_address.split()
            interface_dict[interface]['multicast_groups'] = sorted(multicast_groups)
            continue
        p41_1 = re.compile('(?P<multicast_groups>\\d+\\.\\d+\\.\\d+\\.\\d+)')
        m = p41_1.findall(line)
        if (m and multicast_groups):
            multicast_groups.extend(m)
            interface_dict[interface]['multicast_groups'] = sorted(multicast_groups)
            continue
        p7 = re.compile('^Outgoing +Common +access +list +is +(?P<access_list>.+)$')
        m = p7.match(line)
        if m:
            if ('not set' not in m.groupdict()['access_list']):
                interface_dict[interface]['outbound_common_access_list'] = m.groupdict()['access_list']
            continue
        p8 = re.compile('^Outgoing +access +list +is +(?P<access_list>.+)$')
        m = p8.match(line)
        if m:
            if ('not set' not in m.groupdict()['access_list']):
                interface_dict[interface]['outbound_access_list'] = m.groupdict()['access_list']
            continue
        p9 = re.compile('^Inbound +Common +access +list +is +(?P<access_list>.+)$')
        m = p9.match(line)
        if m:
            if ('not set' not in m.groupdict()['access_list']):
                interface_dict[interface]['inbound_common_access_list'] = m.groupdict()['access_list']
            continue
        p10 = re.compile('^Inbound +access +list +is +(?P<access_list>.+)$')
        m = p10.match(line)
        if m:
            if ('not set' not in m.groupdict()['access_list']):
                interface_dict[interface]['inbound_access_list'] = m.groupdict()['access_list']
            continue
        p11 = re.compile('^Proxy +ARP +is +(?P<status>\\w+)$')
        m = p11.match(line)
        if m:
            if ('disabled' in m.groupdict()['status']):
                interface_dict[interface]['proxy_arp'] = False
            else:
                interface_dict[interface]['proxy_arp'] = True
            continue
        p12 = re.compile('^Local +Proxy +ARP +is +(?P<status>\\w+)$')
        m = p12.match(line)
        if m:
            if ('disabled' in m.groupdict()['status']):
                interface_dict[interface]['local_proxy_arp'] = False
            else:
                interface_dict[interface]['local_proxy_arp'] = True
            continue
        p13 = re.compile('^Security +level +is +(?P<level>\\w+)$')
        m = p13.match(line)
        if m:
            interface_dict[interface]['security_level'] = m.groupdict()['level']
            continue
        p14 = re.compile('^Split +horizon +is +(?P<status>\\w+)$')
        m = p14.match(line)
        if m:
            if ('disabled' in m.groupdict()['status']):
                interface_dict[interface]['split_horizon'] = False
            else:
                interface_dict[interface]['split_horizon'] = True
            continue
        p15 = re.compile('^ICMP +redirects +are +(?P<sent>[\\w\\s]+)$')
        m = p15.match(line)
        if m:
            if ('icmp' not in interface_dict[interface]):
                interface_dict[interface]['icmp'] = {}
            if ('not set' not in m.groupdict()['sent']):
                interface_dict[interface]['icmp']['redirects'] = m.groupdict()['sent']
            continue
        p16 = re.compile('^ICMP +unreachables +are +(?P<sent>[\\w\\s]+)$')
        m = p16.match(line)
        if m:
            if ('icmp' not in interface_dict[interface]):
                interface_dict[interface]['icmp'] = {}
            if ('not set' not in m.groupdict()['sent']):
                interface_dict[interface]['icmp']['unreachables'] = m.groupdict()['sent']
            continue
        p17 = re.compile('^ICMP +mask +replies +are +(?P<sent>[\\w\\s]+)$')
        m = p17.match(line)
        if m:
            if ('icmp' not in interface_dict[interface]):
                interface_dict[interface]['icmp'] = {}
            if ('not set' not in m.groupdict()['sent']):
                interface_dict[interface]['icmp']['mask_replies'] = m.groupdict()['sent']
            continue
        p18 = re.compile('^IP +fast +switching +is +(?P<status>\\w+)$')
        m = p18.match(line)
        if m:
            if ('disabled' in m.groupdict()['status']):
                interface_dict[interface]['ip_fast_switching'] = False
            else:
                interface_dict[interface]['ip_fast_switching'] = True
            continue
        p19 = re.compile('^IP +Flow +switching +is +(?P<status>\\w+)$')
        m = p19.match(line)
        if m:
            if ('disabled' in m.groupdict()['status']):
                interface_dict[interface]['ip_flow_switching'] = False
            else:
                interface_dict[interface]['ip_flow_switching'] = True
            continue
        p20 = re.compile('^IP +CEF +switching +is +(?P<status>\\w+)$')
        m = p20.match(line)
        if m:
            if ('disabled' in m.groupdict()['status']):
                interface_dict[interface]['ip_cef_switching'] = False
            else:
                interface_dict[interface]['ip_cef_switching'] = True
            continue
        p21 = re.compile('^IP +CEF +switching +turbo +vector$')
        m = p21.match(line)
        if m:
            interface_dict[interface]['ip_cef_switching_turbo_vector'] = True
            continue
        p22 = re.compile('^IP +Null +turbo +vector$')
        m = p22.match(line)
        if m:
            interface_dict[interface]['ip_null_turbo_vector'] = True
            continue
        p23 = re.compile('^VPN +Routing\\/Forwarding +\\"(?P<vrf>[\\w\\-]+)\\"$')
        m = p23.match(line)
        if m:
            interface_dict[interface]['vrf'] = m.groupdict()['vrf']
            continue
        p24 = re.compile('^Associated +unicast +routing +topologies:$')
        m = p24.match(line)
        if m:
            if ('unicast_routing_topologies' not in interface_dict[interface]):
                interface_dict[interface]['unicast_routing_topologies'] = {}
            continue
        p24_1 = re.compile('^Topology +\\"(?P<topo>\\w+)\\", +operation +state +is +(?P<topo_status>\\w+)$')
        m = p24_1.match(line)
        if m:
            if ('unicast_routing_topologies' in interface_dict[interface]):
                if ('topology' not in interface_dict[interface]['unicast_routing_topologies']):
                    interface_dict[interface]['unicast_routing_topologies']['topology'] = {}
                topo = m.groupdict()['topo']
                if (topo not in interface_dict[interface]['unicast_routing_topologies']['topology']):
                    interface_dict[interface]['unicast_routing_topologies']['topology'][topo] = {}
                interface_dict[interface]['unicast_routing_topologies']['topology'][topo]['status'] = m.groupdict()['topo_status'].lower()
            continue
        p25 = re.compile('^IP +multicast +fast +switching +is +(?P<status>\\w+)$')
        m = p25.match(line)
        if m:
            if ('disabled' in m.groupdict()['status']):
                interface_dict[interface]['ip_multicast_fast_switching'] = False
            else:
                interface_dict[interface]['ip_multicast_fast_switching'] = True
            continue
        p25 = re.compile('^IP +multicast +distributed +fast +switching +is +(?P<status>\\w+)$')
        m = p25.match(line)
        if m:
            if ('disabled' in m.groupdict()['status']):
                interface_dict[interface]['ip_multicast_distributed_fast_switching'] = False
            else:
                interface_dict[interface]['ip_multicast_distributed_fast_switching'] = True
            continue
        p26 = re.compile('^IP +route\\-cache +flags +are +(?P<flags>[\\w\\s\\,]+)$')
        m = p26.match(line)
        if m:
            ret = m.groupdict()['flags'].split(',')
            ret = [i.strip() for i in ret]
            interface_dict[interface]['ip_route_cache_flags'] = sorted(ret)
            continue
        p27 = re.compile('^Router +Discovery +is +(?P<status>\\w+)$')
        m = p27.match(line)
        if m:
            if ('disabled' in m.groupdict()['status']):
                interface_dict[interface]['router_discovery'] = False
            else:
                interface_dict[interface]['router_discovery'] = True
            continue
        p28 = re.compile('^IP +output +packet +accounting +is +(?P<status>\\w+)$')
        m = p28.match(line)
        if m:
            if ('disabled' in m.groupdict()['status']):
                interface_dict[interface]['ip_output_packet_accounting'] = False
            else:
                interface_dict[interface]['ip_output_packet_accounting'] = True
            continue
        p29 = re.compile('^IP +access +violation +accounting +is +(?P<status>\\w+)$')
        m = p29.match(line)
        if m:
            if ('disabled' in m.groupdict()['status']):
                interface_dict[interface]['ip_access_violation_accounting'] = False
            else:
                interface_dict[interface]['ip_access_violation_accounting'] = True
            continue
        p30 = re.compile('^TCP\\/IP +header +compression +is +(?P<status>\\w+)$')
        m = p30.match(line)
        if m:
            if ('disabled' in m.groupdict()['status']):
                interface_dict[interface]['tcp_ip_header_compression'] = False
            else:
                interface_dict[interface]['tcp_ip_header_compression'] = True
            continue
        p31 = re.compile('^RTP\\/IP +header +compression +is +(?P<status>\\w+)$')
        m = p31.match(line)
        if m:
            if ('disabled' in m.groupdict()['status']):
                interface_dict[interface]['rtp_ip_header_compression'] = False
            else:
                interface_dict[interface]['rtp_ip_header_compression'] = True
            continue
        p32 = re.compile('^Probe +proxy +name +replies +are +(?P<status>\\w+)$')
        m = p32.match(line)
        if m:
            if ('disabled' in m.groupdict()['status']):
                interface_dict[interface]['probe_proxy_name_replies'] = False
            else:
                interface_dict[interface]['probe_proxy_name_replies'] = True
            continue
        p33 = re.compile('^Policy +routing +is +(?P<status>\\w+)$')
        m = p33.match(line)
        if m:
            if ('disabled' in m.groupdict()['status']):
                interface_dict[interface]['policy_routing'] = False
            else:
                interface_dict[interface]['policy_routing'] = True
            continue
        p34 = re.compile('^Network +address +translation +is +(?P<status>\\w+)$')
        m = p34.match(line)
        if m:
            if ('disabled' in m.groupdict()['status']):
                interface_dict[interface]['network_address_translation'] = False
            else:
                interface_dict[interface]['network_address_translation'] = True
            continue
        p35 = re.compile('^BGP +Policy +Mapping +is +(?P<status>\\w+)$')
        m = p35.match(line)
        if m:
            if ('disabled' in m.groupdict()['status']):
                interface_dict[interface]['bgp_policy_mapping'] = False
            else:
                interface_dict[interface]['bgp_policy_mapping'] = True
            continue
        p36 = re.compile('^Input +features: +(?P<input_feature>[\\w\\s\\,]+)$')
        m = p36.match(line)
        if m:
            features = m.groupdict()['input_feature'].split(',')
            features = [i.strip() for i in features]
            interface_dict[interface]['input_features'] = sorted(features)
            continue
        p37 = re.compile('^IPv4 +WCCP +Redirect +outbound +is +(?P<status>\\w+)$')
        m = p37.match(line)
        if m:
            if ('wccp' not in interface_dict[interface]):
                interface_dict[interface]['wccp'] = {}
            if ('disabled' in m.groupdict()['status']):
                interface_dict[interface]['wccp']['redirect_outbound'] = False
            else:
                interface_dict[interface]['wccp']['redirect_outbound'] = True
            continue
        p38 = re.compile('^IPv4 +WCCP +Redirect +inbound +is +(?P<status>\\w+)$')
        m = p38.match(line)
        if m:
            if ('wccp' not in interface_dict[interface]):
                interface_dict[interface]['wccp'] = {}
            if ('disabled' in m.groupdict()['status']):
                interface_dict[interface]['wccp']['redirect_inbound'] = False
            else:
                interface_dict[interface]['wccp']['redirect_inbound'] = True
        p39 = re.compile('^IPv4 +WCCP +Redirect +exclude +is +(?P<status>\\w+)$')
        m = p39.match(line)
        if m:
            if ('wccp' not in interface_dict[interface]):
                interface_dict[interface]['wccp'] = {}
            if ('disabled' in m.groupdict()['status']):
                interface_dict[interface]['wccp']['redirect_exclude'] = False
            else:
                interface_dict[interface]['wccp']['redirect_exclude'] = True
        p40 = re.compile('^Interface +is +unnumbered. +Using +address +of +(?P<unnumbered_intf>[\\w\\/\\-\\.]+) +\\((?P<unnumbered_ip>[\\w\\.\\:]+)\\)$')
        m = p40.match(line)
        if m:
            unnumbered_dict[interface] = {}
            unnumbered_intf = m.groupdict()['unnumbered_intf']
            unnumbered_ip = m.groupdict()['unnumbered_ip']
            unnumbered_dict[interface]['unnumbered_intf'] = unnumbered_intf
            unnumbered_dict[interface]['unnumbered_ip'] = unnumbered_ip
            if (unnumbered_intf in interface_dict):
                if ('ipv4' in interface_dict[unnumbered_intf]):
                    for address in interface_dict[unnumbered_intf]['ipv4']:
                        if (unnumbered_ip in address):
                            ip_dict = interface_dict[interface].setdefault('ipv4', {}).setdefault(address, {})
                            m = re.search('([\\w\\.\\:]+)\\/(\\d+)', address)
                            ip_dict['ip'] = m.groups()[0]
                            ip_dict['prefix_length'] = m.groups()[1]
                            ip_dict['secondary'] = False
                            break
            else:
                address = unnumbered_ip
                if ('ipv4' not in interface_dict[interface]):
                    interface_dict[interface]['ipv4'] = {}
                if (address not in interface_dict[interface]['ipv4']):
                    interface_dict[interface]['ipv4'][address] = {}
                interface_dict[interface]['ipv4'][address]['ip'] = address
            continue
    return interface_dict
def cli(self, interface=, output=None):
    if (output is None):
        if interface:
            cmd = self.cli_command[1].format(interface=interface)
        else:
            cmd = self.cli_command[0]
        out = self.device.execute(cmd)
    else:
        out = output
    interface_dict = {}
    unnumbered_dict = {}
    for line in out.splitlines():
        line = line.strip()
        p1 = re.compile('^(?P<interface>[\\w\\/\\.\\-]+) +is +(?P<enabled>[\\w\\s]+), +line +protocol +is +(?P<oper_status>\\w+)$')
        m = p1.match(line)
        if m:
            interface = m.groupdict()['interface']
            enabled = m.groupdict()['enabled'].lower()
            if (interface not in interface_dict):
                interface_dict[interface] = {}
            if (('administratively down' in enabled) or ('delete' in enabled)):
                interface_dict[interface]['enabled'] = False
            else:
                interface_dict[interface]['enabled'] = True
            interface_dict[interface]['oper_status'] = m.groupdict()['oper_status'].lower()
            multicast_groups = []
            continue
        p2 = re.compile('^Internet +[A|a]ddress +is +(?P<ipv4>(?P<ip>[0-9\\.]+)\\/(?P<prefix_length>[0-9]+))$')
        m = p2.match(line)
        if m:
            ip = m.groupdict()['ip']
            prefix_length = m.groupdict()['prefix_length']
            address = m.groupdict()['ipv4']
            if ('ipv4' not in interface_dict[interface]):
                interface_dict[interface]['ipv4'] = {}
            if (address not in interface_dict[interface]['ipv4']):
                interface_dict[interface]['ipv4'][address] = {}
            interface_dict[interface]['ipv4'][address]['ip'] = ip
            interface_dict[interface]['ipv4'][address]['prefix_length'] = prefix_length
            interface_dict[interface]['ipv4'][address]['secondary'] = False
            continue
        p2_0 = re.compile('^Interface +is +unnumbered. +Using +address +of +(\\S+) +\\((?P<ipv4>(?P<ip>[0-9\\.]+))\\)$')
        m = p2_0.match(line)
        if m:
            ip = m.groupdict()['ip']
            address = m.groupdict()['ipv4']
            if ('ipv4' not in interface_dict[interface]):
                interface_dict[interface]['ipv4'] = {}
            if (address not in interface_dict[interface]['ipv4']):
                interface_dict[interface]['ipv4'][address] = {}
            interface_dict[interface]['ipv4'][address]['ip'] = ip
            interface_dict[interface]['ipv4'][address]['secondary'] = False
            continue
        p2_1 = re.compile('^Secondary +address +(?P<ipv4>(?P<ip>[0-9\\.]+)\\/(?P<prefix_length>[0-9]+))$')
        m = p2_1.match(line)
        if m:
            ip = m.groupdict()['ip']
            prefix_length = m.groupdict()['prefix_length']
            address = m.groupdict()['ipv4']
            if ('ipv4' not in interface_dict[interface]):
                interface_dict[interface]['ipv4'] = {}
            if (address not in interface_dict[interface]['ipv4']):
                interface_dict[interface]['ipv4'][address] = {}
            interface_dict[interface]['ipv4'][address]['ip'] = ip
            interface_dict[interface]['ipv4'][address]['prefix_length'] = prefix_length
            interface_dict[interface]['ipv4'][address]['secondary'] = True
            continue
        p2_2 = re.compile('^Internet +[A|a]ddress +will +be +negotiated +using +(?P<negotiated>DHCP|IPCP)$')
        m = p2_2.match(line)
        if m:
            negotiated_holder = m.groupdict()
            if ('DHCP' in negotiated_holder.get('negotiated')):
                address = 'dhcp_negotiated'
            if ('IPCP' in negotiated_holder.get('negotiated')):
                address = 'ipcp_negotiated'
            ipv4_dict = interface_dict[interface].setdefault('ipv4', {})
            ipv4_dict.setdefault(address, {})
            ipv4_dict[address]['ip'] = address
            continue
        p3 = re.compile('^Broadcast +address +is +(?P<address>[\\w\\.\\:]+)$')
        m = p3.match(line)
        if m:
            interface_dict[interface]['ipv4'][address]['broadcast_address'] = m.groupdict()['address']
            continue
        p36 = re.compile('^Address +determined +by +(?P<file>[\\w\\s\\-]+)$')
        m = p36.match(line)
        if m:
            interface_dict[interface]['address_determined_by'] = m.groupdict()['file']
            continue
        p4 = re.compile('^MTU +is +(?P<mtu>\\d+) +bytes$')
        m = p4.match(line)
        if m:
            interface_dict[interface]['mtu'] = int(m.groupdict()['mtu'])
            continue
        p5 = re.compile('^Helper +address +is +not +set$')
        m = p5.match(line)
        if m:
            continue
        p5_0 = re.compile('^Helper +address +is +(?P<address>[\\d\\.]+)$')
        m = p5_0.match(line)
        if m:
            interface_dict[interface]['helper_address'] = [m.groupdict()['address']]
            continue
        p5_1 = re.compile('^Helper +addresses +are +(?P<address>[\\w\\.\\:\\s]+)$')
        m = p5_1.match(line)
        if m:
            helper_flag = True
            if ('not set' not in m.groupdict()['address']):
                helper_list = []
                helper_list.append(m.groupdict()['address'])
                interface_dict[interface]['helper_address'] = helper_list
            continue
        p5_2 = re.compile('^(?P<address>[\\d\\.]+)$')
        m = p5_2.match(line)
        if m:
            if helper_flag:
                helper_list.append(m.groupdict()['address'])
                continue
        else:
            helper_flag = False
        p6 = re.compile('^Directed +broadcast +forwarding +is +(?P<status>\\w+)$')
        m = p6.match(line)
        if m:
            if ('disabled' in m.groupdict()['status']):
                interface_dict[interface]['directed_broadcast_forwarding'] = False
            else:
                interface_dict[interface]['directed_broadcast_forwarding'] = True
            continue
        p41 = re.compile('^Multicast +reserved +groups +joined: +(?P<multicast_groups>[\\w\\s\\.]+)$')
        m = p41.match(line)
        if m:
            multicast_groups_address = str(m.groupdict()['multicast_groups'])
            multicast_groups = multicast_groups_address.split()
            interface_dict[interface]['multicast_groups'] = sorted(multicast_groups)
            continue
        p41_1 = re.compile('(?P<multicast_groups>\\d+\\.\\d+\\.\\d+\\.\\d+)')
        m = p41_1.findall(line)
        if (m and multicast_groups):
            multicast_groups.extend(m)
            interface_dict[interface]['multicast_groups'] = sorted(multicast_groups)
            continue
        p7 = re.compile('^Outgoing +Common +access +list +is +(?P<access_list>.+)$')
        m = p7.match(line)
        if m:
            if ('not set' not in m.groupdict()['access_list']):
                interface_dict[interface]['outbound_common_access_list'] = m.groupdict()['access_list']
            continue
        p8 = re.compile('^Outgoing +access +list +is +(?P<access_list>.+)$')
        m = p8.match(line)
        if m:
            if ('not set' not in m.groupdict()['access_list']):
                interface_dict[interface]['outbound_access_list'] = m.groupdict()['access_list']
            continue
        p9 = re.compile('^Inbound +Common +access +list +is +(?P<access_list>.+)$')
        m = p9.match(line)
        if m:
            if ('not set' not in m.groupdict()['access_list']):
                interface_dict[interface]['inbound_common_access_list'] = m.groupdict()['access_list']
            continue
        p10 = re.compile('^Inbound +access +list +is +(?P<access_list>.+)$')
        m = p10.match(line)
        if m:
            if ('not set' not in m.groupdict()['access_list']):
                interface_dict[interface]['inbound_access_list'] = m.groupdict()['access_list']
            continue
        p11 = re.compile('^Proxy +ARP +is +(?P<status>\\w+)$')
        m = p11.match(line)
        if m:
            if ('disabled' in m.groupdict()['status']):
                interface_dict[interface]['proxy_arp'] = False
            else:
                interface_dict[interface]['proxy_arp'] = True
            continue
        p12 = re.compile('^Local +Proxy +ARP +is +(?P<status>\\w+)$')
        m = p12.match(line)
        if m:
            if ('disabled' in m.groupdict()['status']):
                interface_dict[interface]['local_proxy_arp'] = False
            else:
                interface_dict[interface]['local_proxy_arp'] = True
            continue
        p13 = re.compile('^Security +level +is +(?P<level>\\w+)$')
        m = p13.match(line)
        if m:
            interface_dict[interface]['security_level'] = m.groupdict()['level']
            continue
        p14 = re.compile('^Split +horizon +is +(?P<status>\\w+)$')
        m = p14.match(line)
        if m:
            if ('disabled' in m.groupdict()['status']):
                interface_dict[interface]['split_horizon'] = False
            else:
                interface_dict[interface]['split_horizon'] = True
            continue
        p15 = re.compile('^ICMP +redirects +are +(?P<sent>[\\w\\s]+)$')
        m = p15.match(line)
        if m:
            if ('icmp' not in interface_dict[interface]):
                interface_dict[interface]['icmp'] = {}
            if ('not set' not in m.groupdict()['sent']):
                interface_dict[interface]['icmp']['redirects'] = m.groupdict()['sent']
            continue
        p16 = re.compile('^ICMP +unreachables +are +(?P<sent>[\\w\\s]+)$')
        m = p16.match(line)
        if m:
            if ('icmp' not in interface_dict[interface]):
                interface_dict[interface]['icmp'] = {}
            if ('not set' not in m.groupdict()['sent']):
                interface_dict[interface]['icmp']['unreachables'] = m.groupdict()['sent']
            continue
        p17 = re.compile('^ICMP +mask +replies +are +(?P<sent>[\\w\\s]+)$')
        m = p17.match(line)
        if m:
            if ('icmp' not in interface_dict[interface]):
                interface_dict[interface]['icmp'] = {}
            if ('not set' not in m.groupdict()['sent']):
                interface_dict[interface]['icmp']['mask_replies'] = m.groupdict()['sent']
            continue
        p18 = re.compile('^IP +fast +switching +is +(?P<status>\\w+)$')
        m = p18.match(line)
        if m:
            if ('disabled' in m.groupdict()['status']):
                interface_dict[interface]['ip_fast_switching'] = False
            else:
                interface_dict[interface]['ip_fast_switching'] = True
            continue
        p19 = re.compile('^IP +Flow +switching +is +(?P<status>\\w+)$')
        m = p19.match(line)
        if m:
            if ('disabled' in m.groupdict()['status']):
                interface_dict[interface]['ip_flow_switching'] = False
            else:
                interface_dict[interface]['ip_flow_switching'] = True
            continue
        p20 = re.compile('^IP +CEF +switching +is +(?P<status>\\w+)$')
        m = p20.match(line)
        if m:
            if ('disabled' in m.groupdict()['status']):
                interface_dict[interface]['ip_cef_switching'] = False
            else:
                interface_dict[interface]['ip_cef_switching'] = True
            continue
        p21 = re.compile('^IP +CEF +switching +turbo +vector$')
        m = p21.match(line)
        if m:
            interface_dict[interface]['ip_cef_switching_turbo_vector'] = True
            continue
        p22 = re.compile('^IP +Null +turbo +vector$')
        m = p22.match(line)
        if m:
            interface_dict[interface]['ip_null_turbo_vector'] = True
            continue
        p23 = re.compile('^VPN +Routing\\/Forwarding +\\"(?P<vrf>[\\w\\-]+)\\"$')
        m = p23.match(line)
        if m:
            interface_dict[interface]['vrf'] = m.groupdict()['vrf']
            continue
        p24 = re.compile('^Associated +unicast +routing +topologies:$')
        m = p24.match(line)
        if m:
            if ('unicast_routing_topologies' not in interface_dict[interface]):
                interface_dict[interface]['unicast_routing_topologies'] = {}
            continue
        p24_1 = re.compile('^Topology +\\"(?P<topo>\\w+)\\", +operation +state +is +(?P<topo_status>\\w+)$')
        m = p24_1.match(line)
        if m:
            if ('unicast_routing_topologies' in interface_dict[interface]):
                if ('topology' not in interface_dict[interface]['unicast_routing_topologies']):
                    interface_dict[interface]['unicast_routing_topologies']['topology'] = {}
                topo = m.groupdict()['topo']
                if (topo not in interface_dict[interface]['unicast_routing_topologies']['topology']):
                    interface_dict[interface]['unicast_routing_topologies']['topology'][topo] = {}
                interface_dict[interface]['unicast_routing_topologies']['topology'][topo]['status'] = m.groupdict()['topo_status'].lower()
            continue
        p25 = re.compile('^IP +multicast +fast +switching +is +(?P<status>\\w+)$')
        m = p25.match(line)
        if m:
            if ('disabled' in m.groupdict()['status']):
                interface_dict[interface]['ip_multicast_fast_switching'] = False
            else:
                interface_dict[interface]['ip_multicast_fast_switching'] = True
            continue
        p25 = re.compile('^IP +multicast +distributed +fast +switching +is +(?P<status>\\w+)$')
        m = p25.match(line)
        if m:
            if ('disabled' in m.groupdict()['status']):
                interface_dict[interface]['ip_multicast_distributed_fast_switching'] = False
            else:
                interface_dict[interface]['ip_multicast_distributed_fast_switching'] = True
            continue
        p26 = re.compile('^IP +route\\-cache +flags +are +(?P<flags>[\\w\\s\\,]+)$')
        m = p26.match(line)
        if m:
            ret = m.groupdict()['flags'].split(',')
            ret = [i.strip() for i in ret]
            interface_dict[interface]['ip_route_cache_flags'] = sorted(ret)
            continue
        p27 = re.compile('^Router +Discovery +is +(?P<status>\\w+)$')
        m = p27.match(line)
        if m:
            if ('disabled' in m.groupdict()['status']):
                interface_dict[interface]['router_discovery'] = False
            else:
                interface_dict[interface]['router_discovery'] = True
            continue
        p28 = re.compile('^IP +output +packet +accounting +is +(?P<status>\\w+)$')
        m = p28.match(line)
        if m:
            if ('disabled' in m.groupdict()['status']):
                interface_dict[interface]['ip_output_packet_accounting'] = False
            else:
                interface_dict[interface]['ip_output_packet_accounting'] = True
            continue
        p29 = re.compile('^IP +access +violation +accounting +is +(?P<status>\\w+)$')
        m = p29.match(line)
        if m:
            if ('disabled' in m.groupdict()['status']):
                interface_dict[interface]['ip_access_violation_accounting'] = False
            else:
                interface_dict[interface]['ip_access_violation_accounting'] = True
            continue
        p30 = re.compile('^TCP\\/IP +header +compression +is +(?P<status>\\w+)$')
        m = p30.match(line)
        if m:
            if ('disabled' in m.groupdict()['status']):
                interface_dict[interface]['tcp_ip_header_compression'] = False
            else:
                interface_dict[interface]['tcp_ip_header_compression'] = True
            continue
        p31 = re.compile('^RTP\\/IP +header +compression +is +(?P<status>\\w+)$')
        m = p31.match(line)
        if m:
            if ('disabled' in m.groupdict()['status']):
                interface_dict[interface]['rtp_ip_header_compression'] = False
            else:
                interface_dict[interface]['rtp_ip_header_compression'] = True
            continue
        p32 = re.compile('^Probe +proxy +name +replies +are +(?P<status>\\w+)$')
        m = p32.match(line)
        if m:
            if ('disabled' in m.groupdict()['status']):
                interface_dict[interface]['probe_proxy_name_replies'] = False
            else:
                interface_dict[interface]['probe_proxy_name_replies'] = True
            continue
        p33 = re.compile('^Policy +routing +is +(?P<status>\\w+)$')
        m = p33.match(line)
        if m:
            if ('disabled' in m.groupdict()['status']):
                interface_dict[interface]['policy_routing'] = False
            else:
                interface_dict[interface]['policy_routing'] = True
            continue
        p34 = re.compile('^Network +address +translation +is +(?P<status>\\w+)$')
        m = p34.match(line)
        if m:
            if ('disabled' in m.groupdict()['status']):
                interface_dict[interface]['network_address_translation'] = False
            else:
                interface_dict[interface]['network_address_translation'] = True
            continue
        p35 = re.compile('^BGP +Policy +Mapping +is +(?P<status>\\w+)$')
        m = p35.match(line)
        if m:
            if ('disabled' in m.groupdict()['status']):
                interface_dict[interface]['bgp_policy_mapping'] = False
            else:
                interface_dict[interface]['bgp_policy_mapping'] = True
            continue
        p36 = re.compile('^Input +features: +(?P<input_feature>[\\w\\s\\,]+)$')
        m = p36.match(line)
        if m:
            features = m.groupdict()['input_feature'].split(',')
            features = [i.strip() for i in features]
            interface_dict[interface]['input_features'] = sorted(features)
            continue
        p37 = re.compile('^IPv4 +WCCP +Redirect +outbound +is +(?P<status>\\w+)$')
        m = p37.match(line)
        if m:
            if ('wccp' not in interface_dict[interface]):
                interface_dict[interface]['wccp'] = {}
            if ('disabled' in m.groupdict()['status']):
                interface_dict[interface]['wccp']['redirect_outbound'] = False
            else:
                interface_dict[interface]['wccp']['redirect_outbound'] = True
            continue
        p38 = re.compile('^IPv4 +WCCP +Redirect +inbound +is +(?P<status>\\w+)$')
        m = p38.match(line)
        if m:
            if ('wccp' not in interface_dict[interface]):
                interface_dict[interface]['wccp'] = {}
            if ('disabled' in m.groupdict()['status']):
                interface_dict[interface]['wccp']['redirect_inbound'] = False
            else:
                interface_dict[interface]['wccp']['redirect_inbound'] = True
        p39 = re.compile('^IPv4 +WCCP +Redirect +exclude +is +(?P<status>\\w+)$')
        m = p39.match(line)
        if m:
            if ('wccp' not in interface_dict[interface]):
                interface_dict[interface]['wccp'] = {}
            if ('disabled' in m.groupdict()['status']):
                interface_dict[interface]['wccp']['redirect_exclude'] = False
            else:
                interface_dict[interface]['wccp']['redirect_exclude'] = True
        p40 = re.compile('^Interface +is +unnumbered. +Using +address +of +(?P<unnumbered_intf>[\\w\\/\\-\\.]+) +\\((?P<unnumbered_ip>[\\w\\.\\:]+)\\)$')
        m = p40.match(line)
        if m:
            unnumbered_dict[interface] = {}
            unnumbered_intf = m.groupdict()['unnumbered_intf']
            unnumbered_ip = m.groupdict()['unnumbered_ip']
            unnumbered_dict[interface]['unnumbered_intf'] = unnumbered_intf
            unnumbered_dict[interface]['unnumbered_ip'] = unnumbered_ip
            if (unnumbered_intf in interface_dict):
                if ('ipv4' in interface_dict[unnumbered_intf]):
                    for address in interface_dict[unnumbered_intf]['ipv4']:
                        if (unnumbered_ip in address):
                            ip_dict = interface_dict[interface].setdefault('ipv4', {}).setdefault(address, {})
                            m = re.search('([\\w\\.\\:]+)\\/(\\d+)', address)
                            ip_dict['ip'] = m.groups()[0]
                            ip_dict['prefix_length'] = m.groups()[1]
                            ip_dict['secondary'] = False
                            break
            else:
                address = unnumbered_ip
                if ('ipv4' not in interface_dict[interface]):
                    interface_dict[interface]['ipv4'] = {}
                if (address not in interface_dict[interface]['ipv4']):
                    interface_dict[interface]['ipv4'][address] = {}
                interface_dict[interface]['ipv4'][address]['ip'] = address
            continue
    return interface_dict