-
Notifications
You must be signed in to change notification settings - Fork 49
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
Add interface wifi paths #266
Add interface wifi paths #266
Conversation
Docs Build 📝Thank you for contribution!✨ This PR has been merged and the docs are now incorporated into |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #266 +/- ##
=======================================
Coverage 82.99% 82.99%
=======================================
Files 32 32
Lines 4051 4051
Branches 873 873
=======================================
Hits 3362 3362
Misses 506 506
Partials 183 183
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@felixfontein I'm struggling to get this to properly remove values which I've removed from the configuration. This is starting with an empty Example tasks- name: Get info
community.routeros.api_info:
path: interface wifi
handle_disabled: omit
register: __res
- debug:
var: __res.result
- name: Configure wifi
community.routeros.api_modify:
path: interface wifi
data:
- name: wifi1
default-name: wifi1
disabled: false
configuration.country: Norway
- name: wifi2
default-name: wifi2
handle_absent_entries: remove
handle_entries_content: remove_as_much_as_possible
- name: Get info
community.routeros.api_info:
path: interface wifi
handle_disabled: omit
register: __res
- debug:
var: __res.result
- name: Configure wifi
community.routeros.api_modify:
path: interface wifi
data:
- name: wifi1
default-name: wifi1
disabled: false
- name: wifi2
default-name: wifi2
handle_absent_entries: remove
handle_entries_content: remove_as_much_as_possible
- name: Get info
community.routeros.api_info:
path: interface wifi
handle_disabled: omit
register: __res
- debug:
var: __res.result Output (with diff)
Any ideas? I don't remember running into this with other paths. |
The module only knows how to remove values that have |
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 I'm also thinking it's better to remove them instead of duplicating rOS defaults. For example even though the docs claim |
I don't have time to properly review this, but from a glance it looks good. If nobody objecs, I'll merge this tomorrow :) |
* Add interface wifi paths * Update changelog * Remove most defaults
* Add interface wifi paths * Update changelog * Remove most defaults
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.