Skip to content

feat(lb): support dhcp/ipam private network #786

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
Aug 2, 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
6 changes: 4 additions & 2 deletions packages/clients/src/api/lb/v1/marshalling.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ const unmarshalPrivateNetworkDHCPConfig = (data: unknown) => {
)
}

return {} as PrivateNetworkDHCPConfig
return { ipId: data.ip_id } as PrivateNetworkDHCPConfig
}

const unmarshalPrivateNetworkIpamConfig = (data: unknown) => {
Expand Down Expand Up @@ -942,7 +942,9 @@ const marshalHealthCheck = (
const marshalPrivateNetworkDHCPConfig = (
request: PrivateNetworkDHCPConfig,
defaults: DefaultValues,
): Record<string, unknown> => ({})
): Record<string, unknown> => ({
ip_id: request.ipId,
})

const marshalPrivateNetworkIpamConfig = (
request: PrivateNetworkIpamConfig,
Expand Down
55 changes: 30 additions & 25 deletions packages/clients/src/api/lb/v1/types.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -764,25 +764,25 @@ export interface PrivateNetwork {
/** Load Balancer object which is attached to the Private Network. */
lb?: Lb
/**
* Object containing an array of a local IP address for the Load Balancer on
* this Private Network.
* @deprecated Object containing an array of a local IP address for the Load
* Balancer on this Private Network.
*
* One-of ('config'): at most one of 'staticConfig', 'dhcpConfig',
* 'ipamConfig' could be set.
* One-of ('config'): at most one of 'staticConfig', 'dhcpConfig',
* 'ipamConfig' could be set.
*/
staticConfig?: PrivateNetworkStaticConfig
/**
* Defines whether to let DHCP assign IP addresses.
* Object containing DHCP-assigned IP addresses.
*
* One-of ('config'): at most one of 'staticConfig', 'dhcpConfig',
* 'ipamConfig' could be set.
*/
dhcpConfig?: PrivateNetworkDHCPConfig
/**
* For internal use only.
* @deprecated For internal use only.
*
* One-of ('config'): at most one of 'staticConfig', 'dhcpConfig',
* 'ipamConfig' could be set.
* One-of ('config'): at most one of 'staticConfig', 'dhcpConfig',
* 'ipamConfig' could be set.
*/
ipamConfig?: PrivateNetworkIpamConfig
/** Private Network ID. */
Expand All @@ -795,14 +795,19 @@ export interface PrivateNetwork {
updatedAt?: Date
}

export interface PrivateNetworkDHCPConfig {}
export interface PrivateNetworkDHCPConfig {
ipId: string
}

export interface PrivateNetworkIpamConfig {}

/** Private network. static config. */
export interface PrivateNetworkStaticConfig {
/** Array of a local IP address for the Load Balancer on this Private Network. */
ipAddress: string[]
/**
* @deprecated Array of a local IP address for the Load Balancer on this
* Private Network.
*/
ipAddress?: string[]
}

/** Route. */
Expand Down Expand Up @@ -1965,11 +1970,11 @@ export type AttachPrivateNetworkRequest = {
/** Private Network ID. */
privateNetworkId: string
/**
* Object containing an array of a local IP address for the Load Balancer on
* this Private Network.
* @deprecated Object containing an array of a local IP address for the Load
* Balancer on this Private Network.
*
* One-of ('config'): at most one of 'staticConfig', 'dhcpConfig',
* 'ipamConfig' could be set.
* One-of ('config'): at most one of 'staticConfig', 'dhcpConfig',
* 'ipamConfig' could be set.
*/
staticConfig?: PrivateNetworkStaticConfig
/**
Expand All @@ -1980,10 +1985,10 @@ export type AttachPrivateNetworkRequest = {
*/
dhcpConfig?: PrivateNetworkDHCPConfig
/**
* For internal use only.
* @deprecated For internal use only.
*
* One-of ('config'): at most one of 'staticConfig', 'dhcpConfig',
* 'ipamConfig' could be set.
* One-of ('config'): at most one of 'staticConfig', 'dhcpConfig',
* 'ipamConfig' could be set.
*/
ipamConfig?: PrivateNetworkIpamConfig
}
Expand Down Expand Up @@ -2932,11 +2937,11 @@ export type ZonedApiAttachPrivateNetworkRequest = {
/** Private Network ID. */
privateNetworkId: string
/**
* Object containing an array of a local IP address for the Load Balancer on
* this Private Network.
* @deprecated Object containing an array of a local IP address for the Load
* Balancer on this Private Network.
*
* One-of ('config'): at most one of 'staticConfig', 'dhcpConfig',
* 'ipamConfig' could be set.
* One-of ('config'): at most one of 'staticConfig', 'dhcpConfig',
* 'ipamConfig' could be set.
*/
staticConfig?: PrivateNetworkStaticConfig
/**
Expand All @@ -2947,10 +2952,10 @@ export type ZonedApiAttachPrivateNetworkRequest = {
*/
dhcpConfig?: PrivateNetworkDHCPConfig
/**
* For internal use only.
* @deprecated For internal use only.
*
* One-of ('config'): at most one of 'staticConfig', 'dhcpConfig',
* 'ipamConfig' could be set.
* One-of ('config'): at most one of 'staticConfig', 'dhcpConfig',
* 'ipamConfig' could be set.
*/
ipamConfig?: PrivateNetworkIpamConfig
}
Expand Down