Skip to content

Commit

Permalink
Add support for ip route and ip route vrf (#123)
Browse files Browse the repository at this point in the history
* Add support for ip route and ip route vrf

* Changelog
  • Loading branch information
phibos authored Nov 10, 2022
1 parent 1e36dfa commit 558eb50
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 0 deletions.
3 changes: 3 additions & 0 deletions changelogs/fragments/123-api.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
minor_changes:
- api_modify, api_info - support API paths ``ip route`` and ``ip route vrf``
(https://github.com/ansible-collections/community.routeros/pull/123).
25 changes: 25 additions & 0 deletions plugins/module_utils/_api_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,31 @@ def join_path(path):
'ranges': KeyInfo(),
},
),
('ip', 'route'): APIData(
fully_understood=True,
fields={
'check-gateway': KeyInfo(can_disable=True),
'comment': KeyInfo(can_disable=True, remove_value=''),
'disabled': KeyInfo(default=False),
'distance': KeyInfo(),
'dst-address': KeyInfo(),
'gateway': KeyInfo(required=True),
'route-tag': KeyInfo(can_disable=True),
'routing-mark': KeyInfo(can_disable=True),
'scope': KeyInfo(),
'target-scope': KeyInfo(),
},
),
('ip', 'route', 'vrf'): APIData(
fully_understood=True,
primary_keys=('routing-mark', ),
fields={
'comment': KeyInfo(can_disable=True, remove_value=''),
'disabled': KeyInfo(default=False),
'interfaces': KeyInfo(),
'routing-mark': KeyInfo(),
},
),
('ip', 'dhcp-server'): APIData(
fully_understood=True,
primary_keys=('name', ),
Expand Down
2 changes: 2 additions & 0 deletions plugins/modules/api_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@
- ip neighbor discovery-settings
- ip pool
- ip proxy
- ip route
- ip route vrf
- ip service
- ip settings
- ip smb
Expand Down
2 changes: 2 additions & 0 deletions plugins/modules/api_modify.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@
- ip neighbor discovery-settings
- ip pool
- ip proxy
- ip route
- ip route vrf
- ip service
- ip settings
- ip smb
Expand Down

0 comments on commit 558eb50

Please sign in to comment.