Converting Rackspace services to new HTTP methods
diff --git a/rackspace/lb/v1/acl/requests.go b/rackspace/lb/v1/acl/requests.go
index 94d98e3..d4ce7c0 100644
--- a/rackspace/lb/v1/acl/requests.go
+++ b/rackspace/lb/v1/acl/requests.go
@@ -74,11 +74,7 @@
return res
}
- _, res.Err = client.Request("POST", rootURL(client, loadBalancerID), gophercloud.RequestOpts{
- JSONBody: &reqBody,
- OkCodes: []int{202},
- })
-
+ _, res.Err = client.Post(rootURL(client, loadBalancerID), reqBody, nil, nil)
return res
}
@@ -95,19 +91,14 @@
url := rootURL(c, loadBalancerID)
url += gophercloud.IDSliceToQueryString("id", itemIDs)
- _, res.Err = c.Request("DELETE", url, gophercloud.RequestOpts{
- OkCodes: []int{202},
- })
-
+ _, res.Err = c.Delete(url, nil)
return res
}
// Delete will remove a single network item from a load balancer's access list.
func Delete(c *gophercloud.ServiceClient, lbID, itemID int) DeleteResult {
var res DeleteResult
- _, res.Err = c.Request("DELETE", resourceURL(c, lbID, itemID), gophercloud.RequestOpts{
- OkCodes: []int{202},
- })
+ _, res.Err = c.Delete(resourceURL(c, lbID, itemID), nil)
return res
}
@@ -115,8 +106,6 @@
// effectively resetting it and allowing all traffic.
func DeleteAll(c *gophercloud.ServiceClient, lbID int) DeleteResult {
var res DeleteResult
- _, res.Err = c.Request("DELETE", rootURL(c, lbID), gophercloud.RequestOpts{
- OkCodes: []int{202},
- })
+ _, res.Err = c.Delete(rootURL(c, lbID), nil)
return res
}