Change HTTP methods for OpenStack Compute
diff --git a/openstack/compute/v2/extensions/startstop/requests.go b/openstack/compute/v2/extensions/startstop/requests.go
index 89bc248..0e090e6 100644
--- a/openstack/compute/v2/extensions/startstop/requests.go
+++ b/openstack/compute/v2/extensions/startstop/requests.go
@@ -9,25 +9,15 @@
// Start is the operation responsible for starting a Compute server.
func Start(client *gophercloud.ServiceClient, id string) gophercloud.ErrResult {
var res gophercloud.ErrResult
-
reqBody := map[string]interface{}{"os-start": nil}
-
- _, res.Err = client.Request("POST", actionURL(client, id), gophercloud.RequestOpts{
- JSONBody: reqBody,
- })
-
+ _, res.Err = client.Post(actionURL(client, id), reqBody, nil, nil)
return res
}
// Stop is the operation responsible for stopping a Compute server.
func Stop(client *gophercloud.ServiceClient, id string) gophercloud.ErrResult {
var res gophercloud.ErrResult
-
reqBody := map[string]interface{}{"os-stop": nil}
-
- _, res.Err = client.Request("POST", actionURL(client, id), gophercloud.RequestOpts{
- JSONBody: reqBody,
- })
-
+ _, res.Err = client.Post(actionURL(client, id), reqBody, nil, nil)
return res
}