Skip to content

Commit d8d3091

Browse files
authored
feat(instance): deprecate some fields following ipmob introduction (#1240)
1 parent d7ba51e commit d8d3091

File tree

3 files changed

+45
-14
lines changed

3 files changed

+45
-14
lines changed

packages/clients/src/api/instance/v1/api.gen.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,7 @@ export class API extends ParentAPI {
350350
? request.tags.join(',')
351351
: undefined,
352352
],
353+
['with_ip', request.withIp],
353354
['without_ip', request.withoutIp],
354355
),
355356
},

packages/clients/src/api/instance/v1/types.gen.ts

Lines changed: 27 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -408,17 +408,26 @@ export interface Server {
408408
dynamicIpRequired: boolean
409409
/** True to configure the instance so it uses the new routed IP mode. */
410410
routedIpEnabled: boolean
411-
/** True if IPv6 is enabled. */
412-
enableIpv6: boolean
411+
/**
412+
* @deprecated True if IPv6 is enabled (deprecated and always `False` when
413+
* `routed_ip_enabled` is `True`).
414+
*/
415+
enableIpv6?: boolean
413416
/** Instance host name. */
414417
hostname: string
415418
/** Information about the Instance image. */
416419
image?: Image
417420
/** Defines whether the Instance protection option is activated. */
418421
protected: boolean
419-
/** Private IP address of the Instance. */
422+
/**
423+
* Private IP address of the Instance (deprecated and always `null` when
424+
* `routed_ip_enabled` is `True`).
425+
*/
420426
privateIp?: string
421-
/** Information about the public IP. */
427+
/**
428+
* @deprecated Information about the public IP (deprecated in favor of
429+
* `public_ips`).
430+
*/
422431
publicIp?: ServerIp
423432
/** Information about all the public IPs attached to the server. */
424433
publicIps: ServerIp[]
@@ -430,7 +439,10 @@ export interface Server {
430439
state: ServerState
431440
/** Instance location. */
432441
location?: ServerLocation
433-
/** Instance IPv6 address. */
442+
/**
443+
* @deprecated Instance IPv6 address (deprecated when `routed_ip_enabled` is
444+
* `True`).
445+
*/
434446
ipv6?: ServerIpv6
435447
/** @deprecated Instance bootscript. */
436448
bootscript?: Bootscript
@@ -987,9 +999,12 @@ export type CreateServerRequest = {
987999
image: string
9881000
/** Volumes attached to the server. */
9891001
volumes?: Record<string, VolumeServerTemplate>
990-
/** True if IPv6 is enabled on the server. */
991-
enableIpv6: boolean
992-
/** ID of the reserved IP to attach to the Instance. */
1002+
/**
1003+
* @deprecated True if IPv6 is enabled on the server (deprecated and always
1004+
* `False` when `routed_ip_enabled` is `True`).
1005+
*/
1006+
enableIpv6?: boolean
1007+
/** @deprecated ID of the reserved IP to attach to the Instance. */
9931008
publicIp?: string
9941009
/** A list of reserved IP IDs to attach to the Instance. */
9951010
publicIps?: string[]
@@ -1581,10 +1596,12 @@ export type ListServersRequest = {
15811596
* "server1" but not "foo").
15821597
*/
15831598
name?: string
1584-
/** List Instances by private_ip. */
1599+
/** @deprecated List Instances by private_ip. */
15851600
privateIp?: string
15861601
/** List Instances that are not attached to a public IP. */
15871602
withoutIp?: boolean
1603+
/** List Instances by IP (both private_ip and public_ip are supported). */
1604+
withIp?: string
15881605
/** List Instances of this commercial type. */
15891606
commercialType?: string
15901607
/** List Instances in this state. */
@@ -2001,6 +2018,7 @@ export type UpdateServerRequest = {
20012018
routedIpEnabled?: boolean
20022019
/** A list of reserved IP IDs to attach to the Instance. */
20032020
publicIps?: string[]
2021+
/** @deprecated */
20042022
enableIpv6?: boolean
20052023
protected?: boolean
20062024
securityGroup?: SecurityGroupTemplate

packages/clients/src/api/instance/v1/types.private.gen.ts

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -122,17 +122,26 @@ export type SetServerRequest = {
122122
* is set to True you cannot set it back to False).
123123
*/
124124
routedIpEnabled?: boolean
125-
/** True if IPv6 is enabled. */
126-
enableIpv6: boolean
125+
/**
126+
* @deprecated True if IPv6 is enabled (deprecated and always `False` when
127+
* `routed_ip_enabled` is `True`).
128+
*/
129+
enableIpv6?: boolean
127130
/** Instance host name. */
128131
hostname: string
129132
/** Provide information on the Instance image. */
130133
image?: Image
131134
/** Instance protection option is activated. */
132135
protected: boolean
133-
/** Instance private IP address. */
136+
/**
137+
* @deprecated Instance private IP address (deprecated and always `null` when
138+
* `routed_ip_enabled` is `True`).
139+
*/
134140
privateIp?: string
135-
/** Information about the public IP. */
141+
/**
142+
* @deprecated Information about the public IP (deprecated in favor of
143+
* `public_ips`).
144+
*/
136145
publicIp?: ServerIp
137146
/** Information about all the public IPs attached to the server. */
138147
publicIps?: ServerIp[]
@@ -142,7 +151,10 @@ export type SetServerRequest = {
142151
state?: ServerState
143152
/** Instance location. */
144153
location?: ServerLocation
145-
/** Instance IPv6 address. */
154+
/**
155+
* @deprecated Instance IPv6 address (deprecated when `routed_ip_enabled` is
156+
* `True`).
157+
*/
146158
ipv6?: ServerIpv6
147159
/** @deprecated Instance bootscript. */
148160
bootscript?: Bootscript

0 commit comments

Comments
 (0)