[rfr] Remove imageName and flavorName from Boot From Volume
As of Liberty, passing imageName and flavorName causes Nova to return
a 400 error reporting that those fields are not allowed to be sent.
diff --git a/openstack/compute/v2/extensions/bootfromvolume/requests.go b/openstack/compute/v2/extensions/bootfromvolume/requests.go
index c0ba368..c8edee0 100644
--- a/openstack/compute/v2/extensions/bootfromvolume/requests.go
+++ b/openstack/compute/v2/extensions/bootfromvolume/requests.go
@@ -99,6 +99,11 @@
return res
}
+ // Delete imageName and flavorName that come from ToServerCreateMap().
+ // As of Liberty, Boot From Volume is failing if they are passed.
+ delete(reqBody["server"].(map[string]interface{}), "imageName")
+ delete(reqBody["server"].(map[string]interface{}), "flavorName")
+
_, res.Err = client.Post(createURL(client), reqBody, &res.Body, &gophercloud.RequestOpts{
OkCodes: []int{200, 202},
})