Commit e5bbfc30 authored by Joanne Hugé's avatar Joanne Hugé

software/ors-amarisoft: split lte into different TDD softwares

parent 0bbde2a8
......@@ -13,6 +13,7 @@
# Substitution (${...:...}), extension ([buildout] extends = ...) and
# section inheritance (< = ...) are NOT supported (but you should really
# not need these here).
[template]
filename = instance.cfg
md5sum = 0ee897b4738b6e568456d7aa8c01bfd4
......@@ -23,7 +24,7 @@ md5sum = 6675abd2d45a65efbe5b3a8e2acfd001
[template-lte-enb]
_update_hash_filename_ = instance-enb.jinja2.cfg
md5sum = 516f66bd063a5054f95bac3e7884474a
md5sum = cda352579b01f0d93f2be8a71e56b5c5
[template-lte-mme]
_update_hash_filename_ = instance-mme.jinja2.cfg
......@@ -33,13 +34,13 @@ md5sum = 034ffe7d8684d424999942f892a2ffd2
_update_hash_filename_ = instance-ims.jinja2.cfg
md5sum = 9e9dbd764350c23e80c160a602fcf8b1
[ue_db.py.in]
filename = ue_db.py.in
md5sum = 67160bb2cab08955e567190e5f173cdf
[ue_db.jinja2.cfg]
filename = config/ue_db.jinja2.cfg
md5sum = 4e4b40589ca0817d44f638c0612f0a04
[enb.jinja2.cfg]
filename = config/enb.jinja2.cfg
md5sum = cc43be65aa70ca73118d85e51966bea3
md5sum = abc4ffd72b5d700fee9dca171adc98ca
[ltelogs.jinja2.sh]
filename = ltelogs.jinja2.sh
......
......@@ -74,7 +74,7 @@
"00101",
],
dl_earfcn: {{ slapparameter_dict.get('dl_earfcn', 38050) }},
dl_earfcn: {{ slapparameter_dict.get('dl_earfcn', instance['configuration.default_dl_earfcn']) }},
n_id_cell: 1,
cell_id: 0x01,
......
......@@ -4,18 +4,6 @@
"title": "Input Parameters",
"properties": {
"gtp_addr": {
"title": "GTP bind address",
"description": "IP address of the network interface connected to the core network",
"type": "string",
"default": "127.0.1.1"
},
"mme_addr": {
"title": "MME address",
"description": "address of MME for S1AP connection",
"type": "string",
"default": "127.0.1.100"
},
"tx_gain": {
"title": "Tx gain",
"description": "Tx gain (in dB)",
......
{
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema",
"title": "Input Parameters",
"properties": {
"tx_gain": {
"title": "Tx gain",
"description": "Tx gain (in dB)",
"type": "number",
"default": 70.0
},
"rx_gain": {
"title": "Rx gain",
"description": "Rx gain (in dB)",
"type": "number",
"default": 30.0
},
"dl_earfcn": {
"title": "DL EARFCN",
"description": "Downlink EARFCN of the cell",
"type": "number",
"default": 38350
},
"n_rb_dl": {
"title": "DL RB",
"description": "number of DL resource blocks",
"type": "number",
"default": 100
}
}
}
{
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema",
"title": "Input Parameters",
"properties": {
"tx_gain": {
"title": "Tx gain",
"description": "Tx gain (in dB)",
"type": "number",
"default": 70.0
},
"rx_gain": {
"title": "Rx gain",
"description": "Rx gain (in dB)",
"type": "number",
"default": 30.0
},
"dl_earfcn": {
"title": "DL EARFCN",
"description": "Downlink EARFCN of the cell",
"type": "number",
"default": 38050
},
"n_rb_dl": {
"title": "DL RB",
"description": "number of DL resource blocks",
"type": "number",
"default": 100
}
}
}
{
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema",
"title": "Input Parameters",
"properties": {
"tx_gain": {
"title": "Tx gain",
"description": "Tx gain (in dB)",
"type": "number",
"default": 70.0
},
"rx_gain": {
"title": "Rx gain",
"description": "Rx gain (in dB)",
"type": "number",
"default": 30.0
},
"dl_earfcn": {
"title": "DL EARFCN",
"description": "Downlink EARFCN of the cell",
"type": "number",
"default": 42590
},
"n_rb_dl": {
"title": "DL RB",
"description": "number of DL resource blocks",
"type": "number",
"default": 100
}
}
}
{
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema",
"title": "Input Parameters",
"properties": {
"tx_gain": {
"title": "Tx gain",
"description": "Tx gain (in dB)",
"type": "number",
"default": 70.0
},
"rx_gain": {
"title": "Rx gain",
"description": "Rx gain (in dB)",
"type": "number",
"default": 30.0
},
"dl_earfcn": {
"title": "DL EARFCN",
"description": "Downlink EARFCN of the cell",
"type": "number",
"default": 44590
},
"n_rb_dl": {
"title": "DL RB",
"description": "number of DL resource blocks",
"type": "number",
"default": 100
}
}
}
......@@ -28,10 +28,6 @@ cert = {{ slap_connection['cert-file'] }}
configuration.network_name = VIFIB
configuration.domain = vifib.com
# Identifier of frequency and band is given by one number (e.g. 3200 for 2600Mhz band 7)
#configuration.frequency = 2600
#configuration.band = 7
configuration.mme_ws_port = 9000
configuration.enb_ws_port = 9002
configuration.ims_ws_port = 9003
......@@ -41,6 +37,8 @@ configuration.ims_bind = 127.0.0.2
configuration.enb_addr = 127.0.1.1
configuration.default_dl_earfcn = {{ default_dl_earfcn }}
[directory]
recipe = slapos.cookbook:mkdirectory
software = {{ buildout_directory }}
......
......@@ -54,6 +54,9 @@ extra-context =
raw enb_template ${enb.jinja2.cfg:target}
raw ltelogs_template ${ltelogs.jinja2.sh:target}
raw openssl_location ${openssl:location}
raw min_frequency ${enb:min-frequency}
raw max_frequency ${enb:max-frequency}
raw default_dl_earfcn ${enb:default-dl-earfcn}
[dynamic-template-lte-mme]
< = jinja2-template-base
......
[buildout]
extends =
software.cfg
[enb]
# 1890 MHz (band 39)
default-dl-earfcn = 38350
min-frequency = 1880
max-frequency = 1920
{
"name": "LTE",
"description": "LTE",
"serialisation": "xml",
"software-type": {
"enb": {
"title": "eNB",
"software-type": "enb",
"description": "eNodeB Configuration",
"request": "instance-enb-tdd1900-input-schema.json",
"response": "instance-enb-schema.json",
"index": 0
},
"epc": {
"title": "EPC",
"software-type": "epc",
"description": "EPC Configuration",
"request": "instance-epc-input-schema.json",
"response": "instance-epc-schema.json",
"index": 1
},
"default": {
"title": "Default",
"software-type": "default",
"description": "Default",
"request": "instance-lte-input-schema.json",
"response": "instance-lte-schema.json",
"index": 2
},
"epc-slave": {
"title": "Sim Card",
"description": "EPC Configuration",
"software-type": "epc",
"request": "instance-epc-slave-input-schema.json",
"response": "instance-epc-slave-schema.json",
"shared": true,
"index": 3
}
}
}
[buildout]
extends =
software.cfg
[enb]
default-dl-earfcn = 38050 # 2600 MHz (band 38)
min-frequency = 2570
max-frequency = 2620
......@@ -7,7 +7,7 @@
"title": "eNB",
"software-type": "enb",
"description": "eNodeB Configuration",
"request": "instance-enb-input-schema.json",
"request": "instance-enb-tdd2600-input-schema.json",
"response": "instance-enb-schema.json",
"index": 0
},
......@@ -19,20 +19,21 @@
"response": "instance-epc-schema.json",
"index": 1
},
"ims": {
"title": "IMS",
"software-type": "ims",
"description": "IMS Configuration",
"request": "instance-ims-input-schema.json",
"response": "instance-ims-schema.json",
"index": 2
},
"default": {
"title": "Default",
"software-type": "default",
"description": "Default",
"request": "instance-lte-input-schema.json",
"response": "instance-lte-schema.json",
"index": 2
},
"epc-slave": {
"title": "Sim Card",
"description": "EPC Configuration",
"software-type": "epc",
"request": "instance-epc-slave-input-schema.json",
"response": "instance-epc-slave-schema.json",
"shared": true,
"index": 3
}
}
......
[buildout]
extends =
software.cfg
[enb]
# 3500 Mhz (band 42)
default-dl-earfcn = 42590
min-frequency = 3400
max-frequency = 3600
{
"name": "LTE",
"description": "LTE",
"serialisation": "xml",
"software-type": {
"enb": {
"title": "eNB",
"software-type": "enb",
"description": "eNodeB Configuration",
"request": "instance-enb-tdd3500-input-schema.json",
"response": "instance-enb-schema.json",
"index": 0
},
"epc": {
"title": "EPC",
"software-type": "epc",
"description": "EPC Configuration",
"request": "instance-epc-input-schema.json",
"response": "instance-epc-schema.json",
"index": 1
},
"default": {
"title": "Default",
"software-type": "default",
"description": "Default",
"request": "instance-lte-input-schema.json",
"response": "instance-lte-schema.json",
"index": 2
},
"epc-slave": {
"title": "Sim Card",
"description": "EPC Configuration",
"software-type": "epc",
"request": "instance-epc-slave-input-schema.json",
"response": "instance-epc-slave-schema.json",
"shared": true,
"index": 3
}
}
}
[buildout]
extends =
software.cfg
[enb]
# 3700 MHz (band 43)
default-dl-earfcn = 44590
min-frequency = 3600
max-frequency = 3800
{
"name": "LTE",
"description": "LTE",
"serialisation": "xml",
"software-type": {
"enb": {
"title": "eNB",
"software-type": "enb",
"description": "eNodeB Configuration",
"request": "instance-enb-tdd3700-input-schema.json",
"response": "instance-enb-schema.json",
"index": 0
},
"epc": {
"title": "EPC",
"software-type": "epc",
"description": "EPC Configuration",
"request": "instance-epc-input-schema.json",
"response": "instance-epc-schema.json",
"index": 1
},
"default": {
"title": "Default",
"software-type": "default",
"description": "Default",
"request": "instance-lte-input-schema.json",
"response": "instance-lte-schema.json",
"index": 2
},
"epc-slave": {
"title": "Sim Card",
"description": "EPC Configuration",
"software-type": "epc",
"request": "instance-epc-slave-input-schema.json",
"response": "instance-epc-slave-schema.json",
"shared": true,
"index": 3
}
}
}
......@@ -4,17 +4,11 @@ extends =
../../stack/slapos.cfg
../../stack/monitor/buildout.cfg
../../component/logrotate/buildout.cfg
../../component/gzip/buildout.cfg
../../component/msgpack-python/buildout.cfg
../../component/cython-zstd/buildout.cfg
../../component/python-mysqlclient/buildout.cfg
../../component/python-mysqlclient/buildout.cfg
../../component/nghttp2/buildout.cfg
parts +=
template
slapos-cookbook
python-with-eggs
monitor2-template
ltelogs.jinja2.sh
# copy all configs by default
......@@ -28,7 +22,6 @@ parts +=
# unimplemented parts - the http monitor and better log handling using logrotate
# apache-php
# logrotate
gzip
[ue_db.py.in]
recipe = slapos.recipe.template:jinja2
......@@ -62,26 +55,8 @@ mode = 0644
[template-lte-ims]
<= download-base
[neoppod-repository]
recipe = slapos.recipe.build:gitclone
repository = https://lab.nexedi.com/nexedi/neoppod.git
git-executable = ${git:location}/bin/git
[neoppod-setup-env]
PATH = ${git:location}/bin:%(PATH)s
[neoppod-develop]
recipe = zc.recipe.egg:develop
setup = ${neoppod-repository:location}
environment = neoppod-setup-env
[python-with-eggs]
recipe = zc.recipe.egg
interpreter = ${:_buildout_section_name_}
eggs =
neoppod[client]
BTrees
ZODB
[ue-db]
ue-db-path = /opt/amarisoft/ue-db/ue_db.cfg
[amarisoft]
recipe = slapos.recipe.build
......@@ -106,14 +81,6 @@ strip-top-level-dir = true
ignore-existing = true
on-update = true
[enb]
<= unpack-to-instance
md5sum = ${lteenb-linux:md5sum}
[mme]
<= unpack-to-instance
md5sum = ${ltemme-linux:md5sum}
[enb.jinja2.cfg]
<= copy-config-to-instance
filename = enb.jinja2.cfg
......@@ -138,18 +105,11 @@ url = ${amarisoft:path}/trx_${:_buildout_section_name_}-linux-${amarisoft:lte-ve
destination = ${enb:destination}/x86_64
md5sum = ${trx_sdr-linux:md5sum}
[lms]
<= unpack-to-instance
url = ${amarisoft:path}/trx_${:_buildout_section_name_}-linux-${amarisoft:lte-version}.tar.gz
destination = ${enb:destination}/x86_64
md5sum = ${trx_lms-linux:md5sum}
[sdr-driver]
# move trx_sdr.so next to lteenb binary
recipe = slapos.recipe.build:download
url = ${sdr:destination}/trx_sdr.so
destination = ${enb:destination}/trx_sdr.so
#md5sum = 16cd39307bc85c17dcb7ff05157e2cff
[enb]
<= unpack-to-instance
......@@ -190,48 +150,5 @@ binary=lteenb
<= base-lteenb-cap-sys-nice
binary=lteenb-avx2
# this archive contains symbolic links
#[www]
#<= unpack-to-instance
#url = ${amarisoft:path}/ltewww-linux-${amarisoft:lte-version}.tar.gz
[versions]
apache-libcloud = 2.2.1
gitdb2 = 2.0.3
slapos.recipe.template = 4.2
smmap2 = 2.0.3
BTrees = 4.5.0:whl
ZODB = 5.4.0
cython-zstd = 0.2
msgpack-python = 0.5.6
mysqlclient = 1.3.12
neoppod = 1.9
persistent = 4.2.4.2
transaction = 2.2.1
zeodbpickle = 1.0.1
ZODB3 = 3.11.0
zodbpickle = 1.0.4
ZEO = 5.2.2
# Required by:
# ZODB==5.4.0
ZConfig = 3.2.0
# Required by:
# neoppod==1.9
python-dateutil = 2.7.3:whl
# Required by:
# ZODB==5.4.0
zc.lockfile = 1.3.0
# Required by:
# ZEO==5.2.2
# trollius==2.2.post1
futures = 3.3.0
# Required by:
# ZEO==5.2.2
trollius = 2.2.post1
#!{{directory}}/bin/{{ python }}
from ZODB import DB
from BTrees.OOBTree import OOBTree
from neo.client.Storage import Storage
from neo.lib import logging
from time import sleep
import argparse
import json
import transaction
import hashlib
def main():
parser = argparse.ArgumentParser(
description="Save a dict on NEO Storage",
)
_ = parser.add_argument
_('--ca', help="Path to the ca.crt file.")
_('--key', help="Path to the neo.crt file.")
_('--cert', help="Path to the neo.crt file.")
_('--ue_db', help="Path to the ue_db file.")
_('--master', help="Address to a NEO Master Node.",
default='[2001:67c:1254:e:ad::a164]:2051')
_('--log', help="Path to the log file.",
default="x.log")
_('--name', help="Name of the Database to store the json.",
default='simcarddb')
_('-v', '--verbose', action='store_true',
help="Show the results on stdout.")
config = parser.parse_args()
logging.backlog(max_size=None, max_packet=None) # log everything & without bufferring
kw= {
'master_nodes': config.master, # M on webr-wneo-2
'name': config.name, #'simcarddb',
#'read_only': True,
'logfile': config.log,
'ca': config.ca,
'cert': config.cert,
'key': config.key
}
stor = Storage(**kw)
db = DB(stor)
conn = db.open()
root = conn.root()
try:
tree = root["v1"]
except KeyError:
root["v1"] = OOBTree()
root["v1"].update({"index": "NOT_SET_YET"})
try:
with open(config.ue_db + '.index', "r") as f:
index = f.read()
except (ValueError, IOError):
# File don't exist yet
index = ""
if index == root["v1"]['index']:
print "Nothing to do"
return
ue_db = []
for ek in root["v1"]["json"]:
sim_entry = "\n"
entry = root["v1"]["json"][ek]
for k in ["sim_algo", "imsi", "opc",
"amf", "sqn", "K", "impu", "impi"]:
value = entry.get(k, None)
if value is not None:
if "[" in value:
sim_entry += ' %s: %s,\n' % (k, value)
else:
sim_entry += ' %s: "%s",\n' % (k, value)
if sim_entry != "\n":
ue_db.append(sim_entry)
output_db = """ue_db: [{ %s }]
""" % ('},{'.join(ue_db))
with open(config.ue_db, "w") as f:
f.write(output_db)
with open(config.ue_db + '.index', "w") as f:
f.write(root["v1"]['index'])
print "Updated to %s." % root["v1"]['index']
if __name__ == '__main__':
main()
{
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema",
"title": "Input Parameters",
"properties": {
}
}
{
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema",
"title": "Input Parameters",
"properties": {
"sim_algo": {
"title": "sim_algo",
"description": "",
"type": "string",
"default": ""
},
"imsi": {
"title": "imsi",
"description": "imsi",
"type": "string",
"default": ""
},
"op": {
"title": "op",
"description": "op",
"type": "string",
"default": ""
},
"opc": {
"title": "opc",
"description": "opc",
"type": "string",
"default": ""
},
"amf": {
"title": "amf",
"description": "amf",
"type": "string",
"default": ""
},
"sqn": {
"title": "sqn",
"description": "sqn",
"type": "string",
"default": ""
},
"K": {
"title": "K",
"description": "K",
"type": "string",
"default": ""
},
"impu": {
"title": "impu",
"description": "impu",
"type": "string",
"default": ""
},
"impi": {
"title": "impi",
"description": "impi",
"type": "string",
"default": ""
},
"authent_type": {
"title": "authent_type",
"description": "authent_type",
"type": "string",
"default": ""
},
"domain": {
"title": "domain",
"description": "domain",
"type": "string",
"default": ""
}
}
}
[buildout]
extends =
../../stack/simcarddb/buildout.cfg
[versions]
pyasn1 = 0.4.2
zope.testing = 4.6.2
# Required by:
# ZODB==4.4.5
# zodburi==2.3.0
ZConfig = 3.2.0
# Required by:
# slapos.toolbox==0.76
erp5.util = 0.4.50
# Required by:
# neoppod==1.9
python-dateutil = 2.7.2
# Required by:
# ZODB==4.4.5
zc.lockfile = 1.2.1
{
"name": "SimcardDB",
"description": "SimcardDB",
"serialisation": "xml",
"software-type": {
"default-slave": {
"title": "SimCard",
"software-type": "default",
"description": "Input your Simcard Information",
"request": "instance-simcarddb-slave-input-schema.json",
"response": "instance-simcarddb-slave-outuput-schema.json",
"shared": true,
"index": 1
},
"default": {
"title": "Server",
"software-type": "default",
"description": "Server",
"request": "instance-simcarddb-input-schema.json",
"response": "instance-simcarddb-outuput-schema.json",
"index": 2
}
}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment