Skip to content

Commit

Permalink
Interface list (#120)
Browse files Browse the repository at this point in the history
* interface list & member

Signed-off-by: Tomas Herfert <herfik>

* adding changelog fragment

Signed-off-by: Tomas Herfert <herfik>

* changelog fix

Signed-off-by: Tomas Herfert <herfik>

* sanity fix

Signed-off-by: Tomas Herfert <herfik>

* Apply suggestions from code review

Co-authored-by: Felix Fontein <[email protected]>

Signed-off-by: Tomas Herfert <herfik>
Co-authored-by: Tomas Herfert <herfik>
Co-authored-by: Felix Fontein <[email protected]>
  • Loading branch information
therfert and felixfontein authored Nov 9, 2022
1 parent 3b3d217 commit c2e58c3
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 0 deletions.
3 changes: 3 additions & 0 deletions changelogs/fragments/120-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 ``interface list`` and ``interface list member``
(https://github.com/ansible-collections/community.routeros/pull/120).
11 changes: 11 additions & 0 deletions plugins/module_utils/_api_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,13 +132,24 @@ def join_path(path):
),
('interface', 'list'): APIData(
primary_keys=('name', ),
fully_understood=True,
fields={
'comment': KeyInfo(can_disable=True, remove_value=''),
'exclude': KeyInfo(),
'include': KeyInfo(),
'name': KeyInfo(),
},
),
('interface', 'list', 'member'): APIData(
primary_keys=('list', 'interface', ),
fully_understood=True,
fields={
'comment': KeyInfo(can_disable=True, remove_value=''),
'interface': KeyInfo(),
'list': KeyInfo(),
'disabled': KeyInfo(default=False),
},
),
('interface', 'lte', 'apn'): APIData(
unknown_mechanism=True,
# primary_keys=('default', ),
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 @@ -53,6 +53,8 @@
- interface ethernet switch
- interface ethernet switch port
- interface l2tp-server server
- interface list
- interface list member
- interface ovpn-server server
- interface pptp-server server
- interface sstp-server server
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 @@ -58,6 +58,8 @@
- interface ethernet switch
- interface ethernet switch port
- interface l2tp-server server
- interface list
- interface list member
- interface ovpn-server server
- interface pptp-server server
- interface sstp-server server
Expand Down

0 comments on commit c2e58c3

Please sign in to comment.