Correction and Bugfix for ip dhcp-server network (#156)

* API_DATA > ('ip', 'dhcp-server', 'network') > netmask
replace "automatically_computed_from" by 'can_disable=True, remove_value=0'
automatically_computed_from does not seem to be used at any place in the code
without 'can_disable=True, remove_value=0' task is marked as changed at each execution.

* API_DATA > ('ip', 'dhcp-server', 'network') > next-server
replace "default=''" by 'can_disable=True'
The default in routeros is "no value" and it was not possible to remove a configured next-server

* API_DATA > ('ip', 'dhcp-server', 'network') > gateway
replace "automatically_computed_from" by "default=''"
automatically_computed_from does not seem to be used

* API_DATA > ('ip', 'dhcp-server', 'network') > dns-none
replace "default=''" by "default=False"

* Add changelogs fragment

* Update changelogs/fragments/156-ip_dhcp-server_network.yml

Co-authored-by: Felix Fontein <felix@fontein.de>

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
phox142 2023-03-10 07:01:26 +01:00 committed by GitHub
parent ab87a27018
commit 4d86ba1a7d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 4 deletions

View file

@ -1356,12 +1356,12 @@ PATHS = {
'comment': KeyInfo(can_disable=True, remove_value=''),
'dhcp-option': KeyInfo(default=''),
'dhcp-option-set': KeyInfo(default=''),
'dns-none': KeyInfo(default=''),
'dns-none': KeyInfo(default=False),
'dns-server': KeyInfo(default=''),
'domain': KeyInfo(default=''),
'gateway': KeyInfo(automatically_computed_from=('address', )),
'netmask': KeyInfo(automatically_computed_from=('address', )),
'next-server': KeyInfo(default=''),
'gateway': KeyInfo(default=''),
'netmask': KeyInfo(can_disable=True, remove_value=0),
'next-server': KeyInfo(can_disable=True),
'ntp-server': KeyInfo(default=''),
'wins-server': KeyInfo(default=''),
},