Bug noticed while reviewing #985 but not actually introduced by that PR.
These lines in the mock NIC create endpoint (which were already there) mean that any NIC create without a VPC name and a subnet name will 404.
|
const [vpc, vpcErr] = lookupVpc({ ...req.params, vpcName: vpc_name }) |
|
if (vpcErr) return res(vpcErr) |
|
|
|
const [subnet, subnetErr] = lookupVpcSubnet({ |
|
...req.params, |
|
vpcName: vpc_name, |
|
subnetName: subnet_name, |
|
}) |
|
if (subnetErr) return res(subnetErr) |
Turns out these are not actually optional on the POST, which is a relief because I did not understand how that would work. So those fields should be marked required in the create form.
https://github.com/oxidecomputer/omicron/blob/a0e5d59a3190b40138c5d6928f6cb89aebb00e9b/nexus/src/external_api/params.rs#L275-L287
Bug noticed while reviewing #985 but not actually introduced by that PR.
These lines in the mock NIC create endpoint (which were already there) mean that any NIC create without a VPC name and a subnet name will 404.
console/libs/api-mocks/msw/handlers.ts
Lines 491 to 499 in 1f746d5
Turns out these are not actually optional on the POST, which is a relief because I did not understand how that would work. So those fields should be marked required in the create form.
https://github.com/oxidecomputer/omicron/blob/a0e5d59a3190b40138c5d6928f6cb89aebb00e9b/nexus/src/external_api/params.rs#L275-L287