commands lease4-get-by-* returning empty parameters in not consistent way.
Example show lease of client that send hostname and client-id; both are returned in lease4-get-by-*
commands
{'arguments': {'hostname': 'four.hostname.com.'}, 'command': 'lease4-get-by-hostname'}
{
"arguments": {
"leases": [
{
"client-id": "00:01:02:03:04:05:06",
"cltt": 1597923930,
"fqdn-fwd": true,
"fqdn-rev": true,
"hostname": "four.hostname.com.",
"hw-address": "08:08:08:08:08:08",
"ip-address": "192.168.50.5",
"state": 0,
"subnet-id": 1,
"valid-lft": 4000
}
]
},
"result": 0,
"text": "1 IPv4 lease(s) found."
}
but when client will not send hostname nor client-id response is this:
{
"arguments": {
"leases": [
{
"cltt": 1597924174,
"fqdn-fwd": false,
"fqdn-rev": false,
"hostname": "",
"hw-address": "10:10:10:10:10:10",
"ip-address": "192.168.51.10",
"state": 0,
"subnet-id": 2,
"valid-lft": 4000
}
]
},
"result": 0,
"text": "1 IPv4 lease(s) found."
}
parameter hostname is included but it's empty, and client-id is missing. It should also be included as an empty parameter.