Adjust regexps and do another pass.
diff --git a/rackspace/lb/v1/lbs/requests.go b/rackspace/lb/v1/lbs/requests.go
index 0b677f2..49a46f6 100644
--- a/rackspace/lb/v1/lbs/requests.go
+++ b/rackspace/lb/v1/lbs/requests.go
@@ -4,7 +4,6 @@
"errors"
"github.com/mitchellh/mapstructure"
- "github.com/racker/perigee"
"github.com/rackspace/gophercloud"
"github.com/rackspace/gophercloud/pagination"
@@ -244,10 +243,9 @@
func Get(c *gophercloud.ServiceClient, id int) GetResult {
var res GetResult
- _, res.Err = perigee.Request("GET", resourceURL(c, id), perigee.Options{
- MoreHeaders: c.AuthenticatedHeaders(),
- Results: &res.Body,
- OkCodes: []int{200},
+ _, res.Err = c.Request("GET", resourceURL(c, id), gophercloud.RequestOpts{
+ JSONResponse: &res.Body,
+ OkCodes: []int{200},
})
return res
@@ -282,9 +280,8 @@
func Delete(c *gophercloud.ServiceClient, id int) DeleteResult {
var res DeleteResult
- _, res.Err = perigee.Request("DELETE", resourceURL(c, id), perigee.Options{
- MoreHeaders: c.AuthenticatedHeaders(),
- OkCodes: []int{202},
+ _, res.Err = c.Request("DELETE", resourceURL(c, id), gophercloud.RequestOpts{
+ OkCodes: []int{202},
})
return res
@@ -366,10 +363,9 @@
return res
}
- _, res.Err = perigee.Request("PUT", resourceURL(c, id), perigee.Options{
- MoreHeaders: c.AuthenticatedHeaders(),
- ReqBody: &reqBody,
- OkCodes: []int{202},
+ _, res.Err = c.Request("PUT", resourceURL(c, id), gophercloud.RequestOpts{
+ JSONBody: &reqBody,
+ OkCodes: []int{202},
})
return res
@@ -398,10 +394,9 @@
func IsLoggingEnabled(client *gophercloud.ServiceClient, id int) (bool, error) {
var body interface{}
- _, err := perigee.Request("GET", loggingURL(client, id), perigee.Options{
- MoreHeaders: client.AuthenticatedHeaders(),
- Results: &body,
- OkCodes: []int{200},
+ _, err := client.Request("GET", loggingURL(client, id), gophercloud.RequestOpts{
+ JSONResponse: &body,
+ OkCodes: []int{200},
})
if err != nil {
return false, err
@@ -428,10 +423,9 @@
reqBody := toConnLoggingMap(true)
var res gophercloud.ErrResult
- _, res.Err = perigee.Request("PUT", loggingURL(client, id), perigee.Options{
- MoreHeaders: client.AuthenticatedHeaders(),
- ReqBody: &reqBody,
- OkCodes: []int{202},
+ _, res.Err = client.Request("PUT", loggingURL(client, id), gophercloud.RequestOpts{
+ JSONBody: &reqBody,
+ OkCodes: []int{202},
})
return res
@@ -442,10 +436,9 @@
reqBody := toConnLoggingMap(false)
var res gophercloud.ErrResult
- _, res.Err = perigee.Request("PUT", loggingURL(client, id), perigee.Options{
- MoreHeaders: client.AuthenticatedHeaders(),
- ReqBody: &reqBody,
- OkCodes: []int{202},
+ _, res.Err = client.Request("PUT", loggingURL(client, id), gophercloud.RequestOpts{
+ JSONBody: &reqBody,
+ OkCodes: []int{202},
})
return res
@@ -455,10 +448,9 @@
func GetErrorPage(client *gophercloud.ServiceClient, id int) ErrorPageResult {
var res ErrorPageResult
- _, res.Err = perigee.Request("GET", errorPageURL(client, id), perigee.Options{
- MoreHeaders: client.AuthenticatedHeaders(),
- Results: &res.Body,
- OkCodes: []int{200},
+ _, res.Err = client.Request("GET", errorPageURL(client, id), gophercloud.RequestOpts{
+ JSONResponse: &res.Body,
+ OkCodes: []int{200},
})
return res
@@ -472,11 +464,10 @@
type stringMap map[string]string
reqBody := map[string]stringMap{"errorpage": stringMap{"content": html}}
- _, res.Err = perigee.Request("PUT", errorPageURL(client, id), perigee.Options{
- MoreHeaders: client.AuthenticatedHeaders(),
- Results: &res.Body,
- ReqBody: &reqBody,
- OkCodes: []int{200},
+ _, res.Err = client.Request("PUT", errorPageURL(client, id), gophercloud.RequestOpts{
+ JSONResponse: &res.Body,
+ JSONBody: &reqBody,
+ OkCodes: []int{200},
})
return res
@@ -486,9 +477,8 @@
func DeleteErrorPage(client *gophercloud.ServiceClient, id int) gophercloud.ErrResult {
var res gophercloud.ErrResult
- _, res.Err = perigee.Request("DELETE", errorPageURL(client, id), perigee.Options{
- MoreHeaders: client.AuthenticatedHeaders(),
- OkCodes: []int{200},
+ _, res.Err = client.Request("DELETE", errorPageURL(client, id), gophercloud.RequestOpts{
+ OkCodes: []int{200},
})
return res
@@ -498,10 +488,9 @@
func GetStats(client *gophercloud.ServiceClient, id int) StatsResult {
var res StatsResult
- _, res.Err = perigee.Request("GET", statsURL(client, id), perigee.Options{
- MoreHeaders: client.AuthenticatedHeaders(),
- Results: &res.Body,
- OkCodes: []int{200},
+ _, res.Err = client.Request("GET", statsURL(client, id), gophercloud.RequestOpts{
+ JSONResponse: &res.Body,
+ OkCodes: []int{200},
})
return res
@@ -518,10 +507,9 @@
func IsContentCached(client *gophercloud.ServiceClient, id int) (bool, error) {
var body interface{}
- _, err := perigee.Request("GET", cacheURL(client, id), perigee.Options{
- MoreHeaders: client.AuthenticatedHeaders(),
- Results: &body,
- OkCodes: []int{200},
+ _, err := client.Request("GET", cacheURL(client, id), gophercloud.RequestOpts{
+ JSONResponse: &body,
+ OkCodes: []int{200},
})
if err != nil {
return false, err
@@ -548,10 +536,9 @@
reqBody := toCachingMap(true)
var res gophercloud.ErrResult
- _, res.Err = perigee.Request("PUT", cacheURL(client, id), perigee.Options{
- MoreHeaders: client.AuthenticatedHeaders(),
- ReqBody: &reqBody,
- OkCodes: []int{202},
+ _, res.Err = client.Request("PUT", cacheURL(client, id), gophercloud.RequestOpts{
+ JSONBody: &reqBody,
+ OkCodes: []int{202},
})
return res
@@ -562,10 +549,9 @@
reqBody := toCachingMap(false)
var res gophercloud.ErrResult
- _, res.Err = perigee.Request("PUT", cacheURL(client, id), perigee.Options{
- MoreHeaders: client.AuthenticatedHeaders(),
- ReqBody: &reqBody,
- OkCodes: []int{202},
+ _, res.Err = client.Request("PUT", cacheURL(client, id), gophercloud.RequestOpts{
+ JSONBody: &reqBody,
+ OkCodes: []int{202},
})
return res