From a94e0159d98d511be4b4da9afe077e1188cc6ce6 Mon Sep 17 00:00:00 2001 From: CNlukai Date: Mon, 11 Jan 2016 17:39:55 +0800 Subject: ONOSFW-157 Add script of installer integration onos Change-Id: I0ac05b6a7ede8654af2c2573ea7ecb3e5e7a9473 Signed-off-by: CNlukai --- .../compass/onos_cluster/templates/tablets.json | 63 ++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100755 framework/scripts/installer/compass/onos_cluster/templates/tablets.json (limited to 'framework/scripts/installer/compass/onos_cluster/templates/tablets.json') diff --git a/framework/scripts/installer/compass/onos_cluster/templates/tablets.json b/framework/scripts/installer/compass/onos_cluster/templates/tablets.json new file mode 100755 index 00000000..f71be71f --- /dev/null +++ b/framework/scripts/installer/compass/onos_cluster/templates/tablets.json @@ -0,0 +1,63 @@ +{ + "nodes": [ +{% for host in groups['onos'] %} + {% if loop.last %} + { + "ip": "{{ ip_settings[host]['mgmt']['ip'] }}", + "id": "{{ ip_settings[host]['mgmt']['ip'] }}", + "tcpPort": 9876 + } + {% else %} + { + "ip": "{{ ip_settings[host]['mgmt']['ip'] }}", + "id": "{{ ip_settings[host]['mgmt']['ip'] }}", + "tcpPort": 9876 + }, + {% endif %} +{% endfor %} + ], + "partitions": { + {% set key = 1 %} + {% for host in groups['onos'] %} + {% if loop.last %} + "p{{ key }}":[ + {% for host in groups['onos'] %} + {% if loop.last %} + { + "ip": "{{ ip_settings[host]['mgmt']['ip'] }}", + "id": "{{ ip_settings[host]['mgmt']['ip'] }}", + "tcpPort": 9876 + } + {% else %} + { + "ip": "{{ ip_settings[host]['mgmt']['ip'] }}", + "id": "{{ ip_settings[host]['mgmt']['ip'] }}", + "tcpPort": 9876 + }, + {% endif %} + {% endfor %} + ] + {% set key = key + 1 %} + {% else %} + "p{{ key }}":[ + {% for host in groups['onos'] %} + {% if loop.last %} + { + "ip": "{{ ip_settings[host]['mgmt']['ip'] }}", + "id": "{{ ip_settings[host]['mgmt']['ip'] }}", + "tcpPort": 9876 + } + {% else %} + { + "ip": "{{ ip_settings[host]['mgmt']['ip'] }}", + "id": "{{ ip_settings[host]['mgmt']['ip'] }}", + "tcpPort": 9876 + }, + {% endif %} + {% endfor %} + ], + {% set key = key + 1 %} + {% endif %} + {% endfor %} +} +} -- cgit 1.2.3-korg