Skip to content

Commit 38ee8b7

Browse files
authored
Merge pull request #2560 from danfai/fix-creating-fully-populated-lb
loadbalancer: Use CreateMemberOpts instead of BatchUpdateMemberOpts in PoolCreateOpts
2 parents 0739fff + 207de4a commit 38ee8b7

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

acceptance/openstack/loadbalancer/v2/loadbalancer.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -195,12 +195,12 @@ func CreateLoadBalancerFullyPopulated(t *testing.T, client *gophercloud.ServiceC
195195
Description: poolDescription,
196196
Protocol: pools.ProtocolHTTP,
197197
LBMethod: pools.LBMethodLeastConnections,
198-
Members: []pools.BatchUpdateMemberOpts{{
199-
Name: &memberName,
198+
Members: []pools.CreateMemberOpts{{
199+
Name: memberName,
200200
ProtocolPort: memberPort,
201201
Weight: &memberWeight,
202202
Address: "1.2.3.4",
203-
SubnetID: &subnetID,
203+
SubnetID: subnetID,
204204
}},
205205
Monitor: &monitors.CreateOpts{
206206
Delay: 10,

openstack/loadbalancer/v2/loadbalancers/testing/requests_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ func TestCreateFullyPopulatedLoadbalancer(t *testing.T) {
110110
LBMethod: pools.LBMethodRoundRobin,
111111
Protocol: "HTTP",
112112
Name: "Example pool",
113-
Members: []pools.BatchUpdateMemberOpts{{
113+
Members: []pools.CreateMemberOpts{{
114114
Address: "192.0.2.51",
115115
ProtocolPort: 80,
116116
}, {

openstack/loadbalancer/v2/pools/requests.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,12 +123,12 @@ type CreateOpts struct {
123123
// or false (DOWN).
124124
AdminStateUp *bool `json:"admin_state_up,omitempty"`
125125

126-
// Members is a slice of BatchUpdateMemberOpts which allows a set of
126+
// Members is a slice of CreateMemberOpts which allows a set of
127127
// members to be created at the same time the pool is created.
128128
//
129129
// This is only possible to use when creating a fully populated
130130
// Loadbalancer.
131-
Members []BatchUpdateMemberOpts `json:"members,omitempty"`
131+
Members []CreateMemberOpts `json:"members,omitempty"`
132132

133133
// Monitor is an instance of monitors.CreateOpts which allows a monitor
134134
// to be created at the same time the pool is created.

0 commit comments

Comments
 (0)