change Template field from string to type map
diff --git a/openstack/orchestration/v1/stacks/fixtures.go b/openstack/orchestration/v1/stacks/fixtures.go
index 72e327d..6cb5c86 100644
--- a/openstack/orchestration/v1/stacks/fixtures.go
+++ b/openstack/orchestration/v1/stacks/fixtures.go
@@ -278,34 +278,60 @@
})
}
+/*
+`
+{
+"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"
+}
+}
+}
+}`
+*/
+
// AbandonExpected represents the expected object from an Abandon request.
var AbandonExpected = &AbandonedStack{
Status: "COMPLETE",
Name: "postman_stack",
- Template: `
- {
- "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"
- }
- }
- }
- }`,
+ Template: map[string]interface{}{
+ "heat_template_version": "2013-05-23",
+ "description": "Simple template to test heat commands",
+ "parameters": map[string]interface{}{
+ "flavor": map[string]interface{}{
+ "default": "m1.tiny",
+ "type": "string",
+ },
+ },
+ "resources": map[string]interface{}{
+ "hello_world": map[string]interface{}{
+ "type": "OS::Nova::Server",
+ "properties": map[string]interface{}{
+ "key_name": "heat_key",
+ "flavor": map[string]interface{}{
+ "get_param": "flavor",
+ },
+ "image": "ad091b52-742f-469e-8f3c-fd81cadf0743",
+ "user_data": "#!/bin/bash -xv\necho \"hello world\" > /root/hello-world.txt\n",
+ },
+ },
+ },
+ },
Action: "CREATE",
ID: "16ef0584-4458-41eb-87c8-0dc8d5f66c87",
Resources: map[string]interface{}{
diff --git a/openstack/orchestration/v1/stacks/results.go b/openstack/orchestration/v1/stacks/results.go
index 84d6f9e..1e60f8a 100644
--- a/openstack/orchestration/v1/stacks/results.go
+++ b/openstack/orchestration/v1/stacks/results.go
@@ -257,7 +257,7 @@
type AbandonedStack struct {
Status string `mapstructure:"status"`
Name string `mapstructure:"name"`
- Template string `mapstructure:"template"`
+ Template map[string]interface{} `mapstructure:"template"`
Action string `mapstructure:"action"`
ID string `mapstructure:"id"`
Resources map[string]interface{} `mapstructure:"resources"`