-
Notifications
You must be signed in to change notification settings - Fork 367
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
upcoming: [M3-9088] - Add and update /v4/networking
endpoints and types for Linode Interfaces
#11559
upcoming: [M3-9088] - Add and update /v4/networking
endpoints and types for Linode Interfaces
#11559
Changes from 4 commits
6b0dcb1
ea620a9
4ecb67d
f2efad0
f16b77d
ab3f5ae
1052278
9c5476b
1054436
ddd0ced
ffb8d72
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": Upcoming Features | ||
--- | ||
|
||
Add and update `/v4/networking` endpoints and types for Linode Interfaces ([#11559](https://github.com/linode/manager/pull/11559)) |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ export type FirewallStatus = 'enabled' | 'disabled' | 'deleted'; | |
|
||
export type FirewallRuleProtocol = 'ALL' | 'TCP' | 'UDP' | 'ICMP' | 'IPENCAP'; | ||
|
||
export type FirewallDeviceEntityType = 'linode' | 'nodebalancer'; | ||
export type FirewallDeviceEntityType = 'linode' | 'nodebalancer' | 'interface'; | ||
|
||
export type FirewallPolicyType = 'ACCEPT' | 'DROP'; | ||
|
||
|
@@ -14,19 +14,16 @@ export interface Firewall { | |
rules: FirewallRules; | ||
created: string; | ||
updated: string; | ||
entities: { | ||
id: number; | ||
type: FirewallDeviceEntityType; | ||
label: string; | ||
url: string; | ||
}[]; | ||
Comment on lines
-17
to
-22
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. replacing this with FirewallDeviceEntity since it already exists
|
||
entities: FirewallDeviceEntity[]; | ||
} | ||
|
||
export interface FirewallRules { | ||
fingerprint?: string; | ||
coliu-akamai marked this conversation as resolved.
Show resolved
Hide resolved
|
||
inbound?: FirewallRuleType[] | null; | ||
outbound?: FirewallRuleType[] | null; | ||
inbound_policy: FirewallPolicyType; | ||
outbound_policy: FirewallPolicyType; | ||
version?: number; | ||
} | ||
|
||
export interface FirewallRuleType { | ||
|
@@ -55,8 +52,10 @@ export interface FirewallDevice { | |
entity: FirewallDeviceEntity; | ||
} | ||
|
||
export type FirewallTemplateSlug = 'akamai-non-prod' | 'vpc' | 'public'; | ||
|
||
export interface FirewallTemplate { | ||
slug: string; | ||
slug: FirewallTemplateSlug; | ||
rules: FirewallRules; | ||
} | ||
|
||
|
@@ -67,6 +66,7 @@ export interface CreateFirewallPayload { | |
devices?: { | ||
linodes?: number[]; | ||
nodebalancers?: number[]; | ||
interfaces?: number[]; | ||
}; | ||
} | ||
|
||
|
@@ -80,3 +80,18 @@ export interface FirewallDevicePayload { | |
id: number; | ||
type: FirewallDeviceEntityType; | ||
} | ||
|
||
export interface DefaultFirewallIDs { | ||
interface_public: number; | ||
interface_vpc: number; | ||
linode: number; | ||
nodebalancer: number; | ||
} | ||
|
||
export interface FirewallSettings { | ||
default_firewall_ids: DefaultFirewallIDs; | ||
} | ||
|
||
export interface UpdateFirewallSettings { | ||
default_firewall_ids: Partial<DefaultFirewallIDs>; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,13 @@ export interface IPAddress { | |
public: boolean; | ||
rdns: string | null; | ||
linode_id: number; | ||
interface_id: number | null; | ||
region: string; | ||
vpc_nat_1_1?: { | ||
address: string; | ||
subnet_id: number; | ||
vpc_id: number; | ||
} | null; | ||
Comment on lines
+12
to
+16
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. adding this field (looks like we were missing it previously). It got returned either as the object or a |
||
} | ||
|
||
export interface IPRangeBaseData { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@linode/manager": Upcoming Features | ||
--- | ||
|
||
Fix type errors that result from changes to `/v4/networking` endpoints ([#11559](https://github.com/linode/manager/pull/11559)) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@linode/validation": Upcoming Features | ||
--- | ||
|
||
Add `UpdateFirewallSettingsSchema`for Linode Interfaces project ([#11559](https://github.com/linode/manager/pull/11559)) |
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.
These two endpoints (
getTemplates
andgetTemplate
) were added during the Securing VMs project (see internal ticket - I linked the spec there). I updated the templateSlug type to be more specific - I believe these are the three templates that exist so far, but am not sure. Since there may be a possibility for more slugs I'm not aware of, happy to switch back tostring
tooI've currently typed it as
export type FirewallTemplateSlug = 'akamai-non-prod' | 'vpc' | 'public'
See internal comments on spec about some naming updates - when testing the endpoint, I saw that
vpc
andpublic
are the returned slugs