Adjust regexps and do another pass.
diff --git a/rackspace/lb/v1/nodes/requests.go b/rackspace/lb/v1/nodes/requests.go
index 5c926a9..86fe5d7 100644
--- a/rackspace/lb/v1/nodes/requests.go
+++ b/rackspace/lb/v1/nodes/requests.go
@@ -4,7 +4,6 @@
"errors"
"fmt"
- "github.com/racker/perigee"
"github.com/rackspace/gophercloud"
"github.com/rackspace/gophercloud/pagination"
)
@@ -113,18 +112,17 @@
return res
}
- resp, err := perigee.Request("POST", rootURL(client, loadBalancerID), perigee.Options{
- MoreHeaders: client.AuthenticatedHeaders(),
- ReqBody: &reqBody,
- Results: &res.Body,
- OkCodes: []int{202},
+ resp, err := client.Request("POST", rootURL(client, loadBalancerID), gophercloud.RequestOpts{
+ JSONBody: &reqBody,
+ JSONResponse: &res.Body,
+ OkCodes: []int{202},
})
if err != nil {
res.Err = err
return res
}
- pr, err := pagination.PageResultFrom(&resp.HttpResponse)
+ pr, err := pagination.PageResultFrom(resp)
if err != nil {
res.Err = err
return res
@@ -158,10 +156,9 @@
func Get(c *gophercloud.ServiceClient, lbID, nodeID int) GetResult {
var res GetResult
- _, res.Err = perigee.Request("GET", resourceURL(c, lbID, nodeID), perigee.Options{
- MoreHeaders: c.AuthenticatedHeaders(),
- Results: &res.Body,
- OkCodes: []int{200},
+ _, res.Err = c.Request("GET", resourceURL(c, lbID, nodeID), gophercloud.RequestOpts{
+ JSONResponse: &res.Body,
+ OkCodes: []int{200},
})
return res
@@ -216,10 +213,9 @@
return res
}
- _, res.Err = perigee.Request("PUT", resourceURL(c, lbID, nodeID), perigee.Options{
- MoreHeaders: c.AuthenticatedHeaders(),
- ReqBody: &reqBody,
- OkCodes: []int{202},
+ _, res.Err = c.Request("PUT", resourceURL(c, lbID, nodeID), gophercloud.RequestOpts{
+ JSONBody: &reqBody,
+ OkCodes: []int{202},
})
return res
@@ -228,9 +224,8 @@
// Delete is the operation responsible for permanently deleting a node.
func Delete(c *gophercloud.ServiceClient, lbID, nodeID int) DeleteResult {
var res DeleteResult
- _, res.Err = perigee.Request("DELETE", resourceURL(c, lbID, nodeID), perigee.Options{
- MoreHeaders: c.AuthenticatedHeaders(),
- OkCodes: []int{202},
+ _, res.Err = c.Request("DELETE", resourceURL(c, lbID, nodeID), gophercloud.RequestOpts{
+ OkCodes: []int{202},
})
return res
}