-
Notifications
You must be signed in to change notification settings - Fork 48
Added commit confirm functionality #213
base: develop
Are you sure you want to change the base?
Conversation
Commit confirm added to napalm base. It introduces new optional argument in commit_config method and new method commit_confirm for confirmation pending commit.
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.
Hi @kderynski - this looks good to me! As previously said, this feature may take a while the go live as it's an API change.
Two points:
- can we rename the
revert_in
kwarg toconfirmed
? I would find it more intuitive - would you be happy to come with a PR to address that in Junos? Unfortunately I won't have the time to do it myself over the next couple of weeks.
Thank you,
Mircea
Hi @mirceaulinic, Best regards, |
@mirceaulinic , not sure about |
Hmm, I think that BTW I was thinking about time unit for this parameter. Should we use seconds or minutes? Seconds seems to be the best choice but junos accepts rollback time in minutes (minimal time 1 min). IOSXR as far as I remember takes rollback time in seconds. Of course, we can normalize this inside drivers code but what if someone provides 10 sec as rollback time for junos? Should we throw an exception or just time should be increased to possible minimal value? I think we should discuss this aspect as well to have clear guidelines for implementations in all drivers. |
I see your point @dbarrosop -
Regarding the time unit @kderynski: yes, and I think we should specify the rollback time in minutes. This way we avoid any conflict with Junos and other drivers can easily convert minutes to seconds. |
Yeah, I understand that most vendors are just copying junos nomenclature for this and going with the "confirmed" keyword, I think even EOS named it like that on their latest release. That doesn't make it right. I prefer the python philosophy of making things readable as a novel rather than just doing things because someone in the past made a poor naming decision. In addition, it might be the difference between being sued or not by some CLI industry standard maker ;) Anyway, I don't want to drag this just because we don't agree on the name of the argument. I will delegate the naming decision to @mirceaulinic . Feel free to choose one by any criteria you prefer: going with the industry standard, the readable one or just flipping a coin : ) |
@mirceaulinic let me know when you decide which name should we use :) After that, I will change it in this PR and in PR for junos driver. revert_in = 1 if revert_in and revert_in < 60 else revert_in // 60 |
No, it doesn't make it right and I continue to agree with you on this. I just hope it would make it more intuitive for network engineers familiar with the context - as you said because the wrong nomenclature has been already spread out.
LOL - good one! :)
Yes, through the XML agent only seconds seems to allowed. So whoever will implement the changes for the XR driver, will need to convert the rollback time from minutes to seconds, i.e. Thanks, |
It would be great if you'd add in the docstring of |
I think it is probably better to use Either way we should just choose and get this done. |
Commit confirm functionality added to napalm base. It introduces new optional
argument in commit_config method and new method commit_confirm for
confirmation pending commit. It was briefly discussed under napalm-junos#126