Skip to content

Commit de42af9

Browse files
scaleway-botyfodil
andauthored
fix(s2s_vpn): make connections object ip version–specific (#2418)
Co-authored-by: Yacine Fodil <[email protected]>
1 parent 9a08609 commit de42af9

File tree

3 files changed

+30
-6
lines changed

3 files changed

+30
-6
lines changed

packages_generated/s2s_vpn/src/v1alpha1/api.gen.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,7 @@ export class API extends ParentAPI {
252252
path: `/s2s-vpn/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/connections`,
253253
urlParams: urlParams(
254254
['customer_gateway_ids', request.customerGatewayIds],
255+
['is_ipv6', request.isIpv6],
255256
['name', request.name],
256257
['order_by', request.orderBy],
257258
['page', request.page],

packages_generated/s2s_vpn/src/v1alpha1/marshalling.gen.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,15 +94,21 @@ export const unmarshalConnection = (data: unknown): Connection => {
9494
unmarshalConnectionCipher,
9595
),
9696
initiationPolicy: data.initiation_policy,
97+
isIpv6: data.is_ipv6,
9798
name: data.name,
9899
organizationId: data.organization_id,
99100
projectId: data.project_id,
100101
region: data.region,
101102
routePropagationEnabled: data.route_propagation_enabled,
102103
status: data.status,
103104
tags: data.tags,
104-
tunnelStatusIpv4: data.tunnel_status_ipv4,
105-
tunnelStatusIpv6: data.tunnel_status_ipv6,
105+
tunnelStatus: data.tunnel_status,
106+
tunnelStatusIpv4: data.tunnel_status_ipv4
107+
? data.tunnel_status_ipv4
108+
: undefined,
109+
tunnelStatusIpv6: data.tunnel_status_ipv6
110+
? data.tunnel_status_ipv6
111+
: undefined,
106112
updatedAt: unmarshalDate(data.updated_at),
107113
vpnGatewayId: data.vpn_gateway_id,
108114
} as Connection
@@ -377,6 +383,7 @@ export const marshalCreateConnectionRequest = (
377383
marshalConnectionCipher(elt, defaults),
378384
),
379385
initiation_policy: request.initiationPolicy,
386+
is_ipv6: request.isIpv6,
380387
name: request.name,
381388
project_id: request.projectId ?? defaults.defaultProjectId,
382389
tags: request.tags,

packages_generated/s2s_vpn/src/v1alpha1/types.gen.ts

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,10 @@ export interface Connection {
145145
* Status of the connection.
146146
*/
147147
status: ConnectionStatus
148+
/**
149+
* IP version of the IPSec Tunnel.
150+
*/
151+
isIpv6: boolean
148152
/**
149153
* Who initiates the IPsec tunnel.
150154
*/
@@ -170,13 +174,17 @@ export interface Connection {
170174
*/
171175
customerGatewayId: string
172176
/**
173-
* Status of the IPv4 IPsec tunnel.
177+
* Status of the IPsec tunnel.
178+
*/
179+
tunnelStatus: TunnelStatus
180+
/**
181+
* @deprecated Status of the IPv4 IPsec tunnel.
174182
*/
175-
tunnelStatusIpv4: TunnelStatus
183+
tunnelStatusIpv4?: TunnelStatus
176184
/**
177-
* Status of the IPv6 IPsec tunnel.
185+
* @deprecated Status of the IPv6 IPsec tunnel.
178186
*/
179-
tunnelStatusIpv6: TunnelStatus
187+
tunnelStatusIpv6?: TunnelStatus
180188
/**
181189
* Status of the BGP IPv4 session.
182190
*/
@@ -395,6 +403,10 @@ export type CreateConnectionRequest = {
395403
* List of tags to apply to the connection.
396404
*/
397405
tags?: string[]
406+
/**
407+
* Defines IP version of the IPSec Tunnel.
408+
*/
409+
isIpv6: boolean
398410
/**
399411
* Who initiates the IPsec tunnel.
400412
*/
@@ -713,6 +725,10 @@ export type ListConnectionsRequest = {
713725
* Connection statuses to filter for.
714726
*/
715727
statuses?: ConnectionStatus[]
728+
/**
729+
* Filter connections with IP version of IPSec tunnel.
730+
*/
731+
isIpv6?: boolean
716732
/**
717733
* Filter for connections using these routing policies.
718734
*/

0 commit comments

Comments
 (0)