Refactor OpenStack services to use default OkCodes
diff --git a/openstack/networking/v2/subnets/requests.go b/openstack/networking/v2/subnets/requests.go
index 63ac290..f66a6ac 100644
--- a/openstack/networking/v2/subnets/requests.go
+++ b/openstack/networking/v2/subnets/requests.go
@@ -80,7 +80,6 @@
var res GetResult
_, res.Err = c.Request("GET", getURL(c, id), gophercloud.RequestOpts{
JSONResponse: &res.Body,
- OkCodes: []int{200},
})
return res
}
@@ -174,7 +173,6 @@
_, res.Err = c.Request("POST", createURL(c), gophercloud.RequestOpts{
JSONBody: &reqBody,
JSONResponse: &res.Body,
- OkCodes: []int{201},
})
return res
@@ -241,8 +239,6 @@
// Delete accepts a unique ID and deletes the subnet associated with it.
func Delete(c *gophercloud.ServiceClient, id string) DeleteResult {
var res DeleteResult
- _, res.Err = c.Request("DELETE", deleteURL(c, id), gophercloud.RequestOpts{
- OkCodes: []int{204},
- })
+ _, res.Err = c.Request("DELETE", deleteURL(c, id), gophercloud.RequestOpts{})
return res
}