diff --git a/changelogs/fragments/278-add_ip_route_rule_path.yml b/changelogs/fragments/278-add_ip_route_rule_path.yml new file mode 100644 index 0000000..9c559bf --- /dev/null +++ b/changelogs/fragments/278-add_ip_route_rule_path.yml @@ -0,0 +1,2 @@ +minor_changes: + - api_info, api_modify - add ``/ip route rule`` path for RouterOS 6.x (https://github.com/ansible-collections/community.routeros/pull/278). \ No newline at end of file diff --git a/plugins/module_utils/_api_data.py b/plugins/module_utils/_api_data.py index b8e6db3..18fb37c 100644 --- a/plugins/module_utils/_api_data.py +++ b/plugins/module_utils/_api_data.py @@ -729,6 +729,23 @@ PATHS = { }, ), ), + ('ip', 'route', 'rule'): APIData( + versioned=[ + ('7', '<', VersionedAPIData( + fully_understood=True, + fields={ + 'action': KeyInfo(default='lookup'), + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'disabled': KeyInfo(default=False), + 'dst-address': KeyInfo(can_disable=True), + 'interface': KeyInfo(can_disable=True), + 'routing-mark': KeyInfo(can_disable=True), + 'src-address': KeyInfo(can_disable=True), + 'table': KeyInfo(default='main'), + }, + )), + ], + ), ('ip', 'vrf'): APIData( versioned=[ ('7', '>=', VersionedAPIData( diff --git a/plugins/modules/api_info.py b/plugins/modules/api_info.py index 37bc51d..cbed689 100644 --- a/plugins/modules/api_info.py +++ b/plugins/modules/api_info.py @@ -149,6 +149,7 @@ options: - ip pool - ip proxy - ip route + - ip route rule - ip route vrf - ip service - ip settings diff --git a/plugins/modules/api_modify.py b/plugins/modules/api_modify.py index 3ae0740..05b45ad 100644 --- a/plugins/modules/api_modify.py +++ b/plugins/modules/api_modify.py @@ -158,6 +158,7 @@ options: - ip pool - ip proxy - ip route + - ip route rule - ip route vrf - ip service - ip settings