From dd43a6b195156385dc026c8d9f2554740fffe513 Mon Sep 17 00:00:00 2001 From: tengqm Date: Mon, 29 Dec 2014 14:45:27 +0800 Subject: [PATCH] WIP change to stack profile example. Senlin parser will support '!include' constructor for users to compose a larger YAML file from different ones. --- .../profiles/heat_stack_random_string.yaml | 18 +++++++++--------- examples/profiles/node_stack.yaml | 12 ++++++++++++ 2 files changed, 21 insertions(+), 9 deletions(-) create mode 100644 examples/profiles/node_stack.yaml diff --git a/examples/profiles/heat_stack_random_string.yaml b/examples/profiles/heat_stack_random_string.yaml index 0358e211c..86f6f4c67 100644 --- a/examples/profiles/heat_stack_random_string.yaml +++ b/examples/profiles/heat_stack_random_string.yaml @@ -1,12 +1,12 @@ +senlin_profile_version: 2014-10-16 type: os.heat.stack spec: template: - heat_template_version: 2014-10-16 - resources: - random: - type: OS::Heat::RandomString - properties: - length: 64 - outputs: - result: - value: {get_attr: [random, value]} + !include node_stack.yaml + context: default + parameters: + len: 16 + outputs: + name: node-%index% + timeoout: 60 + enable_rollback: True diff --git a/examples/profiles/node_stack.yaml b/examples/profiles/node_stack.yaml new file mode 100644 index 000000000..e099bf3f8 --- /dev/null +++ b/examples/profiles/node_stack.yaml @@ -0,0 +1,12 @@ +heat_template_version: 2014-10-16 +parameters: + len: + type: integer +resources: + random: + type: OS::Heat::RandomString + properties: + length: 64 +outputs: + result: + value: {get_attr: [random, value]}