From 6c3bccfad24e00ff5afa126be63993c4eac4cb02 Mon Sep 17 00:00:00 2001 From: Michael Hanselmann Date: Sat, 27 Jul 2024 13:23:29 +0200 Subject: [PATCH] Add support for the "routing ospf static-neighbor" path Upstream documentation: https://help.mikrotik.com/docs/display/ROS/OSPF#OSPF-StaticNeighbourconfiguration Signed-off-by: Michael Hanselmann --- .../fragments/300-add-ip-dhcp-server-matcher.yml | 2 +- .../300-set-ip-dhcp-option-force-default.yml | 2 +- changelogs/fragments/302-ospf-static-neighbor.yml | 2 ++ plugins/module_utils/_api_data.py | 15 +++++++++++++++ plugins/modules/api_info.py | 1 + plugins/modules/api_modify.py | 1 + 6 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 changelogs/fragments/302-ospf-static-neighbor.yml diff --git a/changelogs/fragments/300-add-ip-dhcp-server-matcher.yml b/changelogs/fragments/300-add-ip-dhcp-server-matcher.yml index cf97e06b..c80a3a37 100644 --- a/changelogs/fragments/300-add-ip-dhcp-server-matcher.yml +++ b/changelogs/fragments/300-add-ip-dhcp-server-matcher.yml @@ -1,2 +1,2 @@ minor_changes: - - api_info, api_modify - add support for the ``ip dhcp-server matcher`` path (https://github.com/ansible-collections/community.routeros/issues/300). + - api_info, api_modify - add support for the ``ip dhcp-server matcher`` path (https://github.com/ansible-collections/community.routeros/pull/300). diff --git a/changelogs/fragments/300-set-ip-dhcp-option-force-default.yml b/changelogs/fragments/300-set-ip-dhcp-option-force-default.yml index 5158fc34..1f9585d8 100644 --- a/changelogs/fragments/300-set-ip-dhcp-option-force-default.yml +++ b/changelogs/fragments/300-set-ip-dhcp-option-force-default.yml @@ -1,2 +1,2 @@ minor_changes: - - api_info, api_modify - set default for ``force`` in ``ip dhcp-server option`` to an explicit ``false`` (https://github.com/ansible-collections/community.routeros/issues/300). + - api_info, api_modify - set default for ``force`` in ``ip dhcp-server option`` to an explicit ``false`` (https://github.com/ansible-collections/community.routeros/pull/300). diff --git a/changelogs/fragments/302-ospf-static-neighbor.yml b/changelogs/fragments/302-ospf-static-neighbor.yml new file mode 100644 index 00000000..5f93ec41 --- /dev/null +++ b/changelogs/fragments/302-ospf-static-neighbor.yml @@ -0,0 +1,2 @@ +minor_changes: + - api_info, api_modify - add support for the ``routing ospf static-neighbor`` path in RouterOS 7 (https://github.com/ansible-collections/community.routeros/pull/302). diff --git a/plugins/module_utils/_api_data.py b/plugins/module_utils/_api_data.py index 218b379d..685c1207 100644 --- a/plugins/module_utils/_api_data.py +++ b/plugins/module_utils/_api_data.py @@ -956,6 +956,21 @@ def join_path(path): }, ), ), + ('routing', 'ospf', 'static-neighbor'): APIData( + versioned=[ + ('7', '>=', VersionedAPIData( + fully_understood=True, + fields={ + 'address': KeyInfo(required=True), + 'area': KeyInfo(required=True), + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'disabled': KeyInfo(default=False), + 'instance-id': KeyInfo(default=0), + 'poll-interval': KeyInfo(default='2m'), + }, + )), + ], + ), ('routing', 'ospf-v3', 'instance'): APIData( unversioned=VersionedAPIData( unknown_mechanism=True, diff --git a/plugins/modules/api_info.py b/plugins/modules/api_info.py index 7f45ef57..5f47c35a 100644 --- a/plugins/modules/api_info.py +++ b/plugins/modules/api_info.py @@ -209,6 +209,7 @@ - routing ospf area range - routing ospf instance - routing ospf interface-template + - routing ospf static-neighbor - routing pimsm instance - routing pimsm interface-template - routing rip diff --git a/plugins/modules/api_modify.py b/plugins/modules/api_modify.py index eb065668..195b2a94 100644 --- a/plugins/modules/api_modify.py +++ b/plugins/modules/api_modify.py @@ -218,6 +218,7 @@ - routing ospf area range - routing ospf instance - routing ospf interface-template + - routing ospf static-neighbor - routing pimsm instance - routing pimsm interface-template - routing rip