-
-
Notifications
You must be signed in to change notification settings - Fork 35
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
Problem: Detail information are hidden by search information #102
Comments
I would generally prefer using the What I can provide is an attribute that enforces the Your opinion and feedback would be appreciated 👍🏼 BTW: I have exchanged my thoughts about a |
Sidenote: I need to document the functionality of those attributes.. have been a little to lazy when it comes to those |
Given the module is not a management module and has a I experimented with the searchRelay api in dhcrelay_relay module. If the relay was not existing the self.raw end with the return of The |
Modules
The python class
ansible_collections.ansibleguy.opnsense.plugins.module_utils.base.base.Base
Version
Ansible Version
No response
OPNSense Version
OPNSense-Plugin Version
No response
Issue
The using Base.search the simpler search dict and (may) extend it with the more comprehensive information from the detail call. In the way the combining is done the simpler information take precedence. This can hide important information if they are present on both versions. For example in the case of the Dhcrelay API the
interface
anddestination
file which are both select field in thegetRelay
are overwritten with the simple text representation. This version of the data is not sufficient to create the update request as the key for interface and destination are required.The content of
self.raw
is not the same depending on if the item in question exists or not. If it does the simplified version is returned, otherwise the detailed version (for a empty item) is returned.Would it be possible/feasible to switch the precedence in the mare of the two dicts around?
Example
/api/dhcrelay/settings/searchRelay
/api/dhcrelay/settings/getRelay/
Final data
Config Ansible
No response
Config OPNSense
No response
Debug Output
No response
Profiling Output
No response
The text was updated successfully, but these errors were encountered: