-
Notifications
You must be signed in to change notification settings - Fork 48
Add support for transition of signatures (to ease migration of methods) #239
base: develop
Are you sure you want to change the base?
Conversation
This needs to be pushed with: I have tested with napalm-ios. Once pushed, I will further regression test against this PR. |
napalm_base/test/getters.py
Outdated
|
||
# Method signatures that are migrating from old to new state (temporary state) | ||
transition = True | ||
if transition: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure I understand this :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes...that isn't very good...let me cleanup.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a nice solution IMO
Let's discuss it in the meeting next week. This has big implications so I'd like to discuss it and make sure everybody is on the same page before moving forward. My fear is that this basically opens the door to non-compatible code. You could install |
@dbarrosop @mirceaulinic Can we revisit this as a transition solution for migrating the API? Without something like this progress on these API changes grinds to a halt. |
Yes, we should proceed with this. I have one comment though. Could we have a yaml file instead in the root of the repo where we put the signatures instead of buried in the code? The reason is to have it on a more visible place so we don't forget about them. It would be great also if we could trigger a huge warning during the tests just to annoy us so we don't grow lazy because of this :P |
Adds a new data structure TRANSITION_SIGNATURES that allows for easier migration of methods from old to new state.
napalm-base would be pushed first with the new signature.
Then all napalm-drivers would be pushed with new signature.
Then TRANSITION_SIGNATURES would be commented out (i.e. set to blank list until next migration of signatures occur).