mirror of
https://github.com/ansible-collections/community.routeros.git
synced 2025-06-21 09:35:45 +02:00
make api_modify to ignore builtin items (#130)
* make api_modify to ignore builtin items Signed-off-by: Tomas Herfert <herfik> * include_builtin parametr for api_info module Signed-off-by: Tomas Herfert <herfik> * api_info ignore_builtin changelog Signed-off-by: Tomas Herfert <herfik> * typo Signed-off-by: Tomas Herfert <herfik> * Apply suggestions from code review Co-authored-by: Felix Fontein <felix@fontein.de> Signed-off-by: Tomas Herfert <herfik> Co-authored-by: Tomas Herfert <herfik> Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
parent
4194ae9ba6
commit
b539ed6aa4
3 changed files with 26 additions and 5 deletions
|
@ -20,7 +20,7 @@ description:
|
|||
- Use the M(community.routeros.api_find_and_modify) module to modify one or multiple entries in a controlled way
|
||||
depending on some search conditions.
|
||||
- To make a backup of a path that can be restored with this module, use the M(community.routeros.api_info) module.
|
||||
- The module ignores dynamic entries.
|
||||
- The module ignores dynamic and builtin entries.
|
||||
- B(Note) that this module is still heavily in development, and only supports B(some) paths.
|
||||
If you want to support new paths, or think you found problems with existing paths, please first
|
||||
L(create an issue in the community.routeros Issue Tracker,https://github.com/ansible-collections/community.routeros/issues/).
|
||||
|
@ -483,7 +483,7 @@ def match_entries(new_entries, old_entries, path_info, module):
|
|||
def remove_dynamic(entries):
|
||||
result = []
|
||||
for entry in entries:
|
||||
if entry.get('dynamic', False):
|
||||
if entry.get('dynamic', False) or entry.get('builtin', False):
|
||||
continue
|
||||
result.append(entry)
|
||||
return result
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue