-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ApplyConfigletToDevice
does not create TempAction if configlet is already on device.
#73
Comments
@hansbogert If the configlet exists, then you should be able to use UpdateConfigletWaitForTask() which will update the configlet and create a task if there is an actual change in the configuration. |
I see, but in my case there isn't even an update to the configlet. Imo, the semantics of the function are wrong, and I think the python version got it right. |
I probably should've stipulated this in the OP, but the situation is as described plus, the running configuration differs from the designed configuration. |
Can you explain more on how the python version got it right? We try to have parity between the python and golang libraries as best we can. |
In the go version you exit if the In the python version, there is no similar construct and the TempAction is made unconditionally. Which makes sense in my exact situation, when a configlet is added to a device, but there isn't an accompanying TempAction yet. I think the go version is trying to prematurely optimize in this case. |
IIUC,
ApplyConfigletToDevice
does two things:However this function does not create a tempaction when the configlet is already on the device. In fact, with the current functions in go-cvprac, I have no idea how to create a tempaction now in the scenario that a device already holds a configlet, but does not have an accompanying tempaction yet.
Note that this behaviour does not seem to be in the Python version of cvprac.
The text was updated successfully, but these errors were encountered: