Skip to content

feat(instance): modify UpdateServer public_ips and private_nics to match real implem #921

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions packages/clients/src/api/instance/v1/marshalling.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,7 @@ const unmarshalServerIp = (data: unknown) => {
id: data.id,
netmask: data.netmask,
provisioningMode: data.provisioning_mode,
tags: data.tags,
} as ServerIp
}

Expand Down Expand Up @@ -1554,6 +1555,7 @@ const marshalServerIp = (
id: request.id,
netmask: request.netmask,
provisioning_mode: request.provisioningMode,
tags: request.tags,
})

const marshalServerIpv6 = (
Expand Down Expand Up @@ -2157,13 +2159,9 @@ export const marshalUpdateServerRequest = (
enable_ipv6: request.enableIpv6,
name: request.name,
placement_group: request.placementGroup,
private_nics: request.privateNics
? request.privateNics.map(elt => marshalPrivateNIC(elt, defaults))
: undefined,
private_nics: request.privateNics,
protected: request.protected,
public_ips: request.publicIps
? request.publicIps.map(elt => marshalServerIp(elt, defaults))
: undefined,
public_ips: request.publicIps,
routed_ip_enabled: request.routedIpEnabled,
security_group: request.securityGroup
? marshalSecurityGroupTemplate(request.securityGroup, defaults)
Expand Down
3 changes: 3 additions & 0 deletions packages/clients/src/api/instance/v1/types.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ export type VolumeVolumeType =
| 'unified'
| 'scratch'
| 'sbs_volume'
| 'sbs_snapshot'

/** Bootscript. */
export interface Bootscript {
Expand Down Expand Up @@ -635,6 +636,8 @@ export interface ServerIp {
dynamic: boolean
/** Information about this address provisioning mode. */
provisioningMode: ServerIpProvisioningMode
/** Tags associated with the IP. */
tags: string[]
}

/** Server. ipv6. */
Expand Down
5 changes: 3 additions & 2 deletions packages/clients/src/api/instance/v1/types.private.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,14 +195,15 @@ export type UpdateServerRequest = {
* is set to True you cannot set it back to False).
*/
routedIpEnabled?: boolean
publicIps?: ServerIp[]
/** A list of reserved IP IDs to attach to the Instance. */
publicIps?: string[]
enableIpv6?: boolean
protected?: boolean
securityGroup?: SecurityGroupTemplate
/** Placement group ID if Instance must be part of a placement group. */
placementGroup?: string | null
/** Instance private NICs. */
privateNics?: PrivateNIC[]
privateNics?: string[]
/**
* Set the commercial_type for this Instance. Warning: This field has some
* restrictions:
Expand Down