Add a json BTS/TRX definition file to rccn
This commit is contained in:
parent
6606f68db3
commit
700b1a4fec
2 changed files with 19 additions and 0 deletions
|
@ -414,6 +414,12 @@ schedule { 'repo':
|
||||||
require => File['/root/.ssh/bsc_dev'],
|
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':
|
file { '/var/rhizomatica/bin/check_account_balance.sh':
|
||||||
ensure => present,
|
ensure => present,
|
||||||
content => template('rhizo_base/check_account_balance.sh.erb'),
|
content => template('rhizo_base/check_account_balance.sh.erb'),
|
||||||
|
|
13
modules/rhizo_base/templates/bts_defs.json.erb
Normal file
13
modules/rhizo_base/templates/bts_defs.json.erb
Normal 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 -%>
|
||||||
|
]
|
Loading…
Add table
Add a link
Reference in a new issue