diff --git a/OMICRON_VERSION b/OMICRON_VERSION index 3e198f7ea..9aee6aa21 100644 --- a/OMICRON_VERSION +++ b/OMICRON_VERSION @@ -1 +1 @@ -97fe552507bf5cdfaaa85a3256e337df5b5b05c4 +9b595e985721f8ab83d13c4dc4f257cbf8ac525c diff --git a/app/api/__generated__/Api.ts b/app/api/__generated__/Api.ts index ad814709f..c3be08b39 100644 --- a/app/api/__generated__/Api.ts +++ b/app/api/__generated__/Api.ts @@ -1934,8 +1934,6 @@ export type InstanceSerialConsoleData = { lastByteOffset: number } -export type IpKind = 'snat' | 'floating' | 'ephemeral' - /** * A collection of IP ranges. If a pool is linked to a silo, IP addresses from the pool can be allocated within that silo */ @@ -2060,7 +2058,7 @@ export type IpPoolUtilization = { /** * A range of IP ports * - * An inclusive-inclusive range of IP ports. The second port may be omitted to represent a single port + * An inclusive-inclusive range of IP ports. The second port may be omitted to represent a single port. */ export type L4PortRange = string @@ -2378,10 +2376,12 @@ export type ProbeCreate = { sled: string } +export type ProbeExternalIpKind = 'snat' | 'floating' | 'ephemeral' + export type ProbeExternalIp = { firstPort: number ip: string - kind: IpKind + kind: ProbeExternalIpKind lastPort: number } @@ -3445,7 +3445,14 @@ export type TimeseriesQuery = { /** * Measurement units for timeseries samples. */ -export type Units = 'count' | 'bytes' +export type Units = + | 'count' + | 'bytes' + | 'seconds' + | 'nanoseconds' + + /** No meaningful units, e.g. a dimensionless quanity. */ + | 'none' /** * The schema for a timeseries. @@ -3507,7 +3514,7 @@ export type User = { /** * View of a Built-in User * - * A Built-in User is explicitly created as opposed to being derived from an Identify Provider. + * Built-in users are identities internal to the system, used when the control plane performs actions autonomously */ export type UserBuiltin = { /** human-readable free-form text about a resource */ @@ -3533,9 +3540,9 @@ export type UserBuiltinResultsPage = { } /** - * A name unique within the parent collection + * A username for a local-only user * - * Names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and '-', and may not end with a '-'. Names cannot be a UUID, but they may contain a UUID. They can be at most 63 characters long. + * Usernames must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and '-', and may not end with a '-'. Usernames cannot be a UUID, but they may contain a UUID. They can be at most 63 characters long. */ export type UserId = string @@ -3645,12 +3652,12 @@ export type VpcFirewallRuleHostFilter = export type VpcFirewallRuleProtocol = 'TCP' | 'UDP' | 'ICMP' /** - * Filter for a firewall rule. A given packet must match every field that is present for the rule to apply to it. A packet matches a field if any entry in that field matches the packet. + * Filters reduce the scope of a firewall rule. Without filters, the rule applies to all packets to the targets (or from the targets, if it's an outbound rule). With multiple filters, the rule applies only to packets matching ALL filters. The maximum number of each type of filter is 256. */ export type VpcFirewallRuleFilter = { - /** If present, the sources (if incoming) or destinations (if outgoing) this rule applies to. */ + /** If present, host filters match the "other end" of traffic from the target’s perspective: for an inbound rule, they match the source of traffic. For an outbound rule, they match the destination. */ hosts?: VpcFirewallRuleHostFilter[] - /** If present, the destination ports this rule applies to. */ + /** If present, the destination ports or port ranges this rule applies to. */ ports?: L4PortRange[] /** If present, the networking protocols this rule applies to. */ protocols?: VpcFirewallRuleProtocol[] @@ -3659,7 +3666,7 @@ export type VpcFirewallRuleFilter = { export type VpcFirewallRuleStatus = 'disabled' | 'enabled' /** - * A `VpcFirewallRuleTarget` is used to specify the set of `Instance`s to which a firewall rule applies. + * A `VpcFirewallRuleTarget` is used to specify the set of instances to which a firewall rule applies. You can target instances directly by name, or specify a VPC, VPC subnet, IP, or IP subnet, which will apply the rule to traffic going to all matching instances. Targets are additive: the rule applies to instances matching ANY target. */ export type VpcFirewallRuleTarget = /** The rule applies to all instances in the VPC */ @@ -3677,29 +3684,29 @@ export type VpcFirewallRuleTarget = * A single rule in a VPC firewall */ export type VpcFirewallRule = { - /** whether traffic matching the rule should be allowed or dropped */ + /** Whether traffic matching the rule should be allowed or dropped */ action: VpcFirewallRuleAction /** human-readable free-form text about a resource */ description: string - /** whether this rule is for incoming or outgoing traffic */ + /** Whether this rule is for incoming or outgoing traffic */ direction: VpcFirewallRuleDirection - /** reductions on the scope of the rule */ + /** Reductions on the scope of the rule */ filters: VpcFirewallRuleFilter /** unique, immutable, system-controlled identifier for each resource */ id: string /** unique, mutable, user-controlled identifier for each resource */ name: Name - /** the relative priority of this rule */ + /** The relative priority of this rule */ priority: number - /** whether this rule is in effect */ + /** Whether this rule is in effect */ status: VpcFirewallRuleStatus - /** list of sets of instances that the rule applies to */ + /** Determine the set of instances that the rule applies to */ targets: VpcFirewallRuleTarget[] /** timestamp when this resource was created */ timeCreated: Date /** timestamp when this resource was last modified */ timeModified: Date - /** the VPC to which this rule belongs */ + /** The VPC to which this rule belongs */ vpcId: string } @@ -3707,26 +3714,26 @@ export type VpcFirewallRule = { * A single rule in a VPC firewall */ export type VpcFirewallRuleUpdate = { - /** whether traffic matching the rule should be allowed or dropped */ + /** Whether traffic matching the rule should be allowed or dropped */ action: VpcFirewallRuleAction - /** human-readable free-form text about a resource */ + /** Human-readable free-form text about a resource */ description: string - /** whether this rule is for incoming or outgoing traffic */ + /** Whether this rule is for incoming or outgoing traffic */ direction: VpcFirewallRuleDirection - /** reductions on the scope of the rule */ + /** Reductions on the scope of the rule */ filters: VpcFirewallRuleFilter - /** name of the rule, unique to this VPC */ + /** Name of the rule, unique to this VPC */ name: Name - /** the relative priority of this rule */ + /** The relative priority of this rule */ priority: number - /** whether this rule is in effect */ + /** Whether this rule is in effect */ status: VpcFirewallRuleStatus - /** list of sets of instances that the rule applies to */ + /** Determine the set of instances that the rule applies to */ targets: VpcFirewallRuleTarget[] } /** - * Updateable properties of a `Vpc`'s firewall Note that VpcFirewallRules are implicitly created along with a Vpc, so there is no explicit creation. + * Updated list of firewall rules. Will replace all existing rules. */ export type VpcFirewallRuleUpdateParams = { rules: VpcFirewallRuleUpdate[] } @@ -7097,15 +7104,15 @@ export class Api extends HttpClient { }) }, /** - * Create new BGP announce set + * Update BGP announce set */ - networkingBgpAnnounceSetCreate: ( + networkingBgpAnnounceSetUpdate: ( { body }: { body: BgpAnnounceSetCreate }, params: FetchParams = {} ) => { return this.request({ path: `/v1/system/networking/bgp-announce`, - method: 'POST', + method: 'PUT', body, ...params, }) diff --git a/app/api/__generated__/OMICRON_VERSION b/app/api/__generated__/OMICRON_VERSION index 29787943f..d58cb112e 100644 --- a/app/api/__generated__/OMICRON_VERSION +++ b/app/api/__generated__/OMICRON_VERSION @@ -1,2 +1,2 @@ # generated file. do not update manually. see docs/update-pinned-api.md -97fe552507bf5cdfaaa85a3256e337df5b5b05c4 +9b595e985721f8ab83d13c4dc4f257cbf8ac525c diff --git a/app/api/__generated__/msw-handlers.ts b/app/api/__generated__/msw-handlers.ts index a91f95b23..e9cf7103f 100644 --- a/app/api/__generated__/msw-handlers.ts +++ b/app/api/__generated__/msw-handlers.ts @@ -938,8 +938,8 @@ export interface MSWHandlers { req: Request cookies: Record }) => Promisable> - /** `POST /v1/system/networking/bgp-announce` */ - networkingBgpAnnounceSetCreate: (params: { + /** `PUT /v1/system/networking/bgp-announce` */ + networkingBgpAnnounceSetUpdate: (params: { body: Json req: Request cookies: Record @@ -2103,9 +2103,9 @@ export function makeHandlers(handlers: MSWHandlers): HttpHandler[] { null ) ), - http.post( + http.put( '/v1/system/networking/bgp-announce', - handler(handlers['networkingBgpAnnounceSetCreate'], null, schema.BgpAnnounceSetCreate) + handler(handlers['networkingBgpAnnounceSetUpdate'], null, schema.BgpAnnounceSetCreate) ), http.delete( '/v1/system/networking/bgp-announce', diff --git a/app/api/__generated__/validate.ts b/app/api/__generated__/validate.ts index ad806adfb..e79c628b5 100644 --- a/app/api/__generated__/validate.ts +++ b/app/api/__generated__/validate.ts @@ -248,7 +248,11 @@ export const AuthzScope = z.preprocess( */ export const Baseboard = z.preprocess( processResponseBody, - z.object({ part: z.string(), revision: z.number(), serial: z.string() }) + z.object({ + part: z.string(), + revision: z.number().min(0).max(4294967295), + serial: z.string(), + }) ) /** @@ -1829,11 +1833,6 @@ export const InstanceSerialConsoleData = z.preprocess( z.object({ data: z.number().min(0).max(255).array(), lastByteOffset: z.number().min(0) }) ) -export const IpKind = z.preprocess( - processResponseBody, - z.enum(['snat', 'floating', 'ephemeral']) -) - /** * A collection of IP ranges. If a pool is linked to a silo, IP addresses from the pool can be allocated within that silo */ @@ -1969,7 +1968,7 @@ export const IpPoolUtilization = z.preprocess( /** * A range of IP ports * - * An inclusive-inclusive range of IP ports. The second port may be omitted to represent a single port + * An inclusive-inclusive range of IP ports. The second port may be omitted to represent a single port. */ export const L4PortRange = z.preprocess( processResponseBody, @@ -2263,12 +2262,17 @@ export const ProbeCreate = z.preprocess( }) ) +export const ProbeExternalIpKind = z.preprocess( + processResponseBody, + z.enum(['snat', 'floating', 'ephemeral']) +) + export const ProbeExternalIp = z.preprocess( processResponseBody, z.object({ firstPort: z.number().min(0).max(65535), ip: z.string().ip(), - kind: IpKind, + kind: ProbeExternalIpKind, lastPort: z.number().min(0).max(65535), }) ) @@ -3209,7 +3213,10 @@ export const TimeseriesQuery = z.preprocess( /** * Measurement units for timeseries samples. */ -export const Units = z.preprocess(processResponseBody, z.enum(['count', 'bytes'])) +export const Units = z.preprocess( + processResponseBody, + z.union([z.enum(['count', 'bytes', 'seconds', 'nanoseconds']), z.enum(['none'])]) +) /** * The schema for a timeseries. @@ -3277,7 +3284,7 @@ export const User = z.preprocess( /** * View of a Built-in User * - * A Built-in User is explicitly created as opposed to being derived from an Identify Provider. + * Built-in users are identities internal to the system, used when the control plane performs actions autonomously */ export const UserBuiltin = z.preprocess( processResponseBody, @@ -3299,9 +3306,9 @@ export const UserBuiltinResultsPage = z.preprocess( ) /** - * A name unique within the parent collection + * A username for a local-only user * - * Names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and '-', and may not end with a '-'. Names cannot be a UUID, but they may contain a UUID. They can be at most 63 characters long. + * Usernames must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and '-', and may not end with a '-'. Usernames cannot be a UUID, but they may contain a UUID. They can be at most 63 characters long. */ export const UserId = z.preprocess( processResponseBody, @@ -3421,7 +3428,7 @@ export const VpcFirewallRuleProtocol = z.preprocess( ) /** - * Filter for a firewall rule. A given packet must match every field that is present for the rule to apply to it. A packet matches a field if any entry in that field matches the packet. + * Filters reduce the scope of a firewall rule. Without filters, the rule applies to all packets to the targets (or from the targets, if it's an outbound rule). With multiple filters, the rule applies only to packets matching ALL filters. The maximum number of each type of filter is 256. */ export const VpcFirewallRuleFilter = z.preprocess( processResponseBody, @@ -3438,7 +3445,7 @@ export const VpcFirewallRuleStatus = z.preprocess( ) /** - * A `VpcFirewallRuleTarget` is used to specify the set of `Instance`s to which a firewall rule applies. + * A `VpcFirewallRuleTarget` is used to specify the set of instances to which a firewall rule applies. You can target instances directly by name, or specify a VPC, VPC subnet, IP, or IP subnet, which will apply the rule to traffic going to all matching instances. Targets are additive: the rule applies to instances matching ANY target. */ export const VpcFirewallRuleTarget = z.preprocess( processResponseBody, @@ -3490,7 +3497,7 @@ export const VpcFirewallRuleUpdate = z.preprocess( ) /** - * Updateable properties of a `Vpc`'s firewall Note that VpcFirewallRules are implicitly created along with a Vpc, so there is no explicit creation. + * Updated list of firewall rules. Will replace all existing rules. */ export const VpcFirewallRuleUpdateParams = z.preprocess( processResponseBody, @@ -5187,7 +5194,7 @@ export const NetworkingBgpAnnounceSetListParams = z.preprocess( }) ) -export const NetworkingBgpAnnounceSetCreateParams = z.preprocess( +export const NetworkingBgpAnnounceSetUpdateParams = z.preprocess( processResponseBody, z.object({ path: z.object({}), diff --git a/mock-api/msw/handlers.ts b/mock-api/msw/handlers.ts index 813804d69..5d794d819 100644 --- a/mock-api/msw/handlers.ts +++ b/mock-api/msw/handlers.ts @@ -1330,7 +1330,7 @@ export const handlers = makeHandlers({ networkingBfdDisable: NotImplemented, networkingBfdEnable: NotImplemented, networkingBfdStatus: NotImplemented, - networkingBgpAnnounceSetCreate: NotImplemented, + networkingBgpAnnounceSetUpdate: NotImplemented, networkingBgpAnnounceSetDelete: NotImplemented, networkingBgpAnnounceSetList: NotImplemented, networkingBgpConfigCreate: NotImplemented,