From 791daca9104b9f55d840d2155e6e996ca7af5f4d Mon Sep 17 00:00:00 2001 From: Anant Patil Date: Wed, 29 Apr 2015 11:58:52 +0530 Subject: [PATCH] Adding output section to templates Adding output section to templates to make most use of the template. Change-Id: I77f175b682fd0a5d074735eab3e60ad91fbdb67c --- hot/lb_server.yaml | 8 ++++++++ hot/multi_region_hello_world.yaml | 7 +++++++ hot/resource_group/server_with_volumes.yaml | 5 +++++ ...xample-os-apply-config-plus-cloud-config.yaml | 16 ++++++++++++++++ .../example-os-apply-config.yaml | 14 ++++++++++++++ .../example-structured-template.yaml | 6 ++++++ 6 files changed, 56 insertions(+) diff --git a/hot/lb_server.yaml b/hot/lb_server.yaml index 3e9da6de..3cd907ff 100644 --- a/hot/lb_server.yaml +++ b/hot/lb_server.yaml @@ -39,3 +39,11 @@ resources: pool_id: {get_param: pool_id} address: {get_attr: [server, first_address]} protocol_port: 80 + +outputs: + server_ip: + description: IP Address of the load-balanced server. + value: { get_attr: [server, first_address] } + lb_member: + description: LB member details. + value: { get_attr: [member, show] } diff --git a/hot/multi_region_hello_world.yaml b/hot/multi_region_hello_world.yaml index 4a6cd6bc..272bac35 100644 --- a/hot/multi_region_hello_world.yaml +++ b/hot/multi_region_hello_world.yaml @@ -73,3 +73,10 @@ resources: admin_pass: { get_param: admin_pass } db_port: { get_param: db_port } +outputs: + stack_one_outputs: + description: Output of stack_one. + value: { get_attr: [stack_one, outputs] } + stack_two_outputs: + description: Output of stack_two. + value: { get_attr: [stack_two, outputs] } diff --git a/hot/resource_group/server_with_volumes.yaml b/hot/resource_group/server_with_volumes.yaml index aa3ca9d9..1103b3c5 100644 --- a/hot/resource_group/server_with_volumes.yaml +++ b/hot/resource_group/server_with_volumes.yaml @@ -50,3 +50,8 @@ resources: properties: instance_id: {get_resource: instance} volume_size: {get_param: volume_size} + +outputs: + server_ip: + description: IP Address of server having volumes attached. + value: { get_attr: [instance, first_address] } diff --git a/hot/software-config/example-templates/example-os-apply-config-plus-cloud-config.yaml b/hot/software-config/example-templates/example-os-apply-config-plus-cloud-config.yaml index f35be316..622a9e39 100644 --- a/hot/software-config/example-templates/example-os-apply-config-plus-cloud-config.yaml +++ b/hot/software-config/example-templates/example-os-apply-config-plus-cloud-config.yaml @@ -62,3 +62,19 @@ resources: user_data_format: SOFTWARE_CONFIG user_data: get_resource: cloud_init_userdata + + +outputs: + server_ip: + description: IP Address of server. + value: { get_attr: [server, first_address] } + deployment_status: + description: Status code of configuration execution. + value: { get_attr: [deployment, deploy_status_code] } + deployment_stdout: + description: Standard output captured from the configuration execution. + value: { get_attr: [deployment, deploy_stdout] } + deployment_stderr: + description: Standard error captured from the configuration execution. + value: { get_attr: [deployment, deploy_stderr] } + diff --git a/hot/software-config/example-templates/example-os-apply-config.yaml b/hot/software-config/example-templates/example-os-apply-config.yaml index 3466ea1b..23444a72 100644 --- a/hot/software-config/example-templates/example-os-apply-config.yaml +++ b/hot/software-config/example-templates/example-os-apply-config.yaml @@ -43,3 +43,17 @@ resources: flavor: {get_param: flavor} key_name: {get_param: key_name} user_data_format: SOFTWARE_CONFIG + +outputs: + server_ip: + description: IP Address of server. + value: { get_attr: [server, first_address] } + deployment_status: + description: Status code of configuration execution. + value: { get_attr: [deployment, deploy_status_code] } + deployment_stdout: + description: Standard output captured from the configuration execution. + value: { get_attr: [deployment, deploy_stdout] } + deployment_stderr: + description: Standard error captured from the configuration execution. + value: { get_attr: [deployment, deploy_stderr] } diff --git a/hot/software-config/example-templates/example-structured-template.yaml b/hot/software-config/example-templates/example-structured-template.yaml index a691d1be..d1c580a8 100644 --- a/hot/software-config/example-templates/example-structured-template.yaml +++ b/hot/software-config/example-templates/example-structured-template.yaml @@ -67,3 +67,9 @@ resources: security_groups: - {get_resource: the_sg} user_data_format: SOFTWARE_CONFIG + + +outputs: + server_ip: + description: IP Address of server. + value: { get_attr: [server, first_address] }