Describe the bug
PUTs to /boot/v1/bootparameters will fail if entries in macs have uppercase letters instead of lowercase
To Reproduce
Make payload
{
"initrd": "http://webserver/initramfs.img",
"kernel": "http://webserver/vmlinuz",
"macs": [
"D4:DB:F1:B4:6F:6D",
"D4:DB:F1:B4:73:64"
],
"params": "params=superhappyfuntime"
}
Attempt to update:
curl -X PUT \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
--data @compute.json https://my.openchami.cluster/boot/v1/bootparameters
This returns:
{"type":"about:blank","title":"Bad Request","detail":"No data","status":400}
Convert to lowercase:
{
"initrd": "http://webserver/initramfs.img",
"kernel": "http://webserver/vmlinuz",
"macs": [
"D4:DB:F1:B4:6F:6D",
"D4:DB:F1:B4:73:64"
],
"params": "params=superhappyfuntime"
}
Try curl again and now I get 200/OK response
Expected behavior
Expect the initrd, kernel, and params to be update for these MACs without having to care about lower or uppercase MAC addresses
Describe the bug
PUTs to
/boot/v1/bootparameterswill fail if entries inmacshave uppercase letters instead of lowercaseTo Reproduce
Make payload
{ "initrd": "http://webserver/initramfs.img", "kernel": "http://webserver/vmlinuz", "macs": [ "D4:DB:F1:B4:6F:6D", "D4:DB:F1:B4:73:64" ], "params": "params=superhappyfuntime" }Attempt to update:
This returns:
Convert to lowercase:
{ "initrd": "http://webserver/initramfs.img", "kernel": "http://webserver/vmlinuz", "macs": [ "D4:DB:F1:B4:6F:6D", "D4:DB:F1:B4:73:64" ], "params": "params=superhappyfuntime" }Try
curlagain and now I get 200/OK responseExpected behavior
Expect the
initrd,kernel, andparamsto be update for these MACs without having to care about lower or uppercase MAC addresses