generated from ansible-collections/collection_template
-
Notifications
You must be signed in to change notification settings - Fork 63
Open
Labels
enhancementNew feature or requestNew feature or request
Description
SUMMARY
Trying to use a new "ip dhcp-client" field "default-route-tables" added in routeros 7.18 (2025-Feb-24 10:47) :
*) dhcpv4-client - allow selecting to which routing tables add default route;
It results in :
fatal: [ROUTER]: FAILED! => {"changed": false, "msg": "Unknown key \"default-route-tables\" for interface=\"ether1\"."}
Field is documented here : https://help.mikrotik.com/docs/spaces/ROS/pages/24805500/DHCP#DHCP-DHCPClient
ISSUE TYPE
- Feature Idea
ADDITIONAL INFORMATION
I've added it like this as a versioned_field in plugins/module_utils/_api_data.py :
('ip', 'dhcp-client'): APIData(
unversioned=VersionedAPIData(
fully_understood=True,
primary_keys=('interface', ),
versioned_fields=[
([('7.18', '>=')], 'default-route-tables', KeyInfo(default=False)),
],
fields={
'add-default-route': KeyInfo(default=True),
'comment': KeyInfo(can_disable=True, remove_value=''),
'default-route-distance': KeyInfo(default=1),
'dhcp-options': KeyInfo(default='hostname,clientid', can_disable=True, remove_value=''),
'disabled': KeyInfo(default=False),
'interface': KeyInfo(),
'script': KeyInfo(can_disable=True),
'use-peer-dns': KeyInfo(default=True),
'use-peer-ntp': KeyInfo(default=True)
},
),
),
Works for me but really not confident enough to make a formal PR. If someone could review that and add this field for some future version it would be nice.
Thanks !
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request