make openstack acceptance test template use env vars
diff --git a/acceptance/openstack/orchestration/v1/common.go b/acceptance/openstack/orchestration/v1/common.go
index b010385..2c28dcb 100644
--- a/acceptance/openstack/orchestration/v1/common.go
+++ b/acceptance/openstack/orchestration/v1/common.go
@@ -3,6 +3,7 @@
package v1
import (
+ "fmt"
"os"
"testing"
@@ -11,31 +12,22 @@
th "github.com/rackspace/gophercloud/testhelper"
)
-const template = `
+var template = fmt.Sprintf(`
{
- "heat_template_version": "2013-05-23",
- "description": "Simple template to test heat commands",
- "parameters": {
- "flavor": {
- "default": "m1.tiny",
- "type": "string"
- }
- },
- "resources": {
- "hello_world": {
- "type":"OS::Nova::Server",
- "properties": {
- "key_name": "heat_key",
- "flavor": {
- "get_param": "flavor"
- },
- "image": "ad091b52-742f-469e-8f3c-fd81cadf0743",
- "user_data": "#!/bin/bash -xv\necho \"hello world\" > /root/hello-world.txt\n"
- }
- }
+ "heat_template_version": "2013-05-23",
+ "description": "Simple template to test heat commands",
+ "parameters": {},
+ "resources": {
+ "hello_world": {
+ "type":"OS::Nova::Server",
+ "properties": {
+ "flavor": "%s",
+ "image": "%s",
+ "user_data": "#!/bin/bash -xv\necho \"hello world\" > /root/hello-world.txt\n"
+ }
}
-}
-`
+ }
+}`, os.Getenv("OS_FLAVOR_ID"), os.Getenv("OS_IMAGE_ID"))
func newClient(t *testing.T) *gophercloud.ServiceClient {
ao, err := openstack.AuthOptionsFromEnv()