Skip to content

Commit

Permalink
Add support for the "ip dhcp-server option" path (#223)
Browse files Browse the repository at this point in the history
Make it possible to manage IPv4 DHCP server options.

Signed-off-by: Michael Hanselmann <[email protected]>
  • Loading branch information
hansmi authored Oct 7, 2023
1 parent efbc05e commit 29a01ea
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 0 deletions.
2 changes: 2 additions & 0 deletions changelogs/fragments/223-add-ip-dhcp-server-option.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 ``ip dhcp-server option`` and ``ip dhcp-server option sets`` paths (https://github.com/ansible-collections/community.routeros/pull/223).
22 changes: 22 additions & 0 deletions plugins/module_utils/_api_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -1847,6 +1847,28 @@ def join_path(path):
},
),
),
('ip', 'dhcp-server', 'option'): APIData(
unversioned=VersionedAPIData(
fully_understood=True,
primary_keys=('name',),
fields={
'code': KeyInfo(required=True),
'name': KeyInfo(),
'value': KeyInfo(default=''),
'force': KeyInfo(),
},
),
),
('ip', 'dhcp-server', 'option', 'sets'): APIData(
unversioned=VersionedAPIData(
fully_understood=True,
primary_keys=('name',),
fields={
'name': KeyInfo(required=True),
'options': KeyInfo(),
},
),
),
('ip', 'dns'): APIData(
unversioned=VersionedAPIData(
single_value=True,
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 @@ -99,6 +99,8 @@
- ip dhcp-server config
- ip dhcp-server lease
- ip dhcp-server network
- ip dhcp-server option
- ip dhcp-server option sets
- ip dns
- ip dns static
- ip firewall address-list
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 @@ -108,6 +108,8 @@
- ip dhcp-server config
- ip dhcp-server lease
- ip dhcp-server network
- ip dhcp-server option
- ip dhcp-server option sets
- ip dns
- ip dns static
- ip firewall address-list
Expand Down

0 comments on commit 29a01ea

Please sign in to comment.