Adjust regexps and do another pass.
diff --git a/openstack/compute/v2/extensions/secgroups/requests.go b/openstack/compute/v2/extensions/secgroups/requests.go
index 3ebbf89..4292894 100644
--- a/openstack/compute/v2/extensions/secgroups/requests.go
+++ b/openstack/compute/v2/extensions/secgroups/requests.go
@@ -3,8 +3,6 @@
import (
"errors"
- "github.com/racker/perigee"
-
"github.com/rackspace/gophercloud"
"github.com/rackspace/gophercloud/pagination"
)
@@ -125,11 +123,10 @@
return result
}
- _, result.Err = perigee.Request("PUT", resourceURL(client, id), perigee.Options{
- Results: &result.Body,
- ReqBody: &reqBody,
- MoreHeaders: client.AuthenticatedHeaders(),
- OkCodes: []int{200},
+ _, result.Err = client.Request("PUT", resourceURL(client, id), gophercloud.RequestOpts{
+ JSONResponse: &result.Body,
+ JSONBody: &reqBody,
+ OkCodes: []int{200},
})
return result
@@ -139,10 +136,9 @@
func Get(client *gophercloud.ServiceClient, id string) GetResult {
var result GetResult
- _, result.Err = perigee.Request("GET", resourceURL(client, id), perigee.Options{
- Results: &result.Body,
- MoreHeaders: client.AuthenticatedHeaders(),
- OkCodes: []int{200},
+ _, result.Err = client.Request("GET", resourceURL(client, id), gophercloud.RequestOpts{
+ JSONResponse: &result.Body,
+ OkCodes: []int{200},
})
return result
@@ -152,9 +148,8 @@
func Delete(client *gophercloud.ServiceClient, id string) gophercloud.ErrResult {
var result gophercloud.ErrResult
- _, result.Err = perigee.Request("DELETE", resourceURL(client, id), perigee.Options{
- MoreHeaders: client.AuthenticatedHeaders(),
- OkCodes: []int{202},
+ _, result.Err = client.Request("DELETE", resourceURL(client, id), gophercloud.RequestOpts{
+ OkCodes: []int{202},
})
return result
@@ -252,9 +247,8 @@
func DeleteRule(client *gophercloud.ServiceClient, id string) gophercloud.ErrResult {
var result gophercloud.ErrResult
- _, result.Err = perigee.Request("DELETE", resourceRuleURL(client, id), perigee.Options{
- MoreHeaders: client.AuthenticatedHeaders(),
- OkCodes: []int{202},
+ _, result.Err = client.Request("DELETE", resourceRuleURL(client, id), gophercloud.RequestOpts{
+ OkCodes: []int{202},
})
return result
@@ -271,11 +265,10 @@
func AddServerToGroup(client *gophercloud.ServiceClient, serverID, groupName string) gophercloud.ErrResult {
var result gophercloud.ErrResult
- _, result.Err = perigee.Request("POST", serverActionURL(client, serverID), perigee.Options{
- Results: &result.Body,
- ReqBody: actionMap("add", groupName),
- MoreHeaders: client.AuthenticatedHeaders(),
- OkCodes: []int{202},
+ _, result.Err = client.Request("POST", serverActionURL(client, serverID), gophercloud.RequestOpts{
+ JSONResponse: &result.Body,
+ JSONBody: actionMap("add", groupName),
+ OkCodes: []int{202},
})
return result
@@ -285,11 +278,10 @@
func RemoveServerFromGroup(client *gophercloud.ServiceClient, serverID, groupName string) gophercloud.ErrResult {
var result gophercloud.ErrResult
- _, result.Err = perigee.Request("POST", serverActionURL(client, serverID), perigee.Options{
- Results: &result.Body,
- ReqBody: actionMap("remove", groupName),
- MoreHeaders: client.AuthenticatedHeaders(),
- OkCodes: []int{202},
+ _, result.Err = client.Request("POST", serverActionURL(client, serverID), gophercloud.RequestOpts{
+ JSONResponse: &result.Body,
+ JSONBody: actionMap("remove", groupName),
+ OkCodes: []int{202},
})
return result