-
Notifications
You must be signed in to change notification settings - Fork 357
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
feat: [M3-6724]: Linode Config & Interface endpoints, validation, and React Query queries #9418
Changes from all commits
29f8995
50f9ae4
f3c767e
60e35ac
d87052e
7ddef06
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@linode/api-v4": Added | ||
--- | ||
|
||
New methods for Linode Configs and new/updated Linode Config and interface types ([#9418](https://github.com/linode/manager/pull/9418)) |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -147,17 +147,40 @@ export type LinodeStatus = | |
| 'restoring' | ||
| 'stopped'; | ||
|
||
export type InterfacePurpose = 'public' | 'vlan'; | ||
export type InterfacePurpose = 'public' | 'vlan' | 'vpc'; | ||
|
||
export interface ConfigInterfaceIPv4 { | ||
vpc?: string; | ||
nat_1_1?: string; | ||
} | ||
|
||
export interface ConfigInterfaceIPv6 { | ||
vpc?: string; | ||
} | ||
|
||
export interface Interface { | ||
id: number; | ||
label: string | null; | ||
purpose: InterfacePurpose; | ||
ipam_address: string | null; | ||
primary?: boolean; | ||
subnet?: number | null; | ||
ipv4?: ConfigInterfaceIPv4; | ||
ipv6?: ConfigInterfaceIPv6; | ||
ip_ranges?: string[]; | ||
Comment on lines
+166
to
+170
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. Should we create a new LinodeConfigInterface that extends Interface instead of having all these optional props? 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. Based on how |
||
} | ||
|
||
export type InterfacePayload = Omit<Interface, 'id'>; | ||
|
||
export interface ConfigInterfaceOrderPayload { | ||
ids: number[]; | ||
} | ||
|
||
export type UpdateConfigInterfacePayload = Pick< | ||
Interface, | ||
'primary' | 'ipv4' | 'ipv6' | 'ip_ranges' | ||
>; | ||
|
||
export interface Config { | ||
id: number; | ||
kernel: string; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@linode/manager": Tech Stories | ||
--- | ||
|
||
React Query queries for Linode Configs ([#9418](https://github.com/linode/manager/pull/9418)) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@linode/validation": Added | ||
--- | ||
|
||
Linode Config and interface validation ([#9418](https://github.com/linode/manager/pull/9418)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this ever going to get sorted and/or paginated? If so you need params and x-filter. I think x-filter should be the minimum if we're going to present this data in a table which I assume we wil
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a non-paginated finite list returned in devnum order. I asked the API team about params and filters on Wednesday morning; there are no plans to add any at the moment, and based on our UI wireframes, we don't have a real need for them as there won't be a new table for this specific data.