Make CloudName available for Endpoints
[apex-tripleo-heat-templates.git] / network / endpoints / endpoint.yaml
1 heat_template_version: 2015-04-30
2
3 description: >
4   OpenStack Endpoint
5
6 parameters:
7   EndpointName:
8     type: string
9     description: The name of the Endpoint being evaluated
10   EndpointMap:
11     type: json
12     default: {}
13     description: Mapping of service endpoint -> protocol. Typically set
14                  via parameter_defaults in the resource registry.
15   IP:
16     type: string
17     description: The IP address of the Neutron Port that the endpoint is attached to
18   UriSuffix:
19     type: string
20     default: ''
21     description: A suffix attached to the URL
22   CloudName:
23     type: string
24     default: ''
25     description: The DNS name of this cloud. E.g. ci-overcloud.tripleo.org
26
27 outputs:
28   endpoint:
29     description: >
30       A Hash containing a mapping of service endpoints to ports, protocols, uris
31       assigned IPs, and hostnames for a specific endpoint
32     value:
33       port: {get_param: [EndpointMap, {get_param: EndpointName }, port] }
34       protocol: {get_param: [EndpointMap, {get_param: EndpointName }, protocol] }
35       host:
36         str_replace:
37           template: {get_param: [EndpointMap, {get_param: EndpointName }, host]}
38           params: {IP_ADDRESS: {get_param: IP}, CLOUDNAME: {get_param: CloudName}}
39       uri:
40         list_join:
41           - ''
42           - - {get_param: [EndpointMap, {get_param: EndpointName }, protocol] }
43             - '://'
44             - str_replace:
45                 template: {get_param: [EndpointMap, {get_param: EndpointName }, host]}
46                 params: {IP_ADDRESS: {get_param: IP}, CLOUDNAME: {get_param: CloudName }}
47             - ':'
48             - {get_param: [EndpointMap, {get_param: EndpointName }, port] }
49             - {get_param: UriSuffix }
50       uri_no_suffix:
51         list_join:
52           - ''
53           - - {get_param: [EndpointMap, {get_param: EndpointName }, protocol] }
54             - '://'
55             - str_replace:
56                 template: {get_param: [EndpointMap, {get_param: EndpointName }, host]}
57                 params: {IP_ADDRESS: {get_param: IP}, CLOUDNAME: {get_param: CloudName} }
58             - ':'
59             - {get_param: [EndpointMap, {get_param: EndpointName }, port] }