-
Notifications
You must be signed in to change notification settings - Fork 48
NTP stats getter to replace NTP peers getter #12
NTP stats getter to replace NTP peers getter #12
Conversation
The problem with this PR is that we are going to break the API and that might be painful. Do you think it's strictly necessary? If yes, we should coordinate so we fix or disable the method on all the drivers. We have the following drivers supporting that method:
Which ones can you fix? |
What concerns you the most, the name change or the structure? I can change it for EOS, JunOS, IOS-XR and NXOS. As usually, unfortunately I don't have an IOS to test. |
The only concern is that changing the API and tests is going to make automated tests fail while this is being updated but if you can take care of most of the drivers we can proceed. That was actually my only concern. IOS should be easy to fix, it's probably similar to EOS and the benefit of having mocked data is that we can fix it even without access to a real device :P If you or @ktbyers don't have time to fix IOS I will try to find some time to fix it (traveling right now and for two more weeks) So feel free to proceed, I guess you understand I will be approving this PR once the drivers have been updated as well. Don't mind the errors when you send the PRs, I will re-trigger the tests myself when this one is merged. |
On most of them will be easy to update -- JunOS is already done: napalm-automation/napalm-junos#10. I will let you know when I finish with all of them. |
@dbarrosop Except IOS, all are prepared. |
Ok, I will start merging this. Then I will fix IOS and update the documentation. |
OK, I will rebase the others and make sure everything is fine. |
Rename get_ntp_peers to comply with the changes in napalm-automation/napalm-base#12
Fix get_ntp_peers to comply with the changes in napalm-automation/napalm-base#12
Ok, this is complete. We refactored everything. I also published a new version of each driver with only this fix. |
Great! Thanks! :) |
@dbarrosop @mirceaulinic I haven't been following this. If there is an work still outstanding for me, just assign it to me so I keep track of it. Thanks. |
@ktbyers: @dbarrosop changed the old get_ntp_peers() to get_ntp_stats() on IOS already. Now, could you please add the method get_ntp_peers() to return the list of NTP peers as configured on the device? You can have a look in #13 for further details. |
The actual method get_ntp_peers() returns a dictionary with the statistics of the configured NTP peers. It would feel more natural to be called get_ntp_stats(). For the reasons presented below, we need to implement a different method get_ntp_peers() to retrieve the NTP config.
Unfortunately the current implementation of get_ntp_peers() cannot be used to determine the NTP peers configured on the device (at least on JunOS which returns the raw output of the ntpq Unix daemon), where the columns have a max width of 15 characters:
2400:cb00:22:10
obviously is not a valid IPv6 address so, right now, get_ntp_peers() cannot be completely reliable in terms of remote NTP address.Actions needed: