Skip to content
This repository was archived by the owner on Sep 17, 2019. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
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
23 changes: 23 additions & 0 deletions napalm_base/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1499,3 +1499,26 @@ def compliance_report(self, validation_file='validate.yml'):
report file. See https://napalm.readthedocs.io/en/latest/validate.html.
"""
return validate.compliance_report(self, validation_file=validation_file)

def get_eigrp_neighbors(self):
"""
Returns a dictionary of dictionaries. The keys for the first dictionary will be the vrf
(global if no vrf). The inner dictionary will contain the following data for each vrf:

* router_id
* peers - another dictionary of dictionaries. Outer keys are the IPs of the neighbors. \
The inner keys are:
* Interface (string)
* Holdtime (int in seconds)
* Uptime (int in seconds)
* Q Count (int)
* Seq Num (int)
* SRTT (int in milliseconds)
* RTO (int in milliseconds)
* Version (string)
* Retransmits (int)
* Retries (int)
* Restart Time (int in seconds)

"""
raise NotImplementedError
10 changes: 10 additions & 0 deletions napalm_base/test/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -569,3 +569,13 @@ def test_get_network_instances(self):
self._test_model(models.network_instance_interfaces, network_instance['interfaces'])

self.assertTrue(result)

def test_get_eigrp_neighbors(self):
"""Test get_eigrp_neighbors method."""
try:
get_eigrp_neighbors = self.device.get_eigrp_neighbors()
except NotImplementedError:
raise SkipTest()

assert isinstance(get_eigrp_neighbors, dict)
assert self._test_model(models.eigrp_config_neighbors, get_eigrp_neighbors)
Copy link
Member

Choose a reason for hiding this comment

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

newline please

14 changes: 14 additions & 0 deletions napalm_base/test/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,3 +333,17 @@
'dst_zone': text_type,
'action': text_type
}

eigrp_config_neighbors = {
'interface': text_type,
'holdtime': int,
'Uptime': int,
'q_count': int,
'seq_num': int,
'srtt': int,
'rto': int,
'version': text_type,
'retransmits': int,
'retries': int,
'restart_time': int
}