diff --git a/OMICRON_VERSION b/OMICRON_VERSION index 32003e3..be6a09b 100644 --- a/OMICRON_VERSION +++ b/OMICRON_VERSION @@ -1 +1 @@ -e81e2a717bce26bd6c89814b51d0b953c5f440f0 +26b33a11962d82b29fde9a2e3233d038d5495c44 diff --git a/oxide-api/src/Api.ts b/oxide-api/src/Api.ts index a752e2d..163e694 100644 --- a/oxide-api/src/Api.ts +++ b/oxide-api/src/Api.ts @@ -56,6 +56,49 @@ export type Address = { vlanId?: number | null; }; +/** + * The IP address version. + */ +export type IpVersion = "v4" | "v6"; + +/** + * Specify which IP pool to allocate from. + */ +export type PoolSelector = + /** Use the specified pool by name or ID. */ + | { + /** The pool to allocate from. */ + pool: NameOrId; + type: "explicit"; + } + /** Use the default pool for the silo. */ + | { + /** IP version to use when multiple default pools exist. Required if both IPv4 and IPv6 default pools are configured. */ + ipVersion?: IpVersion | null; + type: "auto"; + }; + +/** + * Specify how to allocate a floating IP address. + */ +export type AddressAllocator = + /** Reserve a specific IP address. */ + | { + /** The IP address to reserve. Must be available in the pool. */ + ip: string; + /** The pool containing this address. If not specified, the default pool for the address's IP version is used. */ + pool?: NameOrId | null; + type: "explicit"; + } + /** Automatically allocate an IP address from a specified pool. */ + | { + /** Pool selection. + +If omitted, this field uses the silo's default pool. If the silo has default pools for both IPv4 and IPv6, the request will fail unless `ip_version` is specified in the pool selector. */ + poolSelector?: PoolSelector; + type: "auto"; + }; + /** * A set of addresses associated with a port configuration. */ @@ -168,49 +211,6 @@ export type AddressLotViewResponse = { lot: AddressLot; }; -/** - * The IP address version. - */ -export type IpVersion = "v4" | "v6"; - -/** - * Specify which IP pool to allocate from. - */ -export type PoolSelector = - /** Use the specified pool by name or ID. */ - | { - /** The pool to allocate from. */ - pool: NameOrId; - type: "explicit"; - } - /** Use the default pool for the silo. */ - | { - /** IP version to use when multiple default pools exist. Required if both IPv4 and IPv6 default pools are configured. */ - ipVersion?: IpVersion | null; - type: "auto"; - }; - -/** - * Specify how to allocate a floating IP address. - */ -export type AddressSelector = - /** Reserve a specific IP address. */ - | { - /** The IP address to reserve. Must be available in the pool. */ - ip: string; - /** The pool containing this address. If not specified, the default pool for the address's IP version is used. */ - pool?: NameOrId | null; - type: "explicit"; - } - /** Automatically allocate an IP address from a specified pool. */ - | { - /** Pool selection. - -If omitted, this field uses the silo's default pool. If the silo has default pools for both IPv4 and IPv6, the request will fail unless `ip_version` is specified in the pool selector. */ - poolSelector?: PoolSelector; - type: "auto"; - }; - /** * Describes the scope of affinity for the purposes of co-location. */ @@ -679,6 +679,19 @@ export type AuditLogEntryActor = | { kind: "scim"; siloId: string } | { kind: "unauthenticated" }; +/** + * Authentication method used for a request + */ +export type AuthMethod = + /** Console session cookie */ + | "session_cookie" + + /** Device access token (OAuth 2.0 device authorization flow) */ + | "access_token" + + /** SCIM client bearer token */ + | "scim_token"; + /** * Result of an audit log entry */ @@ -705,8 +718,10 @@ export type AuditLogEntryResult = */ export type AuditLogEntry = { actor: AuditLogEntryActor; - /** How the user authenticated the request. Possible values are "session_cookie" and "access_token". Optional because it will not be defined on unauthenticated requests like login attempts. */ - authMethod?: string | null; + /** How the user authenticated the request (access token, session, or SCIM token). Null for unauthenticated requests like login attempts. */ + authMethod?: AuthMethod | null; + /** ID of the credential used for authentication. Null for unauthenticated requests. The value of `auth_method` indicates what kind of credential it is (access token, session, or SCIM token). */ + credentialId?: string | null; /** Unique identifier for the audit log entry */ id: string; /** API endpoint ID, e.g., `project_create` */ @@ -2178,7 +2193,7 @@ export type FloatingIpAttach = { */ export type FloatingIpCreate = { /** IP address allocation method. */ - addressSelector?: AddressSelector; + addressAllocator?: AddressAllocator; description: string; name: Name; }; @@ -2437,6 +2452,27 @@ export type InstanceDiskAttachment = type: "attach"; }; +/** + * A multicast group identifier + * + * Can be a UUID, a name, or an IP address + */ +export type MulticastGroupIdentifier = string; + +/** + * Specification for joining a multicast group with optional source filtering. + * + * Used in `InstanceCreate` and `InstanceUpdate` to specify multicast group membership along with per-member source IP configuration. + */ +export type MulticastGroupJoinSpec = { + /** The multicast group to join, specified by name, UUID, or IP address. */ + group: MulticastGroupIdentifier; + /** IP version for pool selection when creating a group by name. Required if both IPv4 and IPv6 default multicast pools are linked. */ + ipVersion?: IpVersion | null; + /** Source IPs for source-filtered multicast (SSM). Optional for ASM groups, required for SSM groups (232.0.0.0/8, ff3x::/32). */ + sourceIps?: string[] | null; +}; + /** * How a VPC-private IP address is assigned to a network interface. */ @@ -2565,10 +2601,10 @@ By default, all instances have outbound connectivity, but no inbound connectivit hostname: Hostname; /** The amount of RAM (in bytes) to be allocated to the instance */ memory: ByteCount; - /** The multicast groups this instance should join. + /** Multicast groups this instance should join at creation. -The instance will be automatically added as a member of the specified multicast groups during creation, enabling it to send and receive multicast traffic for those groups. */ - multicastGroups?: NameOrId[]; +Groups can be specified by name, UUID, or IP address. Non-existent groups are created automatically. */ + multicastGroups?: MulticastGroupJoinSpec[]; name: Name; /** The number of vCPUs to be allocated to the instance */ ncpus: InstanceCpuCount; @@ -2584,6 +2620,18 @@ If not provided, all SSH public keys from the user's profile will be sent. If an userData?: string; }; +/** + * Parameters for joining an instance to a multicast group. + * + * When joining by IP address, the pool containing the multicast IP is auto-discovered from all linked multicast pools. + */ +export type InstanceMulticastGroupJoin = { + /** IP version for pool selection when creating a group by name. Required if both IPv4 and IPv6 default multicast pools are linked. */ + ipVersion?: IpVersion | null; + /** Source IPs for source-filtered multicast (SSM). Optional for ASM groups, required for SSM groups (232.0.0.0/8, ff3x::/32). */ + sourceIps?: string[] | null; +}; + /** * The VPC-private IPv4 stack for a network interface */ @@ -2725,8 +2773,10 @@ An instance that does not have a boot disk set will use the boot options specifi When specified, this replaces the instance's current multicast group membership with the new set of groups. The instance will leave any groups not listed here and join any new groups that are specified. -If not provided (None), the instance's multicast group membership will not be changed. */ - multicastGroups?: NameOrId[] | null; +Each entry can specify the group by name, UUID, or IP address, along with optional source IP filtering for SSM (Source-Specific Multicast). When a group doesn't exist, it will be implicitly created using the default multicast pool (or you can specify `ip_version` to disambiguate if needed). + +If not provided, the instance's multicast group membership will not be changed. */ + multicastGroups?: MulticastGroupJoinSpec[] | null; /** The number of vCPUs to be allocated to the instance */ ncpus: InstanceCpuCount; }; @@ -3253,7 +3303,9 @@ export type MulticastGroup = { mvlan?: number | null; /** unique, mutable, user-controlled identifier for each resource */ name: Name; - /** Source IP addresses for Source-Specific Multicast (SSM). Empty array means any source is allowed. */ + /** Union of all member source IP addresses (computed, read-only). + +This field shows the combined source IPs across all group members. Individual members may subscribe to different sources; this union reflects all sources that any member is subscribed to. Empty array means no members have source filtering enabled. */ sourceIps: string[]; /** Current state of the multicast group. */ state: string; @@ -3263,26 +3315,6 @@ export type MulticastGroup = { timeModified: Date; }; -/** - * Create-time parameters for a multicast group. - */ -export type MulticastGroupCreate = { - description: string; - /** The multicast IP address to allocate. If None, one will be allocated from the default pool. */ - multicastIp?: string | null; - /** Multicast VLAN (MVLAN) for egress multicast traffic to upstream networks. Tags packets leaving the rack to traverse VLAN-segmented upstream networks. - -Valid range: 2-4094 (VLAN IDs 0-1 are reserved by IEEE 802.1Q standard). */ - mvlan?: number | null; - name: Name; - /** Name or ID of the IP pool to allocate from. If None, uses the default multicast pool. */ - pool?: NameOrId | null; - /** Source IP addresses for Source-Specific Multicast (SSM). - -None uses default behavior (Any-Source Multicast). Empty list explicitly allows any source (Any-Source Multicast). Non-empty list restricts to specific sources (SSM). */ - sourceIps?: string[] | null; -}; - /** * View of a Multicast Group Member (instance belonging to a multicast group) */ @@ -3295,8 +3327,14 @@ export type MulticastGroupMember = { instanceId: string; /** The ID of the multicast group this member belongs to. */ multicastGroupId: string; + /** The multicast IP address of the group this member belongs to. */ + multicastIp: string; /** unique, mutable, user-controlled identifier for each resource */ name: Name; + /** Source IP addresses for this member's multicast subscription. + +- **ASM**: Sources are optional. Empty array means any source is allowed. Non-empty array enables source filtering (IGMPv3/MLDv2). - **SSM**: Sources are required for SSM addresses (232/8, ff3x::/32). */ + sourceIps: string[]; /** Current state of the multicast group membership. */ state: string; /** timestamp when this resource was created */ @@ -3305,14 +3343,6 @@ export type MulticastGroupMember = { timeModified: Date; }; -/** - * Parameters for adding an instance to a multicast group. - */ -export type MulticastGroupMemberAdd = { - /** Name or ID of the instance to add to the multicast group */ - instance: NameOrId; -}; - /** * A single page of results */ @@ -3333,17 +3363,6 @@ export type MulticastGroupResultsPage = { nextPage?: string | null; }; -/** - * Update-time parameters for a multicast group. - */ -export type MulticastGroupUpdate = { - description?: string | null; - /** Multicast VLAN (MVLAN) for egress multicast traffic to upstream networks. Set to null to clear the MVLAN. Valid range: 2-4094 when provided. Omit the field to leave mvlan unchanged. */ - mvlan?: number | null; - name?: Name | null; - sourceIps?: string[] | null; -}; - /** * VPC-private IPv4 configuration for a network interface. */ @@ -5990,12 +6009,15 @@ export interface InstanceMulticastGroupListPathParams { } export interface InstanceMulticastGroupListQueryParams { + limit?: number | null; + pageToken?: string | null; project?: NameOrId; + sortBy?: IdSortMode; } export interface InstanceMulticastGroupJoinPathParams { instance: NameOrId; - multicastGroup: NameOrId; + multicastGroup: MulticastGroupIdentifier; } export interface InstanceMulticastGroupJoinQueryParams { @@ -6004,7 +6026,7 @@ export interface InstanceMulticastGroupJoinQueryParams { export interface InstanceMulticastGroupLeavePathParams { instance: NameOrId; - multicastGroup: NameOrId; + multicastGroup: MulticastGroupIdentifier; } export interface InstanceMulticastGroupLeaveQueryParams { @@ -6214,19 +6236,11 @@ export interface MulticastGroupListQueryParams { } export interface MulticastGroupViewPathParams { - multicastGroup: NameOrId; -} - -export interface MulticastGroupUpdatePathParams { - multicastGroup: NameOrId; -} - -export interface MulticastGroupDeletePathParams { - multicastGroup: NameOrId; + multicastGroup: MulticastGroupIdentifier; } export interface MulticastGroupMemberListPathParams { - multicastGroup: NameOrId; + multicastGroup: MulticastGroupIdentifier; } export interface MulticastGroupMemberListQueryParams { @@ -6235,23 +6249,6 @@ export interface MulticastGroupMemberListQueryParams { sortBy?: IdSortMode; } -export interface MulticastGroupMemberAddPathParams { - multicastGroup: NameOrId; -} - -export interface MulticastGroupMemberAddQueryParams { - project?: NameOrId; -} - -export interface MulticastGroupMemberRemovePathParams { - instance: NameOrId; - multicastGroup: NameOrId; -} - -export interface MulticastGroupMemberRemoveQueryParams { - project?: NameOrId; -} - export interface InstanceNetworkInterfaceListQueryParams { instance?: NameOrId; limit?: number | null; @@ -6606,10 +6603,6 @@ export interface SystemMetricQueryParams { silo?: NameOrId; } -export interface LookupMulticastGroupByIpPathParams { - address: string; -} - export interface NetworkingAddressLotListQueryParams { limit?: number | null; pageToken?: string | null; @@ -7088,7 +7081,7 @@ export class Api { * Pulled from info.version in the OpenAPI schema. Sent in the * `api-version` header on all requests. */ - apiVersion = "2026010500.0.0"; + apiVersion = "2026011600.0.0"; constructor({ host = "", baseParams = {}, token }: ApiConfig = {}) { this.host = host; @@ -7246,7 +7239,7 @@ export class Api { }); }, /** - * View a support bundle + * View support bundle */ supportBundleView: ( { path }: { path: SupportBundleViewPathParams }, @@ -7959,7 +7952,7 @@ export class Api { }); }, /** - * Create a disk + * Create disk */ diskCreate: ( { query, body }: { query: DiskCreateQueryParams; body: DiskCreate }, @@ -8614,7 +8607,7 @@ export class Api { }); }, /** - * List multicast groups for instance + * List multicast groups for an instance */ instanceMulticastGroupList: ( { @@ -8634,27 +8627,30 @@ export class Api { }); }, /** - * Join multicast group. + * Join multicast group by name, IP address, or UUID */ instanceMulticastGroupJoin: ( { path, query = {}, + body, }: { path: InstanceMulticastGroupJoinPathParams; query?: InstanceMulticastGroupJoinQueryParams; + body: InstanceMulticastGroupJoin; }, params: FetchParams = {}, ) => { return this.request({ path: `/v1/instances/${path.instance}/multicast-groups/${path.multicastGroup}`, method: "PUT", + body, query, ...params, }); }, /** - * Leave multicast group. + * Leave multicast group by name, IP address, or UUID */ instanceMulticastGroupLeave: ( { @@ -8674,7 +8670,7 @@ export class Api { }); }, /** - * Reboot an instance + * Reboot instance */ instanceReboot: ( { @@ -9126,7 +9122,7 @@ export class Api { }); }, /** - * List all multicast groups. + * List multicast groups */ multicastGroupList: ( { query = {} }: { query?: MulticastGroupListQueryParams }, @@ -9140,21 +9136,7 @@ export class Api { }); }, /** - * Create a multicast group. - */ - multicastGroupCreate: ( - { body }: { body: MulticastGroupCreate }, - params: FetchParams = {}, - ) => { - return this.request({ - path: `/v1/multicast-groups`, - method: "POST", - body, - ...params, - }); - }, - /** - * Fetch a multicast group. + * Fetch multicast group */ multicastGroupView: ( { path }: { path: MulticastGroupViewPathParams }, @@ -9167,37 +9149,7 @@ export class Api { }); }, /** - * Update a multicast group. - */ - multicastGroupUpdate: ( - { - path, - body, - }: { path: MulticastGroupUpdatePathParams; body: MulticastGroupUpdate }, - params: FetchParams = {}, - ) => { - return this.request({ - path: `/v1/multicast-groups/${path.multicastGroup}`, - method: "PUT", - body, - ...params, - }); - }, - /** - * Delete a multicast group. - */ - multicastGroupDelete: ( - { path }: { path: MulticastGroupDeletePathParams }, - params: FetchParams = {}, - ) => { - return this.request({ - path: `/v1/multicast-groups/${path.multicastGroup}`, - method: "DELETE", - ...params, - }); - }, - /** - * List members of a multicast group. + * List members of multicast group */ multicastGroupMemberList: ( { @@ -9216,49 +9168,6 @@ export class Api { ...params, }); }, - /** - * Add instance to a multicast group. - */ - multicastGroupMemberAdd: ( - { - path, - query = {}, - body, - }: { - path: MulticastGroupMemberAddPathParams; - query?: MulticastGroupMemberAddQueryParams; - body: MulticastGroupMemberAdd; - }, - params: FetchParams = {}, - ) => { - return this.request({ - path: `/v1/multicast-groups/${path.multicastGroup}/members`, - method: "POST", - body, - query, - ...params, - }); - }, - /** - * Remove instance from a multicast group. - */ - multicastGroupMemberRemove: ( - { - path, - query = {}, - }: { - path: MulticastGroupMemberRemovePathParams; - query?: MulticastGroupMemberRemoveQueryParams; - }, - params: FetchParams = {}, - ) => { - return this.request({ - path: `/v1/multicast-groups/${path.multicastGroup}/members/${path.instance}`, - method: "DELETE", - query, - ...params, - }); - }, /** * List network interfaces */ @@ -9433,7 +9342,7 @@ export class Api { }); }, /** - * Update a project + * Update project */ projectUpdate: ( { path, body }: { path: ProjectUpdatePathParams; body: ProjectUpdate }, @@ -9584,7 +9493,7 @@ export class Api { }); }, /** - * Get a physical disk + * Get physical disk */ physicalDiskView: ( { path }: { path: PhysicalDiskViewPathParams }, @@ -10110,7 +10019,7 @@ export class Api { }); }, /** - * Add range to IP pool. + * Add range to an IP pool */ ipPoolRangeAdd: ( { path, body }: { path: IpPoolRangeAddPathParams; body: IpRange }, @@ -10280,19 +10189,6 @@ export class Api { ...params, }); }, - /** - * Look up multicast group by IP address. - */ - lookupMulticastGroupByIp: ( - { path }: { path: LookupMulticastGroupByIpPathParams }, - params: FetchParams = {}, - ) => { - return this.request({ - path: `/v1/system/multicast-groups/by-ip/${path.address}`, - method: "GET", - ...params, - }); - }, /** * List address lots */ @@ -10392,7 +10288,7 @@ export class Api { }); }, /** - * Disable a BFD session + * Disable BFD session */ networkingBfdDisable: ( { body }: { body: BfdSessionDisable }, @@ -10406,7 +10302,7 @@ export class Api { }); }, /** - * Enable a BFD session + * Enable BFD session */ networkingBfdEnable: ( { body }: { body: BfdSessionEnable }, @@ -10808,7 +10704,7 @@ export class Api { }); }, /** - * Create a silo + * Create silo */ siloCreate: ({ body }: { body: SiloCreate }, params: FetchParams = {}) => { return this.request({ @@ -10832,7 +10728,7 @@ export class Api { }); }, /** - * Delete a silo + * Delete silo */ siloDelete: ( { path }: { path: SiloDeletePathParams }, @@ -11635,7 +11531,7 @@ export class Api { }); }, /** - * Update a VPC + * Update VPC */ vpcUpdate: ( { diff --git a/oxide-openapi-gen-ts/src/__snapshots__/Api.ts b/oxide-openapi-gen-ts/src/__snapshots__/Api.ts index b15ebb7..6dfc60c 100644 --- a/oxide-openapi-gen-ts/src/__snapshots__/Api.ts +++ b/oxide-openapi-gen-ts/src/__snapshots__/Api.ts @@ -52,6 +52,50 @@ export type Address = /** Optional VLAN ID for this address */ "vlanId"?: number | null,}; +/** +* The IP address version. + */ +export type IpVersion = +"v4" +| "v6" +; + +/** +* Specify which IP pool to allocate from. + */ +export type PoolSelector = +(/** Use the specified pool by name or ID. */ +| { +/** The pool to allocate from. */ +"pool": NameOrId,"type": "explicit" +,} +/** Use the default pool for the silo. */ +| { +/** IP version to use when multiple default pools exist. Required if both IPv4 and IPv6 default pools are configured. */ +"ipVersion"?: IpVersion | null,"type": "auto" +,} +); + +/** +* Specify how to allocate a floating IP address. + */ +export type AddressAllocator = +(/** Reserve a specific IP address. */ +| { +/** The IP address to reserve. Must be available in the pool. */ +"ip": string, +/** The pool containing this address. If not specified, the default pool for the address's IP version is used. */ +"pool"?: NameOrId | null,"type": "explicit" +,} +/** Automatically allocate an IP address from a specified pool. */ +| { +/** Pool selection. + +If omitted, this field uses the silo's default pool. If the silo has default pools for both IPv4 and IPv6, the request will fail unless `ip_version` is specified in the pool selector. */ +"poolSelector"?: PoolSelector,"type": "auto" +,} +); + /** * A set of addresses associated with a port configuration. */ @@ -164,50 +208,6 @@ export type AddressLotViewResponse = /** The address lot. */ "lot": AddressLot,}; -/** -* The IP address version. - */ -export type IpVersion = -"v4" -| "v6" -; - -/** -* Specify which IP pool to allocate from. - */ -export type PoolSelector = -(/** Use the specified pool by name or ID. */ -| { -/** The pool to allocate from. */ -"pool": NameOrId,"type": "explicit" -,} -/** Use the default pool for the silo. */ -| { -/** IP version to use when multiple default pools exist. Required if both IPv4 and IPv6 default pools are configured. */ -"ipVersion"?: IpVersion | null,"type": "auto" -,} -); - -/** -* Specify how to allocate a floating IP address. - */ -export type AddressSelector = -(/** Reserve a specific IP address. */ -| { -/** The IP address to reserve. Must be available in the pool. */ -"ip": string, -/** The pool containing this address. If not specified, the default pool for the address's IP version is used. */ -"pool"?: NameOrId | null,"type": "explicit" -,} -/** Automatically allocate an IP address from a specified pool. */ -| { -/** Pool selection. - -If omitted, this field uses the silo's default pool. If the silo has default pools for both IPv4 and IPv6, the request will fail unless `ip_version` is specified in the pool selector. */ -"poolSelector"?: PoolSelector,"type": "auto" -,} -); - /** * Describes the scope of affinity for the purposes of co-location. */ @@ -680,6 +680,21 @@ export type AuditLogEntryActor = ,} ); +/** +* Authentication method used for a request + */ +export type AuthMethod = +(/** Console session cookie */ +| "session_cookie" + +/** Device access token (OAuth 2.0 device authorization flow) */ +| "access_token" + +/** SCIM client bearer token */ +| "scim_token" + +); + /** * Result of an audit log entry */ @@ -704,8 +719,10 @@ export type AuditLogEntryResult = */ export type AuditLogEntry = {"actor": AuditLogEntryActor, -/** How the user authenticated the request. Possible values are "session_cookie" and "access_token". Optional because it will not be defined on unauthenticated requests like login attempts. */ -"authMethod"?: string | null, +/** How the user authenticated the request (access token, session, or SCIM token). Null for unauthenticated requests like login attempts. */ +"authMethod"?: AuthMethod | null, +/** ID of the credential used for authentication. Null for unauthenticated requests. The value of `auth_method` indicates what kind of credential it is (access token, session, or SCIM token). */ +"credentialId"?: string | null, /** Unique identifier for the audit log entry */ "id": string, /** API endpoint ID, e.g., `project_create` */ @@ -2267,7 +2284,7 @@ export type FloatingIpAttach = export type FloatingIpCreate = { /** IP address allocation method. */ -"addressSelector"?: AddressSelector,"description": string,"name": Name,}; +"addressAllocator"?: AddressAllocator,"description": string,"name": Name,}; /** * A single page of results @@ -2525,6 +2542,28 @@ export type InstanceDiskAttachment = ,} ); +/** +* A multicast group identifier +* +* Can be a UUID, a name, or an IP address + */ +export type MulticastGroupIdentifier = +string; + +/** +* Specification for joining a multicast group with optional source filtering. +* +* Used in `InstanceCreate` and `InstanceUpdate` to specify multicast group membership along with per-member source IP configuration. + */ +export type MulticastGroupJoinSpec = +{ +/** The multicast group to join, specified by name, UUID, or IP address. */ +"group": MulticastGroupIdentifier, +/** IP version for pool selection when creating a group by name. Required if both IPv4 and IPv6 default multicast pools are linked. */ +"ipVersion"?: IpVersion | null, +/** Source IPs for source-filtered multicast (SSM). Optional for ASM groups, required for SSM groups (232.0.0.0/8, ff3x::/32). */ +"sourceIps"?: (string)[] | null,}; + /** * How a VPC-private IP address is assigned to a network interface. */ @@ -2664,10 +2703,10 @@ By default, all instances have outbound connectivity, but no inbound connectivit "hostname": Hostname, /** The amount of RAM (in bytes) to be allocated to the instance */ "memory": ByteCount, -/** The multicast groups this instance should join. +/** Multicast groups this instance should join at creation. -The instance will be automatically added as a member of the specified multicast groups during creation, enabling it to send and receive multicast traffic for those groups. */ -"multicastGroups"?: (NameOrId)[],"name": Name, +Groups can be specified by name, UUID, or IP address. Non-existent groups are created automatically. */ +"multicastGroups"?: (MulticastGroupJoinSpec)[],"name": Name, /** The number of vCPUs to be allocated to the instance */ "ncpus": InstanceCpuCount, /** The network interfaces to be created for this instance. */ @@ -2681,6 +2720,18 @@ If not provided, all SSH public keys from the user's profile will be sent. If an /** User data for instance initialization systems (such as cloud-init). Must be a Base64-encoded string, as specified in RFC 4648 ยง 4 (+ and / characters with padding). Maximum 32 KiB unencoded data. */ "userData"?: string,}; +/** +* Parameters for joining an instance to a multicast group. +* +* When joining by IP address, the pool containing the multicast IP is auto-discovered from all linked multicast pools. + */ +export type InstanceMulticastGroupJoin = +{ +/** IP version for pool selection when creating a group by name. Required if both IPv4 and IPv6 default multicast pools are linked. */ +"ipVersion"?: IpVersion | null, +/** Source IPs for source-filtered multicast (SSM). Optional for ASM groups, required for SSM groups (232.0.0.0/8, ff3x::/32). */ +"sourceIps"?: (string)[] | null,}; + /** * The VPC-private IPv4 stack for a network interface */ @@ -2823,8 +2874,10 @@ An instance that does not have a boot disk set will use the boot options specifi When specified, this replaces the instance's current multicast group membership with the new set of groups. The instance will leave any groups not listed here and join any new groups that are specified. -If not provided (None), the instance's multicast group membership will not be changed. */ -"multicastGroups"?: (NameOrId)[] | null, +Each entry can specify the group by name, UUID, or IP address, along with optional source IP filtering for SSM (Source-Specific Multicast). When a group doesn't exist, it will be implicitly created using the default multicast pool (or you can specify `ip_version` to disambiguate if needed). + +If not provided, the instance's multicast group membership will not be changed. */ +"multicastGroups"?: (MulticastGroupJoinSpec)[] | null, /** The number of vCPUs to be allocated to the instance */ "ncpus": InstanceCpuCount,}; @@ -3354,7 +3407,9 @@ export type MulticastGroup = "mvlan"?: number | null, /** unique, mutable, user-controlled identifier for each resource */ "name": Name, -/** Source IP addresses for Source-Specific Multicast (SSM). Empty array means any source is allowed. */ +/** Union of all member source IP addresses (computed, read-only). + +This field shows the combined source IPs across all group members. Individual members may subscribe to different sources; this union reflects all sources that any member is subscribed to. Empty array means no members have source filtering enabled. */ "sourceIps": (string)[], /** Current state of the multicast group. */ "state": string, @@ -3363,24 +3418,6 @@ export type MulticastGroup = /** timestamp when this resource was last modified */ "timeModified": Date,}; -/** -* Create-time parameters for a multicast group. - */ -export type MulticastGroupCreate = -{"description": string, -/** The multicast IP address to allocate. If None, one will be allocated from the default pool. */ -"multicastIp"?: string | null, -/** Multicast VLAN (MVLAN) for egress multicast traffic to upstream networks. Tags packets leaving the rack to traverse VLAN-segmented upstream networks. - -Valid range: 2-4094 (VLAN IDs 0-1 are reserved by IEEE 802.1Q standard). */ -"mvlan"?: number | null,"name": Name, -/** Name or ID of the IP pool to allocate from. If None, uses the default multicast pool. */ -"pool"?: NameOrId | null, -/** Source IP addresses for Source-Specific Multicast (SSM). - -None uses default behavior (Any-Source Multicast). Empty list explicitly allows any source (Any-Source Multicast). Non-empty list restricts to specific sources (SSM). */ -"sourceIps"?: (string)[] | null,}; - /** * View of a Multicast Group Member (instance belonging to a multicast group) */ @@ -3394,8 +3431,14 @@ export type MulticastGroupMember = "instanceId": string, /** The ID of the multicast group this member belongs to. */ "multicastGroupId": string, +/** The multicast IP address of the group this member belongs to. */ +"multicastIp": string, /** unique, mutable, user-controlled identifier for each resource */ "name": Name, +/** Source IP addresses for this member's multicast subscription. + +- **ASM**: Sources are optional. Empty array means any source is allowed. Non-empty array enables source filtering (IGMPv3/MLDv2). - **SSM**: Sources are required for SSM addresses (232/8, ff3x::/32). */ +"sourceIps": (string)[], /** Current state of the multicast group membership. */ "state": string, /** timestamp when this resource was created */ @@ -3403,14 +3446,6 @@ export type MulticastGroupMember = /** timestamp when this resource was last modified */ "timeModified": Date,}; -/** -* Parameters for adding an instance to a multicast group. - */ -export type MulticastGroupMemberAdd = -{ -/** Name or ID of the instance to add to the multicast group */ -"instance": NameOrId,}; - /** * A single page of results */ @@ -3431,14 +3466,6 @@ export type MulticastGroupResultsPage = /** token used to fetch the next page of results (if any) */ "nextPage"?: string | null,}; -/** -* Update-time parameters for a multicast group. - */ -export type MulticastGroupUpdate = -{"description"?: string | null, -/** Multicast VLAN (MVLAN) for egress multicast traffic to upstream networks. Set to null to clear the MVLAN. Valid range: 2-4094 when provided. Omit the field to leave mvlan unchanged. */ -"mvlan"?: number | null,"name"?: Name | null,"sourceIps"?: (string)[] | null,}; - /** * VPC-private IPv4 configuration for a network interface. */ @@ -6096,12 +6123,15 @@ export interface InstanceMulticastGroupListPathParams { } export interface InstanceMulticastGroupListQueryParams { + limit?: number | null, + pageToken?: string | null, project?: NameOrId, + sortBy?: IdSortMode, } export interface InstanceMulticastGroupJoinPathParams { instance: NameOrId, - multicastGroup: NameOrId, + multicastGroup: MulticastGroupIdentifier, } export interface InstanceMulticastGroupJoinQueryParams { @@ -6110,7 +6140,7 @@ export interface InstanceMulticastGroupJoinQueryParams { export interface InstanceMulticastGroupLeavePathParams { instance: NameOrId, - multicastGroup: NameOrId, + multicastGroup: MulticastGroupIdentifier, } export interface InstanceMulticastGroupLeaveQueryParams { @@ -6320,19 +6350,11 @@ export interface MulticastGroupListQueryParams { } export interface MulticastGroupViewPathParams { - multicastGroup: NameOrId, -} - -export interface MulticastGroupUpdatePathParams { - multicastGroup: NameOrId, -} - -export interface MulticastGroupDeletePathParams { - multicastGroup: NameOrId, + multicastGroup: MulticastGroupIdentifier, } export interface MulticastGroupMemberListPathParams { - multicastGroup: NameOrId, + multicastGroup: MulticastGroupIdentifier, } export interface MulticastGroupMemberListQueryParams { @@ -6341,23 +6363,6 @@ export interface MulticastGroupMemberListQueryParams { sortBy?: IdSortMode, } -export interface MulticastGroupMemberAddPathParams { - multicastGroup: NameOrId, -} - -export interface MulticastGroupMemberAddQueryParams { - project?: NameOrId, -} - -export interface MulticastGroupMemberRemovePathParams { - instance: NameOrId, - multicastGroup: NameOrId, -} - -export interface MulticastGroupMemberRemoveQueryParams { - project?: NameOrId, -} - export interface InstanceNetworkInterfaceListQueryParams { instance?: NameOrId, limit?: number | null, @@ -6712,10 +6717,6 @@ export interface SystemMetricQueryParams { silo?: NameOrId, } -export interface LookupMulticastGroupByIpPathParams { - address: string, -} - export interface NetworkingAddressLotListQueryParams { limit?: number | null, pageToken?: string | null, @@ -7194,7 +7195,7 @@ export interface ApiConfig { * Pulled from info.version in the OpenAPI schema. Sent in the * `api-version` header on all requests. */ - apiVersion = "2026010500.0.0"; + apiVersion = "2026011600.0.0"; constructor({ host = "", baseParams = {}, token }: ApiConfig = {}) { this.host = host; @@ -7351,7 +7352,7 @@ params: FetchParams = {}) => { }) }, /** -* View a support bundle +* View support bundle */ supportBundleView: ({ path, }: {path: SupportBundleViewPathParams, @@ -7964,7 +7965,7 @@ params: FetchParams = {}) => { }) }, /** -* Create a disk +* Create disk */ diskCreate: ({ query, body, }: {query: DiskCreateQueryParams, @@ -8503,7 +8504,7 @@ params: FetchParams = {}) => { }) }, /** -* List multicast groups for instance +* List multicast groups for an instance */ instanceMulticastGroupList: ({ path, query = {}, }: {path: InstanceMulticastGroupListPathParams, @@ -8518,22 +8519,24 @@ params: FetchParams = {}) => { }) }, /** -* Join multicast group. +* Join multicast group by name, IP address, or UUID */ instanceMulticastGroupJoin: ({ -path, query = {}, }: {path: InstanceMulticastGroupJoinPathParams, +path, query = {}, body, }: {path: InstanceMulticastGroupJoinPathParams, query?: InstanceMulticastGroupJoinQueryParams, +body: InstanceMulticastGroupJoin, }, params: FetchParams = {}) => { return this.request({ path: `/v1/instances/${path.instance}/multicast-groups/${path.multicastGroup}`, method: "PUT", + body, query, ...params, }) }, /** -* Leave multicast group. +* Leave multicast group by name, IP address, or UUID */ instanceMulticastGroupLeave: ({ path, query = {}, }: {path: InstanceMulticastGroupLeavePathParams, @@ -8548,7 +8551,7 @@ params: FetchParams = {}) => { }) }, /** -* Reboot an instance +* Reboot instance */ instanceReboot: ({ path, query = {}, }: {path: InstanceRebootPathParams, @@ -8947,7 +8950,7 @@ params: FetchParams = {}) => { }) }, /** -* List all multicast groups. +* List multicast groups */ multicastGroupList: ({ query = {}, }: {query?: MulticastGroupListQueryParams, @@ -8961,21 +8964,7 @@ params: FetchParams = {}) => { }) }, /** -* Create a multicast group. - */ -multicastGroupCreate: ({ -body, }: {body: MulticastGroupCreate, -}, -params: FetchParams = {}) => { - return this.request({ - path: `/v1/multicast-groups`, - method: "POST", - body, - ...params, - }) - }, -/** -* Fetch a multicast group. +* Fetch multicast group */ multicastGroupView: ({ path, }: {path: MulticastGroupViewPathParams, @@ -8988,35 +8977,7 @@ params: FetchParams = {}) => { }) }, /** -* Update a multicast group. - */ -multicastGroupUpdate: ({ -path, body, }: {path: MulticastGroupUpdatePathParams, -body: MulticastGroupUpdate, -}, -params: FetchParams = {}) => { - return this.request({ - path: `/v1/multicast-groups/${path.multicastGroup}`, - method: "PUT", - body, - ...params, - }) - }, -/** -* Delete a multicast group. - */ -multicastGroupDelete: ({ -path, }: {path: MulticastGroupDeletePathParams, -}, -params: FetchParams = {}) => { - return this.request({ - path: `/v1/multicast-groups/${path.multicastGroup}`, - method: "DELETE", - ...params, - }) - }, -/** -* List members of a multicast group. +* List members of multicast group */ multicastGroupMemberList: ({ path, query = {}, }: {path: MulticastGroupMemberListPathParams, @@ -9031,38 +8992,6 @@ params: FetchParams = {}) => { }) }, /** -* Add instance to a multicast group. - */ -multicastGroupMemberAdd: ({ -path, query = {}, body, }: {path: MulticastGroupMemberAddPathParams, -query?: MulticastGroupMemberAddQueryParams, -body: MulticastGroupMemberAdd, -}, -params: FetchParams = {}) => { - return this.request({ - path: `/v1/multicast-groups/${path.multicastGroup}/members`, - method: "POST", - body, - query, - ...params, - }) - }, -/** -* Remove instance from a multicast group. - */ -multicastGroupMemberRemove: ({ -path, query = {}, }: {path: MulticastGroupMemberRemovePathParams, -query?: MulticastGroupMemberRemoveQueryParams, -}, -params: FetchParams = {}) => { - return this.request({ - path: `/v1/multicast-groups/${path.multicastGroup}/members/${path.instance}`, - method: "DELETE", - query, - ...params, - }) - }, -/** * List network interfaces */ instanceNetworkInterfaceList: ({ @@ -9217,7 +9146,7 @@ params: FetchParams = {}) => { }) }, /** -* Update a project +* Update project */ projectUpdate: ({ path, body, }: {path: ProjectUpdatePathParams, @@ -9361,7 +9290,7 @@ params: FetchParams = {}) => { }) }, /** -* Get a physical disk +* Get physical disk */ physicalDiskView: ({ path, }: {path: PhysicalDiskViewPathParams, @@ -9813,7 +9742,7 @@ params: FetchParams = {}) => { }) }, /** -* Add range to IP pool. +* Add range to an IP pool */ ipPoolRangeAdd: ({ path, body, }: {path: IpPoolRangeAddPathParams, @@ -9982,19 +9911,6 @@ params: FetchParams = {}) => { }) }, /** -* Look up multicast group by IP address. - */ -lookupMulticastGroupByIp: ({ -path, }: {path: LookupMulticastGroupByIpPathParams, -}, -params: FetchParams = {}) => { - return this.request({ - path: `/v1/system/multicast-groups/by-ip/${path.address}`, - method: "GET", - ...params, - }) - }, -/** * List address lots */ networkingAddressLotList: ({ @@ -10089,7 +10005,7 @@ params: FetchParams = {}) => { }) }, /** -* Disable a BFD session +* Disable BFD session */ networkingBfdDisable: ({ body, }: {body: BfdSessionDisable, @@ -10103,7 +10019,7 @@ params: FetchParams = {}) => { }) }, /** -* Enable a BFD session +* Enable BFD session */ networkingBfdEnable: ({ body, }: {body: BfdSessionEnable, @@ -10506,7 +10422,7 @@ params: FetchParams = {}) => { }) }, /** -* Create a silo +* Create silo */ siloCreate: ({ body, }: {body: SiloCreate, @@ -10533,7 +10449,7 @@ params: FetchParams = {}) => { }) }, /** -* Delete a silo +* Delete silo */ siloDelete: ({ path, }: {path: SiloDeletePathParams, @@ -11263,7 +11179,7 @@ params: FetchParams = {}) => { }) }, /** -* Update a VPC +* Update VPC */ vpcUpdate: ({ path, query = {}, body, }: {path: VpcUpdatePathParams, diff --git a/oxide-openapi-gen-ts/src/__snapshots__/msw-handlers.ts b/oxide-openapi-gen-ts/src/__snapshots__/msw-handlers.ts index 0f4dfd9..be887d7 100644 --- a/oxide-openapi-gen-ts/src/__snapshots__/msw-handlers.ts +++ b/oxide-openapi-gen-ts/src/__snapshots__/msw-handlers.ts @@ -215,7 +215,7 @@ export interface MSWHandlers { /** `GET /v1/instances/:instance/multicast-groups` */ instanceMulticastGroupList: (params: { path: Api.InstanceMulticastGroupListPathParams, query: Api.InstanceMulticastGroupListQueryParams, req: Request, cookies: Record }) => Promisable>, /** `PUT /v1/instances/:instance/multicast-groups/:multicastGroup` */ - instanceMulticastGroupJoin: (params: { path: Api.InstanceMulticastGroupJoinPathParams, query: Api.InstanceMulticastGroupJoinQueryParams, req: Request, cookies: Record }) => Promisable>, + instanceMulticastGroupJoin: (params: { path: Api.InstanceMulticastGroupJoinPathParams, query: Api.InstanceMulticastGroupJoinQueryParams, body: Json, req: Request, cookies: Record }) => Promisable>, /** `DELETE /v1/instances/:instance/multicast-groups/:multicastGroup` */ instanceMulticastGroupLeave: (params: { path: Api.InstanceMulticastGroupLeavePathParams, query: Api.InstanceMulticastGroupLeaveQueryParams, req: Request, cookies: Record }) => Promisable, /** `POST /v1/instances/:instance/reboot` */ @@ -278,20 +278,10 @@ export interface MSWHandlers { siloMetric: (params: { path: Api.SiloMetricPathParams, query: Api.SiloMetricQueryParams, req: Request, cookies: Record }) => Promisable>, /** `GET /v1/multicast-groups` */ multicastGroupList: (params: { query: Api.MulticastGroupListQueryParams, req: Request, cookies: Record }) => Promisable>, -/** `POST /v1/multicast-groups` */ - multicastGroupCreate: (params: { body: Json, req: Request, cookies: Record }) => Promisable>, /** `GET /v1/multicast-groups/:multicastGroup` */ multicastGroupView: (params: { path: Api.MulticastGroupViewPathParams, req: Request, cookies: Record }) => Promisable>, -/** `PUT /v1/multicast-groups/:multicastGroup` */ - multicastGroupUpdate: (params: { path: Api.MulticastGroupUpdatePathParams, body: Json, req: Request, cookies: Record }) => Promisable>, -/** `DELETE /v1/multicast-groups/:multicastGroup` */ - multicastGroupDelete: (params: { path: Api.MulticastGroupDeletePathParams, req: Request, cookies: Record }) => Promisable, /** `GET /v1/multicast-groups/:multicastGroup/members` */ multicastGroupMemberList: (params: { path: Api.MulticastGroupMemberListPathParams, query: Api.MulticastGroupMemberListQueryParams, req: Request, cookies: Record }) => Promisable>, -/** `POST /v1/multicast-groups/:multicastGroup/members` */ - multicastGroupMemberAdd: (params: { path: Api.MulticastGroupMemberAddPathParams, query: Api.MulticastGroupMemberAddQueryParams, body: Json, req: Request, cookies: Record }) => Promisable>, -/** `DELETE /v1/multicast-groups/:multicastGroup/members/:instance` */ - multicastGroupMemberRemove: (params: { path: Api.MulticastGroupMemberRemovePathParams, query: Api.MulticastGroupMemberRemoveQueryParams, req: Request, cookies: Record }) => Promisable, /** `GET /v1/network-interfaces` */ instanceNetworkInterfaceList: (params: { query: Api.InstanceNetworkInterfaceListQueryParams, req: Request, cookies: Record }) => Promisable>, /** `POST /v1/network-interfaces` */ @@ -420,8 +410,6 @@ export interface MSWHandlers { ipPoolServiceRangeRemove: (params: { body: Json, req: Request, cookies: Record }) => Promisable, /** `GET /v1/system/metrics/:metricName` */ systemMetric: (params: { path: Api.SystemMetricPathParams, query: Api.SystemMetricQueryParams, req: Request, cookies: Record }) => Promisable>, -/** `GET /v1/system/multicast-groups/by-ip/:address` */ - lookupMulticastGroupByIp: (params: { path: Api.LookupMulticastGroupByIpPathParams, req: Request, cookies: Record }) => Promisable>, /** `GET /v1/system/networking/address-lot` */ networkingAddressLotList: (params: { query: Api.NetworkingAddressLotListQueryParams, req: Request, cookies: Record }) => Promisable>, /** `POST /v1/system/networking/address-lot` */ @@ -806,7 +794,7 @@ http.get('/v1/instances/:instance/external-ips', handler(handlers['instanceExter http.post('/v1/instances/:instance/external-ips/ephemeral', handler(handlers['instanceEphemeralIpAttach'], schema.InstanceEphemeralIpAttachParams, schema.EphemeralIpCreate)), http.delete('/v1/instances/:instance/external-ips/ephemeral', handler(handlers['instanceEphemeralIpDetach'], schema.InstanceEphemeralIpDetachParams, null)), http.get('/v1/instances/:instance/multicast-groups', handler(handlers['instanceMulticastGroupList'], schema.InstanceMulticastGroupListParams, null)), -http.put('/v1/instances/:instance/multicast-groups/:multicastGroup', handler(handlers['instanceMulticastGroupJoin'], schema.InstanceMulticastGroupJoinParams, null)), +http.put('/v1/instances/:instance/multicast-groups/:multicastGroup', handler(handlers['instanceMulticastGroupJoin'], schema.InstanceMulticastGroupJoinParams, schema.InstanceMulticastGroupJoin)), http.delete('/v1/instances/:instance/multicast-groups/:multicastGroup', handler(handlers['instanceMulticastGroupLeave'], schema.InstanceMulticastGroupLeaveParams, null)), http.post('/v1/instances/:instance/reboot', handler(handlers['instanceReboot'], schema.InstanceRebootParams, null)), http.get('/v1/instances/:instance/serial-console', handler(handlers['instanceSerialConsole'], schema.InstanceSerialConsoleParams, null)), @@ -838,13 +826,8 @@ http.get('/v1/me/ssh-keys/:sshKey', handler(handlers['currentUserSshKeyView'], s http.delete('/v1/me/ssh-keys/:sshKey', handler(handlers['currentUserSshKeyDelete'], schema.CurrentUserSshKeyDeleteParams, null)), http.get('/v1/metrics/:metricName', handler(handlers['siloMetric'], schema.SiloMetricParams, null)), http.get('/v1/multicast-groups', handler(handlers['multicastGroupList'], schema.MulticastGroupListParams, null)), -http.post('/v1/multicast-groups', handler(handlers['multicastGroupCreate'], null, schema.MulticastGroupCreate)), http.get('/v1/multicast-groups/:multicastGroup', handler(handlers['multicastGroupView'], schema.MulticastGroupViewParams, null)), -http.put('/v1/multicast-groups/:multicastGroup', handler(handlers['multicastGroupUpdate'], schema.MulticastGroupUpdateParams, schema.MulticastGroupUpdate)), -http.delete('/v1/multicast-groups/:multicastGroup', handler(handlers['multicastGroupDelete'], schema.MulticastGroupDeleteParams, null)), http.get('/v1/multicast-groups/:multicastGroup/members', handler(handlers['multicastGroupMemberList'], schema.MulticastGroupMemberListParams, null)), -http.post('/v1/multicast-groups/:multicastGroup/members', handler(handlers['multicastGroupMemberAdd'], schema.MulticastGroupMemberAddParams, schema.MulticastGroupMemberAdd)), -http.delete('/v1/multicast-groups/:multicastGroup/members/:instance', handler(handlers['multicastGroupMemberRemove'], schema.MulticastGroupMemberRemoveParams, null)), http.get('/v1/network-interfaces', handler(handlers['instanceNetworkInterfaceList'], schema.InstanceNetworkInterfaceListParams, null)), http.post('/v1/network-interfaces', handler(handlers['instanceNetworkInterfaceCreate'], schema.InstanceNetworkInterfaceCreateParams, schema.InstanceNetworkInterfaceCreate)), http.get('/v1/network-interfaces/:interface', handler(handlers['instanceNetworkInterfaceView'], schema.InstanceNetworkInterfaceViewParams, null)), @@ -909,7 +892,6 @@ http.get('/v1/system/ip-pools-service/ranges', handler(handlers['ipPoolServiceRa http.post('/v1/system/ip-pools-service/ranges/add', handler(handlers['ipPoolServiceRangeAdd'], null, schema.IpRange)), http.post('/v1/system/ip-pools-service/ranges/remove', handler(handlers['ipPoolServiceRangeRemove'], null, schema.IpRange)), http.get('/v1/system/metrics/:metricName', handler(handlers['systemMetric'], schema.SystemMetricParams, null)), -http.get('/v1/system/multicast-groups/by-ip/:address', handler(handlers['lookupMulticastGroupByIp'], schema.LookupMulticastGroupByIpParams, null)), http.get('/v1/system/networking/address-lot', handler(handlers['networkingAddressLotList'], schema.NetworkingAddressLotListParams, null)), http.post('/v1/system/networking/address-lot', handler(handlers['networkingAddressLotCreate'], null, schema.AddressLotCreate)), http.get('/v1/system/networking/address-lot/:addressLot', handler(handlers['networkingAddressLotView'], schema.NetworkingAddressLotViewParams, null)), diff --git a/oxide-openapi-gen-ts/src/__snapshots__/type-test.ts b/oxide-openapi-gen-ts/src/__snapshots__/type-test.ts index afb328f..970f70e 100644 --- a/oxide-openapi-gen-ts/src/__snapshots__/type-test.ts +++ b/oxide-openapi-gen-ts/src/__snapshots__/type-test.ts @@ -10,6 +10,9 @@ assert>>(); assert>>(); assert>>(); assert>>(); +assert>>(); +assert>>(); +assert>>(); assert>>(); assert>>(); assert>>(); @@ -20,9 +23,6 @@ assert>>(); assert>>(); assert>>(); assert>>(); -assert>>(); -assert>>(); -assert>>(); assert>>(); assert>>(); assert>>(); @@ -65,6 +65,7 @@ assert>>(); assert>>(); assert>>(); +assert>>(); assert>>(); assert>>(); assert>>(); @@ -190,6 +191,8 @@ assert>>(); assert>>(); assert>>(); assert>>(); +assert>>(); +assert>>(); assert>>(); assert>>(); assert>>(); @@ -198,6 +201,7 @@ assert>>() assert>>(); assert>>(); assert>>(); +assert>>(); assert>>(); assert>>(); assert>>(); @@ -251,12 +255,9 @@ assert>>(); assert>>(); assert>>(); assert>>(); -assert>>(); assert>>(); -assert>>(); assert>>(); assert>>(); -assert>>(); assert>>(); assert>>(); assert>>(); diff --git a/oxide-openapi-gen-ts/src/__snapshots__/validate.ts b/oxide-openapi-gen-ts/src/__snapshots__/validate.ts index 466afe8..3eedae7 100644 --- a/oxide-openapi-gen-ts/src/__snapshots__/validate.ts +++ b/oxide-openapi-gen-ts/src/__snapshots__/validate.ts @@ -57,6 +57,38 @@ export const Address = z.preprocess(processResponseBody,z.object({"address": IpN "vlanId": z.number().min(0).max(65535).nullable().optional(), })) +/** +* The IP address version. + */ +export const IpVersion = z.preprocess(processResponseBody,z.enum(["v4","v6"])) + +/** +* Specify which IP pool to allocate from. + */ +export const PoolSelector = z.preprocess(processResponseBody,z.union([ +z.object({"pool": NameOrId, +"type": z.enum(["explicit"]), +}), +z.object({"ipVersion": IpVersion.nullable().default(null), +"type": z.enum(["auto"]), +}), +]) +) + +/** +* Specify how to allocate a floating IP address. + */ +export const AddressAllocator = z.preprocess(processResponseBody,z.union([ +z.object({"ip": z.union([z.ipv4(), z.ipv6()]), +"pool": NameOrId.nullable().optional(), +"type": z.enum(["explicit"]), +}), +z.object({"poolSelector": PoolSelector.default({"ipVersion":null,"type":"auto"}), +"type": z.enum(["auto"]), +}), +]) +) + /** * A set of addresses associated with a port configuration. */ @@ -133,38 +165,6 @@ export const AddressLotViewResponse = z.preprocess(processResponseBody,z.object( "lot": AddressLot, })) -/** -* The IP address version. - */ -export const IpVersion = z.preprocess(processResponseBody,z.enum(["v4","v6"])) - -/** -* Specify which IP pool to allocate from. - */ -export const PoolSelector = z.preprocess(processResponseBody,z.union([ -z.object({"pool": NameOrId, -"type": z.enum(["explicit"]), -}), -z.object({"ipVersion": IpVersion.nullable().default(null), -"type": z.enum(["auto"]), -}), -]) -) - -/** -* Specify how to allocate a floating IP address. - */ -export const AddressSelector = z.preprocess(processResponseBody,z.union([ -z.object({"ip": z.union([z.ipv4(), z.ipv6()]), -"pool": NameOrId.nullable().optional(), -"type": z.enum(["explicit"]), -}), -z.object({"poolSelector": PoolSelector.default({"ipVersion":null,"type":"auto"}), -"type": z.enum(["auto"]), -}), -]) -) - /** * Describes the scope of affinity for the purposes of co-location. */ @@ -497,6 +497,12 @@ z.object({"kind": z.enum(["unauthenticated"]), ]) ) +/** +* Authentication method used for a request + */ +export const AuthMethod = z.preprocess(processResponseBody,z.enum(["session_cookie", "access_token", "scim_token"]) +) + /** * Result of an audit log entry */ @@ -518,7 +524,8 @@ z.object({"kind": z.enum(["unknown"]), * Audit log entry */ export const AuditLogEntry = z.preprocess(processResponseBody,z.object({"actor": AuditLogEntryActor, -"authMethod": z.string().nullable().optional(), +"authMethod": AuthMethod.nullable().optional(), +"credentialId": z.uuid().nullable().optional(), "id": z.uuid(), "operationId": z.string(), "requestId": z.string(), @@ -1734,7 +1741,7 @@ export const FloatingIpAttach = z.preprocess(processResponseBody,z.object({"kind /** * Parameters for creating a new floating IP address for instances. */ -export const FloatingIpCreate = z.preprocess(processResponseBody,z.object({"addressSelector": AddressSelector.default({"poolSelector":{"ipVersion":null,"type":"auto"},"type":"auto"}), +export const FloatingIpCreate = z.preprocess(processResponseBody,z.object({"addressAllocator": AddressAllocator.default({"poolSelector":{"ipVersion":null,"type":"auto"},"type":"auto"}), "description": z.string(), "name": Name, })) @@ -1926,6 +1933,23 @@ z.object({"name": Name, ]) ) +/** +* A multicast group identifier +* +* Can be a UUID, a name, or an IP address + */ +export const MulticastGroupIdentifier = z.preprocess(processResponseBody,z.string()) + +/** +* Specification for joining a multicast group with optional source filtering. +* +* Used in `InstanceCreate` and `InstanceUpdate` to specify multicast group membership along with per-member source IP configuration. + */ +export const MulticastGroupJoinSpec = z.preprocess(processResponseBody,z.object({"group": MulticastGroupIdentifier, +"ipVersion": IpVersion.nullable().default(null), +"sourceIps": z.union([z.ipv4(), z.ipv6()]).array().nullable().default(null), +})) + /** * How a VPC-private IP address is assigned to a network interface. */ @@ -2022,7 +2046,7 @@ export const InstanceCreate = z.preprocess(processResponseBody,z.object({"antiAf "externalIps": ExternalIpCreate.array().default([]), "hostname": Hostname, "memory": ByteCount, -"multicastGroups": NameOrId.array().default([]), +"multicastGroups": MulticastGroupJoinSpec.array().default([]), "name": Name, "ncpus": InstanceCpuCount, "networkInterfaces": InstanceNetworkInterfaceAttachment.default({"type":"default_dual_stack"}), @@ -2031,6 +2055,15 @@ export const InstanceCreate = z.preprocess(processResponseBody,z.object({"antiAf "userData": z.string().default(""), })) +/** +* Parameters for joining an instance to a multicast group. +* +* When joining by IP address, the pool containing the multicast IP is auto-discovered from all linked multicast pools. + */ +export const InstanceMulticastGroupJoin = z.preprocess(processResponseBody,z.object({"ipVersion": IpVersion.nullable().default(null), +"sourceIps": z.union([z.ipv4(), z.ipv6()]).array().nullable().default(null), +})) + /** * The VPC-private IPv4 stack for a network interface */ @@ -2125,7 +2158,7 @@ export const InstanceUpdate = z.preprocess(processResponseBody,z.object({"autoRe "bootDisk": NameOrId.nullable(), "cpuPlatform": InstanceCpuPlatform.nullable(), "memory": ByteCount, -"multicastGroups": NameOrId.array().nullable().default(null), +"multicastGroups": MulticastGroupJoinSpec.array().nullable().default(null), "ncpus": InstanceCpuCount, })) @@ -2494,17 +2527,6 @@ export const MulticastGroup = z.preprocess(processResponseBody,z.object({"descri "timeModified": z.coerce.date(), })) -/** -* Create-time parameters for a multicast group. - */ -export const MulticastGroupCreate = z.preprocess(processResponseBody,z.object({"description": z.string(), -"multicastIp": z.union([z.ipv4(), z.ipv6()]).nullable().default(null), -"mvlan": z.number().min(0).max(65535).nullable().default(null), -"name": Name, -"pool": NameOrId.nullable().default(null), -"sourceIps": z.union([z.ipv4(), z.ipv6()]).array().nullable().default(null), -})) - /** * View of a Multicast Group Member (instance belonging to a multicast group) */ @@ -2512,18 +2534,14 @@ export const MulticastGroupMember = z.preprocess(processResponseBody,z.object({" "id": z.uuid(), "instanceId": z.uuid(), "multicastGroupId": z.uuid(), +"multicastIp": z.union([z.ipv4(), z.ipv6()]), "name": Name, +"sourceIps": z.union([z.ipv4(), z.ipv6()]).array(), "state": z.string(), "timeCreated": z.coerce.date(), "timeModified": z.coerce.date(), })) -/** -* Parameters for adding an instance to a multicast group. - */ -export const MulticastGroupMemberAdd = z.preprocess(processResponseBody,z.object({"instance": NameOrId, -})) - /** * A single page of results */ @@ -2538,15 +2556,6 @@ export const MulticastGroupResultsPage = z.preprocess(processResponseBody,z.obje "nextPage": z.string().nullable().optional(), })) -/** -* Update-time parameters for a multicast group. - */ -export const MulticastGroupUpdate = z.preprocess(processResponseBody,z.object({"description": z.string().nullable().optional(), -"mvlan": z.number().min(0).max(65535).nullable().optional(), -"name": Name.nullable().optional(), -"sourceIps": z.union([z.ipv4(), z.ipv6()]).array().nullable().optional(), -})) - /** * VPC-private IPv4 configuration for a network interface. */ @@ -4860,14 +4869,17 @@ export const InstanceMulticastGroupListParams = z.preprocess(processResponseBody instance: NameOrId, }), query: z.object({ + limit: z.number().min(1).max(4294967295).nullable().optional(), + pageToken: z.string().nullable().optional(), project: NameOrId.optional(), + sortBy: IdSortMode.optional(), }), })) export const InstanceMulticastGroupJoinParams = z.preprocess(processResponseBody, z.object({ path: z.object({ instance: NameOrId, - multicastGroup: NameOrId, + multicastGroup: MulticastGroupIdentifier, }), query: z.object({ project: NameOrId.optional(), @@ -4877,7 +4889,7 @@ export const InstanceMulticastGroupJoinParams = z.preprocess(processResponseBody export const InstanceMulticastGroupLeaveParams = z.preprocess(processResponseBody, z.object({ path: z.object({ instance: NameOrId, - multicastGroup: NameOrId, + multicastGroup: MulticastGroupIdentifier, }), query: z.object({ project: NameOrId.optional(), @@ -5182,32 +5194,9 @@ export const MulticastGroupListParams = z.preprocess(processResponseBody, z.obje }), })) -export const MulticastGroupCreateParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - }), - query: z.object({ - }), -})) - export const MulticastGroupViewParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - multicastGroup: NameOrId, - }), - query: z.object({ - }), -})) - -export const MulticastGroupUpdateParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - multicastGroup: NameOrId, - }), - query: z.object({ - }), -})) - -export const MulticastGroupDeleteParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - multicastGroup: NameOrId, + multicastGroup: MulticastGroupIdentifier, }), query: z.object({ }), @@ -5215,7 +5204,7 @@ export const MulticastGroupDeleteParams = z.preprocess(processResponseBody, z.ob export const MulticastGroupMemberListParams = z.preprocess(processResponseBody, z.object({ path: z.object({ - multicastGroup: NameOrId, + multicastGroup: MulticastGroupIdentifier, }), query: z.object({ limit: z.number().min(1).max(4294967295).nullable().optional(), @@ -5224,25 +5213,6 @@ export const MulticastGroupMemberListParams = z.preprocess(processResponseBody, }), })) -export const MulticastGroupMemberAddParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - multicastGroup: NameOrId, - }), - query: z.object({ - project: NameOrId.optional(), - }), -})) - -export const MulticastGroupMemberRemoveParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - instance: NameOrId, - multicastGroup: NameOrId, - }), - query: z.object({ - project: NameOrId.optional(), - }), -})) - export const InstanceNetworkInterfaceListParams = z.preprocess(processResponseBody, z.object({ path: z.object({ }), @@ -5823,14 +5793,6 @@ export const SystemMetricParams = z.preprocess(processResponseBody, z.object({ }), })) -export const LookupMulticastGroupByIpParams = z.preprocess(processResponseBody, z.object({ - path: z.object({ - address: z.union([z.ipv4(), z.ipv6()]), - }), - query: z.object({ - }), -})) - export const NetworkingAddressLotListParams = z.preprocess(processResponseBody, z.object({ path: z.object({ }),