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

Add get_ntp_peers() #13

Merged
merged 2 commits into from
Apr 26, 2016
Merged

Add get_ntp_peers() #13

merged 2 commits into from
Apr 26, 2016

Conversation

mirceaulinic
Copy link
Member

@mirceaulinic mirceaulinic commented Apr 19, 2016

As discussed in #12, will reimplement get_ntp_peers() to return a list of NTP peers as configured on the device.

@mirceaulinic
Copy link
Member Author

@dbarrosop, @ktbyers does show ntp assoc on IOS returns the complete addresses for remote peers? (Please try with IPv6 -- on JunOS and EOS the output is truncated).


Example::

[
Copy link
Member

Choose a reason for hiding this comment

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

Can we do a dictionary instead? Right now it's going to be a bit sad because it's going to be a dictionary with no values:

{
'192.168.0.1': {}
'17.72.148.53': {}
'37.187.56.220': {}
'162.158.20.18': {}
}

The reason is that you can stil do d.get_ntp_peers.keys() to get the list but doing a dict of dicts will allow us to extend this method to add more data if needed. Like the key used for authentication, or other configuration parameters. What do you think?

@mirceaulinic
Copy link
Member Author

Although for the moment I don't see an obvious need, it is possible to need more information around NTP peers. Moreover would not cost very much to transform it into a dictionary.

@mirceaulinic
Copy link
Member Author

@dbarrosop I finished updating the drivers, everything should be fine now.

@dbarrosop dbarrosop merged commit 7c92897 into napalm-automation:master Apr 26, 2016
@dbarrosop dbarrosop added this to the 0.13.0 milestone Apr 26, 2016
@mirceaulinic
Copy link
Member Author

@dbarrosop all clear now :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants