How to get individual_getters from napalm get_interfaces_ip

Hi,

i’m trying to using nornir+napalm to get interfaces ips with prefix-length to later make a script to pull this info via rest api; Below is an example I get of using get_interfaces_ip:

{
u’FastEthernet8’: {
u’ipv4’: {
u’10.66.43.169’: {
‘prefix_length’: 22
}
}
},
u’Loopback555’: {
u’ipv4’: {
u’192.168.1.1’: {
‘prefix_length’: 24
}
},

How I can do in python to get the output below:
{interface} - {ip address}}/{prefix_length}

Thanks in advanced.

Hey Andre,

You might want to look at this block of code from line 313 to 409:

I’ve accessed the values that you are looking for above so hopefully this helps in translating the logic into your application.

Hi @writememe,

Yes, it helped a lot, thank you.

No worries, glad I can help