Skip to content
This repository has been archived by the owner on Sep 17, 2019. It is now read-only.

interfaces_ip primary IP check #206

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions napalm_base/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -796,14 +796,19 @@ def get_interfaces_ip(self):
addresses as keys.
Each IP Address dictionary has the following keys:
* prefix_length (int)
* primary_ip (boolean)

Example::

{
u'FastEthernet8': {
u'ipv4': {
u'10.66.43.169': {
'prefix_length': 22
'prefix_length': 22,
'primary_ip': True
},
u'10.66.50.1': {
'prefix_length': 24
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add the primary key here as well, please

}
}
},
Expand Down Expand Up @@ -831,7 +836,8 @@ def get_interfaces_ip(self):
u'Tunnel0': {
u'ipv4': {
u'10.63.100.9': {
'prefix_length': 24
'prefix_length': 24,
'primary_ip': True
}
}
}
Expand Down