-
Notifications
You must be signed in to change notification settings - Fork 167
fix(rest-api): Prevent user from updating ExpectedRack rackId after creation #4461
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 1 commit
864f679
e33d919
0695beb
b262c12
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4765,6 +4765,8 @@ paths: | |
| Infrastructure Provider must own the Expected Rack. | ||
|
|
||
| Alternatively, Tenant Admins with `TargetedInstanceCreation` capability can also update Expected Racks if they have an account with the Site's Infrastructure Provider. | ||
|
|
||
| `rackId` is immutable: an update that changes it is rejected with `400` before any database mutation. | ||
| requestBody: | ||
| content: | ||
| application/json: | ||
|
|
@@ -24364,6 +24366,8 @@ components: | |
|
|
||
| For single updates (PATCH /expected-rack/{id}), the `id` field is optional in the body and will be ignored if provided (the `id` from the URL path is used). | ||
|
|
||
| The `rackId` field is immutable on update — omit it or provide the existing value. Renaming an Expected Rack is not supported. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would omit the follow up
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. thanks for the review, @thossain-nv! You're right that in NICo REST, 'rename' refers to the |
||
|
|
||
| Chassis identity and physical location information are conveyed via well-known label keys in `labels`: | ||
| - `chassis.manufacturer`, `chassis.serial-number`, `chassis.model` | ||
| - `location.region`, `location.datacenter`, `location.room`, `location.position` | ||
|
|
@@ -24390,7 +24394,9 @@ components: | |
| - string | ||
| - 'null' | ||
| minLength: 1 | ||
| description: Optional new operator-supplied rack identifier. If provided, must be non-empty and unique within the Site. | ||
| deprecated: true | ||
| description: |- | ||
| Operator-supplied rack identifier. Immutable on update: omit this field, or provide the existing value as a compatibility no-op. A changed value is rejected because Core and Flow use rackId as the identity key for expected racks. | ||
|
coderabbitai[bot] marked this conversation as resolved.
Outdated
|
||
| rackProfileId: | ||
| type: | ||
| - string | ||
|
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.