Closed cosandr closed 6 months ago
Thank you for contribution!✨
This PR has been merged and the docs are now incorporated into main
:
https://ansible-collections.github.io/community.routeros/branch/main
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 82.99%. Comparing base (
3d737d6
) to head (efc11c3
).
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@felixfontein I'm struggling to get this to properly remove values which I've removed from the configuration. This is starting with an empty interface wifi
.
Any ideas? I don't remember running into this with other paths.
The module only knows how to remove values that have can_disabled=True
(optionally with remove_value
, depending on how to remove it via the API). Since most of the fields do not have can_disabled=True
the module doesn't know how to remove them, and since you supplied handle_entries_content: remove_as_much_as_possible
it does not complain in that case.
I see, thanks! I've tried a few more things and most paths only require the primary key, everything else can be disabled, so I've removed most defaults in favor of can_disable=True
. Some have to stay (interface wifi
needs at least l2mtu
and arp-timeout
). I can't guarantee every single option works, but I think not being able to remove them at all is not expected behavior.
I'm also thinking it's better to remove them instead of duplicating rOS defaults. For example even though the docs claim arp=enabled
is the default, it doesn't show up if you run export
whereas it would if the module removes it and sets it back to the default value, whereas it won't show up if it's removed via can_disable=True
(so it's the same as it was before the module did anything with it).
I don't have time to properly review this, but from a glance it looks good. If nobody objecs, I'll merge this tomorrow :)
SUMMARY
Fixes #253.
Mostly copy-pasted from
interface wifiwave2
with some minor changes (added missingcomment
anddisabled
where relevant, removedopenflow-switch
fromdatapath
, changed default l2mtu to 1560).ISSUE TYPE
COMPONENT NAME
api_info
api_modify
ADDITIONAL INFORMATION
I'm unsure about the default values, but they haven't caused me any issues.
I'm unable to rename the default wifi interfaces, it fails with
I can do it from the CLI with
I assume the issue is having
name
as primary key, causing the module to try to remove it before creating a new one with the new name.