Skip to content

Commit 0b056b5

Browse files
authored
feat(lb): support dhcp/ipam private network (#786)
1 parent 2a41c43 commit 0b056b5

File tree

2 files changed

+34
-27
lines changed

2 files changed

+34
-27
lines changed

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,7 @@ const unmarshalPrivateNetworkDHCPConfig = (data: unknown) => {
469469
)
470470
}
471471

472-
return {} as PrivateNetworkDHCPConfig
472+
return { ipId: data.ip_id } as PrivateNetworkDHCPConfig
473473
}
474474

475475
const unmarshalPrivateNetworkIpamConfig = (data: unknown) => {
@@ -942,7 +942,9 @@ const marshalHealthCheck = (
942942
const marshalPrivateNetworkDHCPConfig = (
943943
request: PrivateNetworkDHCPConfig,
944944
defaults: DefaultValues,
945-
): Record<string, unknown> => ({})
945+
): Record<string, unknown> => ({
946+
ip_id: request.ipId,
947+
})
946948

947949
const marshalPrivateNetworkIpamConfig = (
948950
request: PrivateNetworkIpamConfig,

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

Lines changed: 30 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -764,25 +764,25 @@ export interface PrivateNetwork {
764764
/** Load Balancer object which is attached to the Private Network. */
765765
lb?: Lb
766766
/**
767-
* Object containing an array of a local IP address for the Load Balancer on
768-
* this Private Network.
767+
* @deprecated Object containing an array of a local IP address for the Load
768+
* Balancer on this Private Network.
769769
*
770-
* One-of ('config'): at most one of 'staticConfig', 'dhcpConfig',
771-
* 'ipamConfig' could be set.
770+
* One-of ('config'): at most one of 'staticConfig', 'dhcpConfig',
771+
* 'ipamConfig' could be set.
772772
*/
773773
staticConfig?: PrivateNetworkStaticConfig
774774
/**
775-
* Defines whether to let DHCP assign IP addresses.
775+
* Object containing DHCP-assigned IP addresses.
776776
*
777777
* One-of ('config'): at most one of 'staticConfig', 'dhcpConfig',
778778
* 'ipamConfig' could be set.
779779
*/
780780
dhcpConfig?: PrivateNetworkDHCPConfig
781781
/**
782-
* For internal use only.
782+
* @deprecated For internal use only.
783783
*
784-
* One-of ('config'): at most one of 'staticConfig', 'dhcpConfig',
785-
* 'ipamConfig' could be set.
784+
* One-of ('config'): at most one of 'staticConfig', 'dhcpConfig',
785+
* 'ipamConfig' could be set.
786786
*/
787787
ipamConfig?: PrivateNetworkIpamConfig
788788
/** Private Network ID. */
@@ -795,14 +795,19 @@ export interface PrivateNetwork {
795795
updatedAt?: Date
796796
}
797797

798-
export interface PrivateNetworkDHCPConfig {}
798+
export interface PrivateNetworkDHCPConfig {
799+
ipId: string
800+
}
799801

800802
export interface PrivateNetworkIpamConfig {}
801803

802804
/** Private network. static config. */
803805
export interface PrivateNetworkStaticConfig {
804-
/** Array of a local IP address for the Load Balancer on this Private Network. */
805-
ipAddress: string[]
806+
/**
807+
* @deprecated Array of a local IP address for the Load Balancer on this
808+
* Private Network.
809+
*/
810+
ipAddress?: string[]
806811
}
807812

808813
/** Route. */
@@ -1965,11 +1970,11 @@ export type AttachPrivateNetworkRequest = {
19651970
/** Private Network ID. */
19661971
privateNetworkId: string
19671972
/**
1968-
* Object containing an array of a local IP address for the Load Balancer on
1969-
* this Private Network.
1973+
* @deprecated Object containing an array of a local IP address for the Load
1974+
* Balancer on this Private Network.
19701975
*
1971-
* One-of ('config'): at most one of 'staticConfig', 'dhcpConfig',
1972-
* 'ipamConfig' could be set.
1976+
* One-of ('config'): at most one of 'staticConfig', 'dhcpConfig',
1977+
* 'ipamConfig' could be set.
19731978
*/
19741979
staticConfig?: PrivateNetworkStaticConfig
19751980
/**
@@ -1980,10 +1985,10 @@ export type AttachPrivateNetworkRequest = {
19801985
*/
19811986
dhcpConfig?: PrivateNetworkDHCPConfig
19821987
/**
1983-
* For internal use only.
1988+
* @deprecated For internal use only.
19841989
*
1985-
* One-of ('config'): at most one of 'staticConfig', 'dhcpConfig',
1986-
* 'ipamConfig' could be set.
1990+
* One-of ('config'): at most one of 'staticConfig', 'dhcpConfig',
1991+
* 'ipamConfig' could be set.
19871992
*/
19881993
ipamConfig?: PrivateNetworkIpamConfig
19891994
}
@@ -2932,11 +2937,11 @@ export type ZonedApiAttachPrivateNetworkRequest = {
29322937
/** Private Network ID. */
29332938
privateNetworkId: string
29342939
/**
2935-
* Object containing an array of a local IP address for the Load Balancer on
2936-
* this Private Network.
2940+
* @deprecated Object containing an array of a local IP address for the Load
2941+
* Balancer on this Private Network.
29372942
*
2938-
* One-of ('config'): at most one of 'staticConfig', 'dhcpConfig',
2939-
* 'ipamConfig' could be set.
2943+
* One-of ('config'): at most one of 'staticConfig', 'dhcpConfig',
2944+
* 'ipamConfig' could be set.
29402945
*/
29412946
staticConfig?: PrivateNetworkStaticConfig
29422947
/**
@@ -2947,10 +2952,10 @@ export type ZonedApiAttachPrivateNetworkRequest = {
29472952
*/
29482953
dhcpConfig?: PrivateNetworkDHCPConfig
29492954
/**
2950-
* For internal use only.
2955+
* @deprecated For internal use only.
29512956
*
2952-
* One-of ('config'): at most one of 'staticConfig', 'dhcpConfig',
2953-
* 'ipamConfig' could be set.
2957+
* One-of ('config'): at most one of 'staticConfig', 'dhcpConfig',
2958+
* 'ipamConfig' could be set.
29542959
*/
29552960
ipamConfig?: PrivateNetworkIpamConfig
29562961
}

0 commit comments

Comments
 (0)