Add a json BTS/TRX definition file to rccn

This commit is contained in:
Keith Whyte 2020-09-09 13:46:03 +02:00
parent 6606f68db3
commit 700b1a4fec
2 changed files with 19 additions and 0 deletions

View file

@ -414,6 +414,12 @@ schedule { 'repo':
require => File['/root/.ssh/bsc_dev'],
}
file { '/var/rhizomatica/bts_defs.json':
ensure => present,
content => template('rhizo_base/bts_defs.json.erb'),
require => File['/var/rhizomatica'],
}
file { '/var/rhizomatica/bin/check_account_balance.sh':
ensure => present,
content => template('rhizo_base/check_account_balance.sh.erb'),

View file

@ -0,0 +1,13 @@
[
<% @bts.each_with_index do |bts, index| -%>
<% bts["trx"].each_with_index do |trx, trx_i| -%>
{
"index": <%= index %>,
"trx": <%= trx_i %>,
"name": "<%= bts["name"] %>",
"chan": <%= trx["chan"]%>,
"bsic": <%= bts["bsic"]%>
}<%= ',' if trx_i < (bts["trx"].size - 1) %>
<% end -%><%= ',' if index < (@bts.size - 1) %>
<% end -%>
]