aboutsummaryrefslogtreecommitdiffstats
path: root/network/endpoints/endpoint.yaml
blob: 8ffd6c4bbbc943fb4928b22be07368654ecdaa99 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
heat_template_version: 2015-04-30

description: >
  OpenStack Endpoint

parameters:
  EndpointName:
    type: string
    description: The name of the Endpoint being evaluated
  EndpointMap:
    type: json
    default: {}
    description: Mapping of service endpoint -> protocol. Typically set
                 via parameter_defaults in the resource registry.
  IP:
    type: string
    description: The IP address of the Neutron Port that the endpoint is attached to
  UriSuffix:
    type: string
    default: ''
    description: A suffix attached to the URL

outputs:
  endpoint:
    description: >
      A Hash containing a mapping of service endpoints to ports, protocols, uris
      assigned IPs, and hostnames for a specific endpoint
    value:
      port: {get_param: [EndpointMap, {get_param: EndpointName }, port] }
      protocol: {get_param: [EndpointMap, {get_param: EndpointName }, protocol] }
      host:
        str_replace:
          template: {get_param: [EndpointMap, {get_param: EndpointName }, host]}
          params: {IP_ADDRESS: {get_param: IP} }
      uri:
        list_join:
          - ''
          - - {get_param: [EndpointMap, {get_param: EndpointName }, protocol] }
            - '://'
            - str_replace:
                template: {get_param: [EndpointMap, {get_param: EndpointName }, host]}
                params: {IP_ADDRESS: {get_param: IP} }
            - ':'
            - {get_param: [EndpointMap, {get_param: EndpointName }, port] }
            - {get_param: UriSuffix }
      uri_no_suffix:
        list_join:
          - ''
          - - {get_param: [EndpointMap, {get_param: EndpointName }, protocol] }
            - '://'
            - str_replace:
                template: {get_param: [EndpointMap, {get_param: EndpointName }, host]}
                params: {IP_ADDRESS: {get_param: IP} }
            - ':'
            - {get_param: [EndpointMap, {get_param: EndpointName }, port] }