From c67beffdbb1d62117aa254b284244d53f3a22c9a Mon Sep 17 00:00:00 2001 From: Jake Warner Date: Thu, 20 Oct 2022 17:33:35 -0700 Subject: [PATCH] Available Addresses call doesn't utilize CIDR The opts.Filter() call returns a new object instead of an existing. Since the underlying object isn't being modified, we must capture the output of Filter. This API call doesn't work otherwise. --- ip.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ip.go b/ip.go index 74f84b0..90a1a5c 100644 --- a/ip.go +++ b/ip.go @@ -376,7 +376,7 @@ func (i *ProjectIPServiceOp) AvailableAddresses(ipReservationID string, r *Avail } opts := &GetOptions{} - opts.Filter("cidr", strconv.Itoa(r.CIDR)) + opts = opts.Filter("cidr", strconv.Itoa(r.CIDR)) endpointPath := path.Join(ipBasePath, ipReservationID, "available") apiPathQuery := opts.WithQuery(endpointPath)