aboutsummaryrefslogtreecommitdiffstats
path: root/network/ports
diff options
context:
space:
mode:
authorMichele Baldessari <michele@acksyn.org>2016-12-19 14:27:51 +0100
committerMichele Baldessari <michele@acksyn.org>2016-12-21 11:52:57 +0100
commit8d796ea0e4afd69f9776d07f491b1a0d83e34128 (patch)
tree556ebd554e695d03efc02c914d4fb03001c6fa50 /network/ports
parentb9cab21630a79d57594a7b5cedf28439df794047 (diff)
Add a per service bootstrap node variable
In order to call commands that need to be run on a single node, we create a new per-service variable that will contain the first node of each role containing the service. Change-Id: I03e8685f939e8ae1fcd8b16883b559615042505d Partial-Bug: #1615983
Diffstat (limited to 'network/ports')
-rw-r--r--network/ports/net_ip_list_map.yaml17
1 files changed, 17 insertions, 0 deletions
diff --git a/network/ports/net_ip_list_map.yaml b/network/ports/net_ip_list_map.yaml
index d7863e02..263eccd8 100644
--- a/network/ports/net_ip_list_map.yaml
+++ b/network/ports/net_ip_list_map.yaml
@@ -138,3 +138,20 @@ outputs:
SERVICE_short_node_names: {get_param: ServiceHostnameList}
for_each:
SERVICE: {get_attr: [EnabledServicesValue, value]}
+ short_service_bootstrap_hostnames:
+ description: >
+ Map of enabled services to a list of hostnames where they're running regardless of the network
+ Used for bootstrap purposes
+ 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_short_bootstrap_node_name: {get_param: ServiceHostnameList}
+ for_each:
+ SERVICE: {get_attr: [EnabledServicesValue, value]}