[Kea-users] remote-global-parameter4-set host-reservation-identifiers

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[Kea-users] remote-global-parameter4-set host-reservation-identifiers

stephan
Hello,

I was trying to set the "host-reservation-identifiers" parameter via
hook. The documentation says it is a global parameter, so I tried
"remote-global-parameter4-set".

curl -X POST -H "Content-Type: application/json" -d '{ "command":
"remote-global-parameter4-set", "service": [ "dhcp4" ], "arguments": {
"parameters": { "host-reservation-identifiers": [ "hw-address" ] },
"remote": { "type": "mysql" }, "server-tags": [ "all" ] } }'
http://localhost:8080/

The response was:

[ { "result": 1, "text": "StampedValue: provided value of the
'host-reservation-identifiers' parameter has invalid type: list" } ]

I got the documentation that way, that it should be a list, but okay,
let's try it as a string:

curl -X POST -H "Content-Type: application/json" -d '{ "command":
"remote-global-parameter4-set", "service": [ "dhcp4" ], "arguments": {
"parameters": { "host-reservation-identifiers": "hw-address" },
"remote": { "type": "mysql" }, "server-tags": [ "all" ] } }'
http://localhost:8080/

The new response was:

[ { "result": 1, "text": "bad parameter 'host-reservation-identifiers'
value type: expected list, got string" } ]

This looks like I use the right command, it knows
'host-reservation-identifiers' and how it wants it (as a list). But list
didn't work. Am I missing something?

Best regards,

Stephan
_______________________________________________
Kea-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/kea-users
Reply | Threaded
Open this post in threaded view
|

Re: [Kea-users] remote-global-parameter4-set host-reservation-identifiers

Francis Dupont
[hidden email] writes:
> Hello,
>
> I was trying to set the "host-reservation-identifiers" parameter via
> hook. The documentation says it is a global parameter, so I tried
> "remote-global-parameter4-set".

=> this works only for scalar (bool, int, real and string) parameters
and host-reservation-identifiers takes a list of string.

> I got the documentation that way, that it should be a list, but okay,
> let's try it as a string:

=> and the code checks if the provided value is of the right type so
this does not work.

> This looks like I use the right command, it knows
> 'host-reservation-identifiers' and how it wants it (as a list). But list
> didn't work. Am I missing something?

=> nothing: the config backend does not allow to change everything, only
a subset. Note to change not global host-reservation-identifiers using it
should work but if you have several shared networks or subnets I understand
you prefer to change the global value. Unfortunately this requires to
reload or reconfig the whole server configuration.

Regards

Francis Dupont <[hidden email]>
_______________________________________________
Kea-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/kea-users