remote-class4-get and remote-class4-get-all commands do return valid-lifetime value with mysql db backend
When kea is running db backend in postgresql, and it has no valid-lifetime configured on any level (it uses default value). In the database there is just server tag and class configured.
executed commands, set tag and class:
{'arguments': {'remote': {'type': 'postgresql'},
'servers': [{'server-tag': 'abc'}]},
'command': 'remote-server4-set',
'service': ['dhcp4']}
[
{
"arguments": {
"servers": [
{
"description": "",
"server-tag": "abc"
}
]
},
"result": 0,
"text": "DHCPv4 server successfully set."
}
]
{'arguments': {'client-classes': [{'name': 'foo', 'test': "member('KNOWN')"}],
'remote': {'type': 'postgresql'},
'server-tags': ['abc']},
'command': 'remote-class4-set',
'service': ['dhcp4']}
[
{
"arguments": {
"client-classes": [
{
"name": "foo"
}
]
},
"result": 0,
"text": "DHCPv4 client class successfully set."
}
]
get class:
{'arguments': {'client-classes': [{'name': 'foo'}],
'remote': {'type': 'postgresql'}},
'command': 'remote-class4-get',
'service': ['dhcp4']}
[
{
"arguments": {
"client-classes": [
{
"boot-file-name": "",
"metadata": {
"server-tags": [
"abc"
]
},
"name": "foo",
"next-server": "0.0.0.0",
"option-data": [],
"option-def": [],
"server-hostname": "",
"test": "member('KNOWN')"
}
],
"count": 1
},
"result": 0,
"text": "DHCPv4 client class 'foo' found."
}
]
it's missing valid-lifetime
with value 0. OR if that is correct behaviour than the same scenario but using mysql config backend is returning valid-lifetime
set to 0 as extra parameter.
In v6 configuration issue is very similar, but instead of returning just valid-lifetime
but also preferred-lifetime
Edited by Wlodzimierz Wencel