Converting Rackspace services to new HTTP methods
diff --git a/rackspace/compute/v2/virtualinterfaces/requests.go b/rackspace/compute/v2/virtualinterfaces/requests.go
index 3c81ef8..1ff7c5a 100644
--- a/rackspace/compute/v2/virtualinterfaces/requests.go
+++ b/rackspace/compute/v2/virtualinterfaces/requests.go
@@ -28,10 +28,8 @@
}
// Send request to API
- _, res.Err = c.Request("POST", createURL(c, instanceID), gophercloud.RequestOpts{
- JSONBody: &reqBody,
- JSONResponse: &res.Body,
- OkCodes: []int{200, 201, 202},
+ _, res.Err = c.Post(createURL(c, instanceID), reqBody, &res.Body, &gophercloud.RequestOpts{
+ OkCodes: []int{200, 201, 202},
})
return res
}
@@ -40,7 +38,7 @@
// instanceID.
func Delete(c *gophercloud.ServiceClient, instanceID, interfaceID string) DeleteResult {
var res DeleteResult
- _, res.Err = c.Request("DELETE", deleteURL(c, instanceID, interfaceID), gophercloud.RequestOpts{
+ _, res.Err = c.Delete(deleteURL(c, instanceID, interfaceID), &gophercloud.RequestOpts{
OkCodes: []int{200, 204},
})
return res