Skip to content

Commit

Permalink
Implement get_ntp_peers on Cisco IOS (#752)
Browse files Browse the repository at this point in the history
  • Loading branch information
orgito authored and ktbyers committed Jun 29, 2018
1 parent b0629e8 commit d7961e8
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
6 changes: 6 additions & 0 deletions napalm/ios/ios.py
Original file line number Diff line number Diff line change
Expand Up @@ -1856,6 +1856,12 @@ def cli(self, commands):

return cli_output

def get_ntp_peers(self):
"""Implementation of get_ntp_peers for IOS."""
ntp_stats = self.get_ntp_stats()

return {ntp_peer.get('remote'): {} for ntp_peer in ntp_stats if ntp_peer.get('remote')}

def get_ntp_servers(self):
"""Implementation of get_ntp_servers for IOS.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"172.29.50.34" : {}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

address ref clock st when poll reach delay offset disp
*~172.29.50.34 83.168.200.199 3 54 1024 377 1.186 0.122 18.659
* sys.peer, # selected, + candidate, - outlyer, x falseticker, ~ configured

0 comments on commit d7961e8

Please sign in to comment.