Skip to content

[BUG] #70

@travisbcotton

Description

@travisbcotton

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions