-
Notifications
You must be signed in to change notification settings - Fork 98
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
Check mode support for aci_rest module #436
Comments
Sorry for discussing already closed issue. Regarding the code part: Is this hardcoded True? Every time I run the task - I get status changed ? example:
Can you add some logic? If my proposed payload is the same like a remote aci object (fetched with get ? ). I dont know what is the proper way. But check mode for all other modules works as expected. Thanks |
Hi @dalamanster, yes this is hardcoded to True as aci_rest never checks what exist and just push the content or src that it is provided. Because aci_rest is build in such a way that you can provide a path that does not match the DN of the object and that the object can technically be down the tree from the path endpoint, it is difficult to query the correct object and calculate differences. As we cannot tell without make the API call (which will go against check_mode reason of existence) if the call will make any changes, the safe option is to return changed=True. If you are using aci_rest to fill in gaps in modules we have not yet released, please let us know which classes you are looking for or open enhancement requests so we can plan to deliver those. That is the preferred way so you can have all the benefit of check_mode and other features. If this is an issue you think need more consideration, feel free to open a new issue and we can expand the discussion there. This will also help other in the community to chime in and maybe to propose solutions we have not thought about. |
Thanks @lhercot for clear clarification. Now it makes sense for me. You are right - the path and real DN of the changed object can vary in every task. Therefore we cannot tell if the object was modified. As a workaround we will skip the tasks (which are using aci-rest module) in checkmode and output some debug message to user. Permanent fix would be to implement all the tasks in new dedicated modules. You are doing great work in this project - I will open new issue / feature request - as we are not able to do this by ourselves. Just to mention some - we are using aci rest for tasks regarding :
|
Community Note
Description
Module aci_rest does not work correctly when check mode is used.
Affected Module Name(s):
APIC version and APIC Platform
Collection versions
Output/ Error message
Expected Behavior
Actual Behavior
Playbook tasks to Reproduce
Important Factoids
References
The text was updated successfully, but these errors were encountered: