more error types; RequestOptsBuilder error fixes
diff --git a/openstack/db/v1/configurations/requests.go b/openstack/db/v1/configurations/requests.go
index 818f443..035ff29 100644
--- a/openstack/db/v1/configurations/requests.go
+++ b/openstack/db/v1/configurations/requests.go
@@ -103,7 +103,7 @@
return res
}
- _, res.Err = client.Request("POST", baseURL(client), gophercloud.RequestOpts{
+ _, res.Err = client.Request("POST", baseURL(client), &gophercloud.RequestOpts{
OkCodes: []int{200},
JSONBody: &reqBody,
JSONResponse: &res.Body,
@@ -116,7 +116,7 @@
func Get(client *gophercloud.ServiceClient, configID string) GetResult {
var res GetResult
- _, res.Err = client.Request("GET", resourceURL(client, configID), gophercloud.RequestOpts{
+ _, res.Err = client.Request("GET", resourceURL(client, configID), &gophercloud.RequestOpts{
OkCodes: []int{200},
JSONResponse: &res.Body,
})
@@ -186,7 +186,7 @@
return res
}
- _, res.Err = client.Request("PATCH", resourceURL(client, configID), gophercloud.RequestOpts{
+ _, res.Err = client.Request("PATCH", resourceURL(client, configID), &gophercloud.RequestOpts{
OkCodes: []int{200},
JSONBody: &reqBody,
})
@@ -206,7 +206,7 @@
return res
}
- _, res.Err = client.Request("PUT", resourceURL(client, configID), gophercloud.RequestOpts{
+ _, res.Err = client.Request("PUT", resourceURL(client, configID), &gophercloud.RequestOpts{
OkCodes: []int{202},
JSONBody: &reqBody,
})
@@ -220,7 +220,7 @@
func Delete(client *gophercloud.ServiceClient, configID string) DeleteResult {
var res DeleteResult
- _, res.Err = client.Request("DELETE", resourceURL(client, configID), gophercloud.RequestOpts{
+ _, res.Err = client.Request("DELETE", resourceURL(client, configID), &gophercloud.RequestOpts{
OkCodes: []int{202},
})
@@ -256,7 +256,7 @@
func GetDatastoreParam(client *gophercloud.ServiceClient, datastoreID, versionID, paramID string) ParamResult {
var res ParamResult
- _, res.Err = client.Request("GET", getDSParamURL(client, datastoreID, versionID, paramID), gophercloud.RequestOpts{
+ _, res.Err = client.Request("GET", getDSParamURL(client, datastoreID, versionID, paramID), &gophercloud.RequestOpts{
OkCodes: []int{200},
JSONResponse: &res.Body,
})
@@ -278,7 +278,7 @@
func GetGlobalParam(client *gophercloud.ServiceClient, versionID, paramID string) ParamResult {
var res ParamResult
- _, res.Err = client.Request("GET", getGlobalParamURL(client, versionID, paramID), gophercloud.RequestOpts{
+ _, res.Err = client.Request("GET", getGlobalParamURL(client, versionID, paramID), &gophercloud.RequestOpts{
OkCodes: []int{200},
JSONResponse: &res.Body,
})
diff --git a/openstack/db/v1/databases/requests.go b/openstack/db/v1/databases/requests.go
index 26bca04..ff57245 100644
--- a/openstack/db/v1/databases/requests.go
+++ b/openstack/db/v1/databases/requests.go
@@ -83,7 +83,7 @@
return res
}
- _, res.Err = client.Request("POST", baseURL(client, instanceID), gophercloud.RequestOpts{
+ _, res.Err = client.Request("POST", baseURL(client, instanceID), &gophercloud.RequestOpts{
JSONBody: &reqBody,
OkCodes: []int{202},
})
@@ -107,7 +107,7 @@
func Delete(client *gophercloud.ServiceClient, instanceID, dbName string) DeleteResult {
var res DeleteResult
- _, res.Err = client.Request("DELETE", dbURL(client, instanceID, dbName), gophercloud.RequestOpts{
+ _, res.Err = client.Request("DELETE", dbURL(client, instanceID, dbName), &gophercloud.RequestOpts{
OkCodes: []int{202},
})
diff --git a/openstack/db/v1/datastores/requests.go b/openstack/db/v1/datastores/requests.go
index b7188c4..277c797 100644
--- a/openstack/db/v1/datastores/requests.go
+++ b/openstack/db/v1/datastores/requests.go
@@ -17,7 +17,7 @@
func Get(client *gophercloud.ServiceClient, datastoreID string) GetResult {
var res GetResult
- _, res.Err = client.Request("GET", resourceURL(client, datastoreID), gophercloud.RequestOpts{
+ _, res.Err = client.Request("GET", resourceURL(client, datastoreID), &gophercloud.RequestOpts{
OkCodes: []int{200},
JSONResponse: &res.Body,
})
@@ -38,7 +38,7 @@
func GetVersion(client *gophercloud.ServiceClient, datastoreID, versionID string) GetVersionResult {
var res GetVersionResult
- _, res.Err = client.Request("GET", versionURL(client, datastoreID, versionID), gophercloud.RequestOpts{
+ _, res.Err = client.Request("GET", versionURL(client, datastoreID, versionID), &gophercloud.RequestOpts{
OkCodes: []int{200},
JSONResponse: &res.Body,
})
diff --git a/openstack/db/v1/flavors/requests.go b/openstack/db/v1/flavors/requests.go
index 6eb598b..c767606 100644
--- a/openstack/db/v1/flavors/requests.go
+++ b/openstack/db/v1/flavors/requests.go
@@ -20,7 +20,7 @@
func Get(client *gophercloud.ServiceClient, id string) GetResult {
var gr GetResult
- _, gr.Err = client.Request("GET", getURL(client, id), gophercloud.RequestOpts{
+ _, gr.Err = client.Request("GET", getURL(client, id), &gophercloud.RequestOpts{
JSONResponse: &gr.Body,
OkCodes: []int{200},
})
diff --git a/openstack/db/v1/instances/requests.go b/openstack/db/v1/instances/requests.go
index 35b9f9a..7714a21 100644
--- a/openstack/db/v1/instances/requests.go
+++ b/openstack/db/v1/instances/requests.go
@@ -104,7 +104,7 @@
return res
}
- _, res.Err = client.Request("POST", baseURL(client), gophercloud.RequestOpts{
+ _, res.Err = client.Request("POST", baseURL(client), &gophercloud.RequestOpts{
JSONBody: &reqBody,
JSONResponse: &res.Body,
OkCodes: []int{200},
@@ -126,7 +126,7 @@
func Get(client *gophercloud.ServiceClient, id string) GetResult {
var res GetResult
- _, res.Err = client.Request("GET", resourceURL(client, id), gophercloud.RequestOpts{
+ _, res.Err = client.Request("GET", resourceURL(client, id), &gophercloud.RequestOpts{
JSONResponse: &res.Body,
OkCodes: []int{200},
})
@@ -138,7 +138,7 @@
func Delete(client *gophercloud.ServiceClient, id string) DeleteResult {
var res DeleteResult
- _, res.Err = client.Request("DELETE", resourceURL(client, id), gophercloud.RequestOpts{
+ _, res.Err = client.Request("DELETE", resourceURL(client, id), &gophercloud.RequestOpts{
OkCodes: []int{202},
})
@@ -150,7 +150,7 @@
func EnableRootUser(client *gophercloud.ServiceClient, id string) UserRootResult {
var res UserRootResult
- _, res.Err = client.Request("POST", userRootURL(client, id), gophercloud.RequestOpts{
+ _, res.Err = client.Request("POST", userRootURL(client, id), &gophercloud.RequestOpts{
JSONResponse: &res.Body,
OkCodes: []int{200},
})
@@ -164,7 +164,7 @@
func IsRootEnabled(client *gophercloud.ServiceClient, id string) (bool, error) {
var res gophercloud.Result
- _, err := client.Request("GET", userRootURL(client, id), gophercloud.RequestOpts{
+ _, err := client.Request("GET", userRootURL(client, id), &gophercloud.RequestOpts{
JSONResponse: &res.Body,
OkCodes: []int{200},
})
@@ -178,7 +178,7 @@
func Restart(client *gophercloud.ServiceClient, id string) ActionResult {
var res ActionResult
- _, res.Err = client.Request("POST", actionURL(client, id), gophercloud.RequestOpts{
+ _, res.Err = client.Request("POST", actionURL(client, id), &gophercloud.RequestOpts{
JSONBody: map[string]interface{}{"restart": struct{}{}},
OkCodes: []int{202},
})
@@ -201,7 +201,7 @@
reqBody := req{Resize: resize{FlavorRef: flavorRef}}
- _, res.Err = client.Request("POST", actionURL(client, id), gophercloud.RequestOpts{
+ _, res.Err = client.Request("POST", actionURL(client, id), &gophercloud.RequestOpts{
JSONBody: reqBody,
OkCodes: []int{202},
})
@@ -229,7 +229,7 @@
reqBody := req{Resize: resize{Volume: volume{Size: size}}}
- _, res.Err = client.Request("POST", actionURL(client, id), gophercloud.RequestOpts{
+ _, res.Err = client.Request("POST", actionURL(client, id), &gophercloud.RequestOpts{
JSONBody: reqBody,
OkCodes: []int{202},
})
diff --git a/openstack/db/v1/users/requests.go b/openstack/db/v1/users/requests.go
index acf0a13..8f86297 100644
--- a/openstack/db/v1/users/requests.go
+++ b/openstack/db/v1/users/requests.go
@@ -101,7 +101,7 @@
return res
}
- _, res.Err = client.Request("POST", baseURL(client, instanceID), gophercloud.RequestOpts{
+ _, res.Err = client.Request("POST", baseURL(client, instanceID), &gophercloud.RequestOpts{
JSONBody: &reqBody,
OkCodes: []int{202},
})
@@ -124,7 +124,7 @@
func Delete(client *gophercloud.ServiceClient, instanceID, userName string) DeleteResult {
var res DeleteResult
- _, res.Err = client.Request("DELETE", userURL(client, instanceID, userName), gophercloud.RequestOpts{
+ _, res.Err = client.Request("DELETE", userURL(client, instanceID, userName), &gophercloud.RequestOpts{
OkCodes: []int{202},
})