aboutsummaryrefslogtreecommitdiffstats
path: root/network/endpoints/build_endpoint_map.py
diff options
context:
space:
mode:
authorJuan Antonio Osorio Robles <jaosorior@redhat.com>2016-08-17 15:05:41 +0300
committerJuan Antonio Osorio Robles <jaosorior@redhat.com>2016-08-24 15:03:38 +0300
commitf9dadcafcfa798f20e1ea561c0c75679747bd525 (patch)
tree6d34a19ccecb6ddc2d9af52475e7240563718c75 /network/endpoints/build_endpoint_map.py
parent1c8b5fa5d7d633d156e761d21ff60188eb43701f (diff)
Enable usage of FQDNs for the endpoints
The endpoint map has the capability of using the cloud's name for the endpoint. This is broken, however, since this has the problem that we only take into account the overcloud's external endpoint name, which we then cannot use if we have network-isolation enabled, which is the most common use-case for real deployments. So this change proposes the following: * The external endpoint is still CloudName. * We can now set different (or the same if we want) names for the different VIPs of the network. * Using CLOUDNAME for the endpoint map will get a name for the appropriate network. bp tls-via-certmonger Change-Id: I3e7144653f0a1d783d87e6f638304b297f718929
Diffstat (limited to 'network/endpoints/build_endpoint_map.py')
-rwxr-xr-xnetwork/endpoints/build_endpoint_map.py23
1 files changed, 15 insertions, 8 deletions
diff --git a/network/endpoints/build_endpoint_map.py b/network/endpoints/build_endpoint_map.py
index 3110f3f7..964f58f7 100755
--- a/network/endpoints/build_endpoint_map.py
+++ b/network/endpoints/build_endpoint_map.py
@@ -30,9 +30,9 @@ import yaml
(IN_FILE, OUT_FILE) = ('endpoint_data.yaml', 'endpoint_map.yaml')
SUBST = (SUBST_IP_ADDRESS, SUBST_CLOUDNAME) = ('IP_ADDRESS', 'CLOUDNAME')
-PARAMS = (PARAM_CLOUDNAME, PARAM_ENDPOINTMAP, PARAM_NETIPMAP,
+PARAMS = (PARAM_CLOUD_ENDPOINTS, PARAM_ENDPOINTMAP, PARAM_NETIPMAP,
PARAM_SERVICENETMAP) = (
- 'CloudName', 'EndpointMap', 'NetIpMap', 'ServiceNetMap')
+ 'CloudEndpoints', 'EndpointMap', 'NetIpMap', 'ServiceNetMap')
FIELDS = (F_PORT, F_PROTOCOL, F_HOST) = ('port', 'protocol', 'host')
ENDPOINT_TYPES = frozenset(['Internal', 'Public', 'Admin'])
@@ -95,10 +95,11 @@ def template_parameters(config):
'via parameter_defaults in the '
'resource registry.')
- params[PARAM_CLOUDNAME] = make_parameter('string',
- 'overcloud',
- 'The DNS name of this cloud. '
- 'e.g. ci-overcloud.tripleo.org')
+ params[PARAM_CLOUD_ENDPOINTS] = make_parameter(
+ 'json',
+ {},
+ ('A map containing the DNS names for the different endpoints '
+ '(external, internal_api, etc.)'))
return params
@@ -124,7 +125,10 @@ def template_output_definition(endpoint_name,
['NetIpMap',
{'get_param': ['ServiceNetMap',
net_param]}]},
- SUBST_CLOUDNAME: {'get_param': PARAM_CLOUDNAME},
+ SUBST_CLOUDNAME: {'get_param':
+ [PARAM_CLOUD_ENDPOINTS,
+ {'get_param': ['ServiceNetMap',
+ net_param]}]},
})
])
}
@@ -139,7 +143,10 @@ def template_output_definition(endpoint_name,
'params': {'NETWORK':
{'get_param': ['ServiceNetMap',
net_param]}}}}]},
- SUBST_CLOUDNAME: {'get_param': PARAM_CLOUDNAME},
+ SUBST_CLOUDNAME: {'get_param':
+ [PARAM_CLOUD_ENDPOINTS,
+ {'get_param': ['ServiceNetMap',
+ net_param]}]},
})
])
}