Skip to content

Commit 3ad21cb

Browse files
authored
feat(instance): expose IP state in server.public_ips (#956)
1 parent e86e199 commit 3ad21cb

File tree

4 files changed

+15
-0
lines changed

4 files changed

+15
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import type {
55
IpState,
66
PrivateNICState,
77
SecurityGroupState,
8+
ServerIpState,
89
ServerState,
910
SnapshotState,
1011
TaskStatus,
@@ -26,6 +27,9 @@ export const SECURITY_GROUP_TRANSIENT_STATUSES: SecurityGroupState[] = [
2627
'syncing',
2728
]
2829

30+
/** Lists transient statutes of the enum {@link ServerIpState}. */
31+
export const SERVER_IP_TRANSIENT_STATUSES: ServerIpState[] = ['pending']
32+
2933
/** Lists transient statutes of the enum {@link ServerState}. */
3034
export const SERVER_TRANSIENT_STATUSES: ServerState[] = ['starting', 'stopping']
3135

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ export type {
124124
ServerIp,
125125
ServerIpIpFamily,
126126
ServerIpProvisioningMode,
127+
ServerIpState,
127128
ServerIpv6,
128129
ServerLocation,
129130
ServerMaintenance,

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,7 @@ const unmarshalServerIp = (data: unknown) => {
320320
id: data.id,
321321
netmask: data.netmask,
322322
provisioningMode: data.provisioning_mode,
323+
state: data.state,
323324
tags: data.tags,
324325
} as ServerIp
325326
}
@@ -1555,6 +1556,7 @@ const marshalServerIp = (
15551556
id: request.id,
15561557
netmask: request.netmask,
15571558
provisioning_mode: request.provisioningMode,
1559+
state: request.state,
15581560
tags: request.tags,
15591561
})
15601562

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,13 @@ export type ServerIpIpFamily = 'inet' | 'inet6'
5252

5353
export type ServerIpProvisioningMode = 'manual' | 'dhcp' | 'slaac'
5454

55+
export type ServerIpState =
56+
| 'unknown_state'
57+
| 'detached'
58+
| 'attached'
59+
| 'pending'
60+
| 'error'
61+
5562
export type ServerState =
5663
| 'running'
5764
| 'stopped'
@@ -638,6 +645,7 @@ export interface ServerIp {
638645
provisioningMode: ServerIpProvisioningMode
639646
/** Tags associated with the IP. */
640647
tags: string[]
648+
state: ServerIpState
641649
}
642650

643651
/** Server. ipv6. */

0 commit comments

Comments
 (0)