BSpendlove / pykeadhcp

A python module used to interact the the Kea DHCP API daemons (dhcp4, dhcp6, ctrl-agent and ddns)
Apache License 2.0
19 stars 4 forks source link

Logger output_options not correctly formatted in Kea API #7

Open BSpendlove opened 1 year ago

BSpendlove commented 1 year ago

Python version

3.10

How to reproduce this locally

  1. Setup Kea Class
  2. Add logger to "loggers" global config for any daemon
  3. Export to JSON

What should happen?

output-options for Logger should be saved once config is set using config-set API command

What happened?

output-options is not saved on API because Kea API is expecting underscores (output_options)

BSpendlove commented 1 year ago

Raised bug with vendor (https://gitlab.isc.org/isc-projects/kea/-/issues/2904)

Also will implement workaround for now until fixed for the Logger model to prevent being converted to a hyphen:

class Config:
        fields = {"output_options": "output_options"}
BSpendlove commented 1 year ago

Should be fixed in 2.5.0