def get_interfaces_ip(self):
interfaces_ip = {}<EOL>ipv4_command = "<STR_LIT>"<EOL>ipv6_command = "<STR_LIT>"<EOL>output_v4 = self._send_command(ipv4_command)<EOL>output_v6 = self._send_command(ipv6_command)<EOL>v4_interfaces = {}<EOL>for line in output_v4.splitlines():<EOL><INDENT>if "<STR_LIT>" in line:<EOL><INDENT>interface = line.split("<STR_LIT:U+002C>")[<NUM_LIT:0>]<EOL>continue<EOL><DEDENT>if "<STR_LIT>" in line:<EOL><INDENT>ip_address = line.split("<STR_LIT:U+002C>")[<NUM_LIT:0>].split()[<NUM_LIT:2>]<EOL>try:<EOL><INDENT>prefix_len = int(line.split()[<NUM_LIT:5>].split("<STR_LIT:/>")[<NUM_LIT:1>])<EOL><DEDENT>except ValueError:<EOL><INDENT>prefix_len = "<STR_LIT>"<EOL><DEDENT>val = {"<STR_LIT>": prefix_len}<EOL>v4_interfaces.setdefault(interface, {})[ip_address] = val<EOL><DEDENT><DEDENT>v6_interfaces = {}<EOL>for line in output_v6.splitlines():<EOL><INDENT>if "<STR_LIT>" in line:<EOL><INDENT>interface = line.split("<STR_LIT:U+002C>")[<NUM_LIT:0>]<EOL>continue<EOL><DEDENT>if "<STR_LIT>" in line:<EOL><INDENT>line = line.strip()<EOL>if "<STR_LIT>" in line:<EOL><INDENT>ip_address = line.split()[<NUM_LIT:3>]<EOL>prefix_len = "<STR_LIT>"<EOL><DEDENT>elif "<STR_LIT>" in line:<EOL><INDENT>ip_address = line.split()[<NUM_LIT:2>]<EOL>prefix_len = "<STR_LIT>"<EOL><DEDENT>else:<EOL><INDENT>ip_address, prefix_len = line.split()[<NUM_LIT:0>].split("<STR_LIT:/>")<EOL><DEDENT>prefix_len = int(prefix_len)<EOL>val = {"<STR_LIT>": prefix_len}<EOL>v6_interfaces.setdefault(interface, {})[ip_address] = val<EOL><DEDENT><DEDENT>for interface, data in v4_interfaces.items():<EOL><INDENT>interfaces_ip.setdefault(interface, {"<STR_LIT>": {}})["<STR_LIT>"] = data<EOL><DEDENT>for interface, data in v6_interfaces.items():<EOL><INDENT>interfaces_ip.setdefault(interface, {"<STR_LIT>": {}})["<STR_LIT>"] = data<EOL><DEDENT>return interfaces_ip<EOL>
Get interface IP details. Returns a dictionary of dictionaries.

Sample output:
{
    "Ethernet2/3": {
        "ipv4": {
            "4.4.4.4": {
                "prefix_length": 16
            }
        },
        "ipv6": {
            "2001:db8::1": {
                "prefix_length": 10
            },
            "fe80::2ec2:60ff:fe4f:feb2": {
                "prefix_length": "128"
            }
        }
    },
    "Ethernet2/2": {
        "ipv4": {
            "2.2.2.2": {
                "prefix_length": 27
            }
        }
    }
}