Skip to content

Commit

Permalink
Add LoadBalancerPoolMember.LoadBalancer
Browse files Browse the repository at this point in the history
  • Loading branch information
alakae committed Oct 13, 2023
1 parent b0f4a0f commit 9b5ac57
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 13 deletions.
24 changes: 12 additions & 12 deletions load_balancer_listeners.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,18 @@ type LoadBalancerListener struct {
TaggedResource
// Just use omitempty everywhere. This makes it easy to use restful. Errors
// will be coming from the API if something is disabled.
HREF string `json:"href,omitempty"`
UUID string `json:"uuid,omitempty"`
Name string `json:"name,omitempty"`
Pool LoadBalancerPoolStub `json:"pool,omitempty"`
LoadBalancer LoadBalancerStub `json:"load_balancer,omitempty"`
Protocol string `json:"protocol,omitempty"`
ProtocolPort int `json:"protocol_port,omitempty"`
AllowedCIDRs []string `json:"allowed_cidrs,omitempty"`
TimeoutClientDataMS int `json:"timeout_client_data_ms,omitempty"`
TimeoutMemberConnectMS int `json:"timeout_member_connect_ms,omitempty"`
TimeoutMemberDataMS int `json:"timeout_member_data_ms,omitempty"`
CreatedAt time.Time `json:"created_at,omitempty"`
HREF string `json:"href,omitempty"`
UUID string `json:"uuid,omitempty"`
Name string `json:"name,omitempty"`
Pool *LoadBalancerPoolStub `json:"pool,omitempty"`
LoadBalancer LoadBalancerStub `json:"load_balancer,omitempty"`
Protocol string `json:"protocol,omitempty"`
ProtocolPort int `json:"protocol_port,omitempty"`
AllowedCIDRs []string `json:"allowed_cidrs,omitempty"`
TimeoutClientDataMS int `json:"timeout_client_data_ms,omitempty"`
TimeoutMemberConnectMS int `json:"timeout_member_connect_ms,omitempty"`
TimeoutMemberDataMS int `json:"timeout_member_data_ms,omitempty"`
CreatedAt time.Time `json:"created_at,omitempty"`
}

type LoadBalancerListenerRequest struct {
Expand Down
7 changes: 6 additions & 1 deletion test/integration/load_balancer_listeners_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,12 @@ func TestIntegrationLoadBalancerListener_CRUD(t *testing.T) {
t.Errorf("Error = %#v, expected %#v", loadBalancerListener, expected)
}

if poolLbUUID := loadBalancerListener.Pool.UUID; poolLbUUID != pool.UUID {
lbPool := loadBalancerListener.Pool
if lbPool == nil {
t.Errorf("expected lbPool not to be nil, got=%#v", lbPool)
}

if poolLbUUID := lbPool.UUID; poolLbUUID != pool.UUID {
t.Errorf("poolLbUUID \n got=%#v\nwant=%#v", poolLbUUID, pool.UUID)
}

Expand Down

0 comments on commit 9b5ac57

Please sign in to comment.