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 17, 2023
1 parent 81c4186 commit 57bfbba
Show file tree
Hide file tree
Showing 4 changed files with 18 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).
14 changes: 14 additions & 0 deletions plugins/module_utils/_api_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -3282,6 +3282,20 @@ def join_path(path):
},
),
),
('user',): APIData(
unversioned=VersionedAPIData(
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(write_only=True),
},
),
),
('user', 'aaa'): APIData(
unversioned=VersionedAPIData(
single_value=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 @@ -195,6 +195,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 @@ -204,6 +204,7 @@
- tool sms
- tool sniffer
- tool traffic-generator
- user
- user aaa
- user group
- user settings
Expand Down

0 comments on commit 57bfbba

Please sign in to comment.