diff options
author | CNlukai <lukai1@huawei.com> | 2016-01-11 17:39:55 +0800 |
---|---|---|
committer | CNlukai <lukai1@huawei.com> | 2016-01-11 17:41:56 +0800 |
commit | a94e0159d98d511be4b4da9afe077e1188cc6ce6 (patch) | |
tree | 46015bb12d272deef477fb90ebbc8bef67f960f8 /framework/scripts/installer/fuel/fuel-plugin-onos/deployment_scripts/puppet/modules/onos/templates/tablets.json.erb | |
parent | 5d28b35794d9bdd8def6dfdf0224420daaa05f11 (diff) |
ONOSFW-157
Add script of installer integration onos
Change-Id: I0ac05b6a7ede8654af2c2573ea7ecb3e5e7a9473
Signed-off-by: CNlukai <lukai1@huawei.com>
Diffstat (limited to 'framework/scripts/installer/fuel/fuel-plugin-onos/deployment_scripts/puppet/modules/onos/templates/tablets.json.erb')
-rw-r--r-- | framework/scripts/installer/fuel/fuel-plugin-onos/deployment_scripts/puppet/modules/onos/templates/tablets.json.erb | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/framework/scripts/installer/fuel/fuel-plugin-onos/deployment_scripts/puppet/modules/onos/templates/tablets.json.erb b/framework/scripts/installer/fuel/fuel-plugin-onos/deployment_scripts/puppet/modules/onos/templates/tablets.json.erb new file mode 100644 index 00000000..de52967d --- /dev/null +++ b/framework/scripts/installer/fuel/fuel-plugin-onos/deployment_scripts/puppet/modules/onos/templates/tablets.json.erb @@ -0,0 +1,69 @@ +{ + "nodes": [ + <%- index = 1 -%> + <%- @manager_ip.each do |ip| -%> + <%- if index == @manager_ip.size -%> + { + "ip": "<%= ip %>", + "id": "<%= ip %>", + "tcpPort": 9876 + } + <%- else -%> + { + "ip": "<%= ip %>", + "id": "<%= ip %>", + "tcpPort": 9876 + }, + <%- end -%> + <%- index = index + 1 -%> + <%- end -%> + ], + "partitions": { + <%- key = 1 -%> + <%- @manager_ip.each do |ip| -%> + <%- if key == @manager_ip.size -%> + "p<%= key -%>":[ + <%- index = 1 -%> + <%- @manager_ip.each do |ip| -%> + <%- if index == @manager_ip.size -%> + { + "ip": "<%= ip %>", + "id": "<%= ip %>", + "tcpPort": 9876 + } + <%- else -%> + { + "ip": "<%= ip %>", + "id": "<%= ip %>", + "tcpPort": 9876 + }, + <%- end -%> + <%- index = index + 1 -%> + <%- end -%> + ] + <%- key = key + 1 -%> + <%- else -%> + "p<%= key -%>":[ + <%- index = 1 -%> + <%- @manager_ip.each do |ip| -%> + <%- if index == @manager_ip.size -%> + { + "ip": "<%= ip %>", + "id": "<%= ip %>", + "tcpPort": 9876 + } + <%- else -%> + { + "ip": "<%= ip %>", + "id": "<%= ip %>", + "tcpPort": 9876 + }, + <%- end -%> + <%- index = index + 1 -%> + <%- end -%> + ], + <%- key = key + 1 -%> + <%- end -%> + <%- end -%> +} +} |