Merge "Add constraint to prohibit balance-tcp from BondInterfaceOvsOptions"
[apex-tripleo-heat-templates.git] / network / ports / net_ip_list_map.yaml
index 36f3358..07e2de4 100644 (file)
@@ -28,6 +28,9 @@ parameters:
   ServiceNetMap:
     default: {}
     type: json
+  ServiceHostnameList:
+    default: []
+    type: comma_delimited_list
 
 outputs:
   net_ip_map:
@@ -71,3 +74,19 @@ outputs:
                   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}