Skip to content

Commit

Permalink
Fix default of ingress-filtering for ROS < 7.
Browse files Browse the repository at this point in the history
  • Loading branch information
felixfontein committed Aug 11, 2024
1 parent 78466d0 commit f3a33d3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 2 additions & 0 deletions changelogs/fragments/306-ingress-filtering-ros6.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bugfixes:
- "api_modify, api_info - change the default of ``ingress-filtering`` in paths ``interface bridge`` and ``interface bridge port`` back to ``false`` for RouterOS before version 7 (https://github.com/ansible-collections/community.routeros/pull/305)."
10 changes: 8 additions & 2 deletions plugins/module_utils/_api_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,10 @@ def join_path(path):
unversioned=VersionedAPIData(
fully_understood=True,
primary_keys=('name', ),
versioned_fields=[
([('7.0', '<')], 'ingress-filtering', KeyInfo(default=False)),
([('7.0', '>=')], 'ingress-filtering', KeyInfo(default=True)),
],
fields={
'admin-mac': KeyInfo(default=''),
'ageing-time': KeyInfo(default='5m'),
Expand All @@ -273,7 +277,6 @@ def join_path(path):
'frame-types': KeyInfo(default='admit-all'),
'forward-delay': KeyInfo(default='15s'),
'igmp-snooping': KeyInfo(default=False),
'ingress-filtering': KeyInfo(default=True),
'max-message-age': KeyInfo(default='20s'),
'mtu': KeyInfo(default='auto'),
'name': KeyInfo(),
Expand Down Expand Up @@ -1310,6 +1313,10 @@ def join_path(path):
unversioned=VersionedAPIData(
fully_understood=True,
primary_keys=('interface', ),
versioned_fields=[
([('7.0', '<')], 'ingress-filtering', KeyInfo(default=False)),
([('7.0', '>=')], 'ingress-filtering', KeyInfo(default=True)),
],
fields={
'auto-isolate': KeyInfo(default=False),
'bpdu-guard': KeyInfo(default=False),
Expand All @@ -1322,7 +1329,6 @@ def join_path(path):
'frame-types': KeyInfo(default='admit-all'),
'horizon': KeyInfo(default='none'),
'hw': KeyInfo(default=True),
'ingress-filtering': KeyInfo(default=True),
'interface': KeyInfo(),
'internal-path-cost': KeyInfo(default=10),
'learn': KeyInfo(default='auto'),
Expand Down

0 comments on commit f3a33d3

Please sign in to comment.