Skip to content

Commit

Permalink
Add support for the "user" path
Browse files Browse the repository at this point in the history
Make it possible to manage users via the `user` path.

Signed-off-by: Michael Hanselmann <[email protected]>
  • Loading branch information
hansmi committed Sep 1, 2023
1 parent 38ac303 commit bc6e0c0
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
2 changes: 2 additions & 0 deletions changelogs/fragments/211-user.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
minor_changes:
- api_info, api_modify - add support for the ``user`` path (https://github.com/ansible-collections/community.routeros/pull/211).
12 changes: 12 additions & 0 deletions plugins/module_utils/_api_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -2808,6 +2808,18 @@ def join_path(path):
'test-id': KeyInfo(default=0),
},
),
('user',): APIData(
primary_keys=('name', ),
fully_understood=True,
fields={
'address': KeyInfo(),
'comment': KeyInfo(can_disable=True, remove_value=''),
'disabled': KeyInfo(default=False),
'group': KeyInfo(),
'name': KeyInfo(),
'password': KeyInfo(),
},
),
('user', 'aaa'): APIData(
single_value=True,
fully_understood=True,
Expand Down
1 change: 1 addition & 0 deletions plugins/modules/api_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@
- tool sms
- tool sniffer
- tool traffic-generator
- user
- user aaa
- user group
- user settings
Expand Down
1 change: 1 addition & 0 deletions plugins/modules/api_modify.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@
- tool sms
- tool sniffer
- tool traffic-generator
- user
- user aaa
- user group
- user settings
Expand Down

0 comments on commit bc6e0c0

Please sign in to comment.