Skip to content

Commit

Permalink
Included vip ip family in loadbalancer response
Browse files Browse the repository at this point in the history
  • Loading branch information
lapson97 committed Dec 22, 2023
1 parent c86cd33 commit e09f635
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions gcore/loadbalancer/v1/loadbalancers/results.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ type LoadBalancer struct {
Metadata []metadata.Metadata `json:"metadata"`
DdosProfile *ddos.Profile `json:"ddos_profile"`
VrrpIPs []NetworkPortFixedIP `json:"vrrp_ips"`
VipIPFamilyType types.IPFamilyType `json:"vip_ip_family"`
}

// NetworkPortFixedIP represents VRRP entry structure.
Expand Down
7 changes: 5 additions & 2 deletions gcore/loadbalancer/v1/loadbalancers/testing/fixtures.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ var ListResponse = fmt.Sprintf(`
"project_id": 1,
"region_id": 1,
"metadata": [%s],
"vrrp_ips": [%s]
"vrrp_ips": [%s],
"vip_ip_family": "dual"
}
]
}
Expand Down Expand Up @@ -95,7 +96,8 @@ var GetResponse = fmt.Sprintf(`
"project_id": 1,
"region_id": 1,
"metadata": [%s],
"vrrp_ips": [%s]
"vrrp_ips": [%s],
"vip_ip_family": "dual"
}
`, testing.MetadataResponse, VrrpIPsResponse)

Expand Down Expand Up @@ -199,6 +201,7 @@ var (
{IpAddress: net.ParseIP("10.94.76.179"), SubnetID: "db5ebada-a86a-4702-8a19-00b23a1acb05"},
{IpAddress: net.ParseIP("aa:bb:cc:dd::2b5"), SubnetID: "abd99b68-e139-4715-b8c2-37ca324285b8"},
},
VipIPFamilyType: types.DualStackIPFamilyType,
}
Tasks1 = tasks.TaskResults{
Tasks: []tasks.TaskID{"50f53a35-42ed-40c4-82b2-5a37fb3e00bc"},
Expand Down

0 comments on commit e09f635

Please sign in to comment.