fix the localnet.json generation
This commit is contained in:
parent
a2dfc1672e
commit
8864a27db6
2 changed files with 8 additions and 32 deletions
|
@ -144,14 +144,9 @@ class rhizo_base {
|
|||
$bsc_geo_lat = hiera('rhizo::bsc_geo_lat')
|
||||
$bsc_geo_lon = hiera('rhizo::bsc_geo_lon')
|
||||
|
||||
$bts1_geo_lat = hiera('rhizo::bts1_geo_lat')
|
||||
$bts1_geo_lon = hiera('rhizo::bts1_geo_lon')
|
||||
|
||||
$bts2_geo_lat = hiera('rhizo::bts2_geo_lat', false)
|
||||
$bts2_geo_lon = hiera('rhizo::bts2_geo_lon', false)
|
||||
|
||||
$bts3_geo_lat = hiera('rhizo::bts3_geo_lat', false)
|
||||
$bts3_geo_lon = hiera('rhizo::bts3_geo_lon', false)
|
||||
$bts_geo = [ 'shift', hiera('rhizo::bts1_geo_lat'), hiera('rhizo::bts1_geo_lon'),
|
||||
hiera('rhizo::bts2_geo_lat', false), hiera('rhizo::bts2_geo_lon', false),
|
||||
hiera('rhizo::bts3_geo_lat', false), hiera('rhizo::bts3_geo_lon', false) ]
|
||||
|
||||
$link1_ip_address = hiera('rhizo::link1_ip_address', false)
|
||||
$link2_ip_address = hiera('rhizo::link2_ip_address', false)
|
||||
|
|
|
@ -1,34 +1,15 @@
|
|||
[
|
||||
<% if @bts1_ip_address -%>
|
||||
<% @bts.each_with_index do |bts, index| %>
|
||||
{
|
||||
"type": "bts",
|
||||
"ip": "<%= @bts1_ip_address %>",
|
||||
"ip": "<%= bts["ip"] %>",
|
||||
"geo": [
|
||||
<%= @bts1_geo_lat %>,
|
||||
<%= @bts1_geo_lon %>
|
||||
<%= @bts_geo[2*index+1] %>,
|
||||
<%= @bts_geo[2*index+2] %>
|
||||
]
|
||||
},
|
||||
<% end -%>
|
||||
<% if @bts2_ip_address -%>
|
||||
{
|
||||
"type": "bts",
|
||||
"ip": "<%= @bts2_ip_address %>",
|
||||
"geo": [
|
||||
<%= @bts2_geo_lat %>,
|
||||
<%= @bts2_geo_lon %>
|
||||
]
|
||||
},
|
||||
<% end -%>
|
||||
<% if @bts3_ip_address -%>
|
||||
{
|
||||
"type": "bts",
|
||||
"ip": "<%= @bts3_ip_address %>",
|
||||
"geo": [
|
||||
<%= @bts3_geo_lat %>,
|
||||
<%= @bts3_geo_lon %>
|
||||
]
|
||||
},
|
||||
<% end -%>
|
||||
|
||||
<% if @link1_ip_address -%>
|
||||
{
|
||||
"type": "link",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue