mirror of
https://github.com/ansible-collections/community.routeros.git
synced 2025-06-24 18:58:41 +02:00
API update (#128)
* adding support for api fields that can be disabled and have default value at the same time Signed-off-by: Tomas Herfert <herfik> * api path support: interface gre Signed-off-by: Tomas Herfert <herfik> * docs Signed-off-by: Tomas Herfert <herfik> * unit test update & yamlling fix Signed-off-by: Tomas Herfert <herfik> * test fix Signed-off-by: Tomas Herfert <herfik> * sanity fix Signed-off-by: Tomas Herfert <herfik> * changelog Signed-off-by: Tomas Herfert <herfik> * Update per suggestion Co-authored-by: Felix Fontein <felix@fontein.de> * api path support: interface eoip Signed-off-by: Tomas Herfert <herfik> * docs Signed-off-by: Tomas Herfert <herfik> * apply suggestion from code review Signed-off-by: Tomas Herfert <herfik> 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
1353055fe2
commit
23b3aa3beb
6 changed files with 73 additions and 6 deletions
|
@ -120,7 +120,7 @@ class Or(object):
|
|||
|
||||
def _normalize_entry(entry, path_info):
|
||||
for key, data in path_info.fields.items():
|
||||
if key not in entry and data.default is not None:
|
||||
if key not in entry and data.default is not None and not data.can_disable:
|
||||
entry[key] = data.default
|
||||
if data.can_disable:
|
||||
if key in entry and entry[key] in (None, data.remove_value):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue