X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=network%2Fports%2Fnet_ip_list_map.yaml;h=07e2de4c7cc99e98ee3ea0c78a549b1831132683;hb=81d3b5855775d7aafe3f165a74bfb9330c45fb7c;hp=54614ead66f3b39c554f0c3081e96add9914f9b3;hpb=d1c93052959457f1f93d2a5e6aca7db666dc64b8;p=apex-tripleo-heat-templates.git diff --git a/network/ports/net_ip_list_map.yaml b/network/ports/net_ip_list_map.yaml index 54614ead..07e2de4c 100644 --- a/network/ports/net_ip_list_map.yaml +++ b/network/ports/net_ip_list_map.yaml @@ -1,6 +1,9 @@ -heat_template_version: 2015-04-30 +heat_template_version: 2016-10-14 parameters: + ControlPlaneIpList: + default: [] + type: comma_delimited_list ExternalIpList: default: [] type: comma_delimited_list @@ -16,6 +19,18 @@ parameters: TenantIpList: default: [] type: comma_delimited_list + ManagementIpList: + default: [] + type: comma_delimited_list + EnabledServices: + default: [] + type: comma_delimited_list + ServiceNetMap: + default: {} + type: json + ServiceHostnameList: + default: [] + type: comma_delimited_list outputs: net_ip_map: @@ -23,8 +38,55 @@ outputs: A Hash containing a mapping of network names to assigned lists of IP addresses. value: + ctlplane: {get_param: ControlPlaneIpList} external: {get_param: ExternalIpList} internal_api: {get_param: InternalApiIpList} storage: {get_param: StorageIpList} storage_mgmt: {get_param: StorageMgmtIpList} tenant: {get_param: TenantIpList} + management: {get_param: ManagementIpList} + service_ips: + description: > + Map of enabled services to a list of their IP addresses + value: + yaql: + # This filters any entries where the value hasn't been substituted for + # a list, e.g it's still $service_network. This happens when there is + # no network defined for the service in the ServiceNetMap, which is OK + # as not all services have to be bound to a network, so we filter them + expression: dict($.data.map.items().where(not isString($[1]))) + data: + map: + map_replace: + - map_replace: + - map_merge: + repeat: + template: + SERVICE_node_ips: SERVICE_network + for_each: + SERVICE: {get_param: EnabledServices} + - values: {get_param: ServiceNetMap} + - values: + ctlplane: {get_param: ControlPlaneIpList} + external: {get_param: ExternalIpList} + internal_api: {get_param: InternalApiIpList} + storage: {get_param: StorageIpList} + storage_mgmt: {get_param: StorageMgmtIpList} + tenant: {get_param: TenantIpList} + management: {get_param: ManagementIpList} + service_hostnames: + description: > + Map of enabled services to a list of hostnames where they're running + value: + yaql: + # If ServiceHostnameList is empty the role is deployed with zero nodes + # therefore we don't want to add any *_node_names to the map + expression: dict($.data.map.items().where(len($[1]) > 0)) + data: + map: + map_merge: + repeat: + template: + SERVICE_node_names: {get_param: ServiceHostnameList} + for_each: + SERVICE: {get_param: EnabledServices}