Commit 3b20c9b9 authored by Lu Xu's avatar Lu Xu 👀

wip

parent 3fc96ff5
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
[template] [template]
filename = instance.cfg filename = instance.cfg
md5sum = a0c646cb609946b3535ee1383c401e01 md5sum = 972db83abdb868e242a2ece1a052f800
[amarisoft-stats.jinja2.py] [amarisoft-stats.jinja2.py]
_update_hash_filename_ = amarisoft-stats.jinja2.py _update_hash_filename_ = amarisoft-stats.jinja2.py
...@@ -28,15 +28,15 @@ md5sum = c930c28365c685a6066f382c9b5d8893 ...@@ -28,15 +28,15 @@ md5sum = c930c28365c685a6066f382c9b5d8893
[lopcomm-rrh-stats.jinja2.py] [lopcomm-rrh-stats.jinja2.py]
_update_hash_filename_ = lopcomm-rrh-stats.jinja2.py _update_hash_filename_ = lopcomm-rrh-stats.jinja2.py
md5sum = 6339dd6c5dcbef95b58ed52a9fadc9a4 md5sum = 53abbb69a2fe6437afb43f486ad9279d
[lopcomm-rrh-config.jinja2.py] [lopcomm-rrh-config.jinja2.py]
_update_hash_filename_ = lopcomm-rrh-config.jinja2.py _update_hash_filename_ = lopcomm-rrh-config.jinja2.py
md5sum = e0b68a87238282568e0e04c792ec7288 md5sum = 384cb009f827faa4a60b9ed2f4064c6f
[template-enb] [template-enb]
_update_hash_filename_ = instance-enb.jinja2.cfg _update_hash_filename_ = instance-enb.jinja2.cfg
md5sum = 8fc0bff45b68c89928f0623188470ded md5sum = 44acba721addd72c6ad210f7778e4d09
[template-gnb] [template-gnb]
_update_hash_filename_ = instance-gnb.jinja2.cfg _update_hash_filename_ = instance-gnb.jinja2.cfg
...@@ -64,7 +64,7 @@ md5sum = dcaac06553a3222b14c0013a13f4a149 ...@@ -64,7 +64,7 @@ md5sum = dcaac06553a3222b14c0013a13f4a149
[enb.jinja2.cfg] [enb.jinja2.cfg]
filename = config/enb.jinja2.cfg filename = config/enb.jinja2.cfg
md5sum = e4b31e8ced0e2ffa08a877e59b8a9793 md5sum = 981bcefa0b5fd37a70d775c9ef4a784f
[sib23.asn] [sib23.asn]
filename = config/sib23.asn filename = config/sib23.asn
...@@ -84,7 +84,7 @@ md5sum = 48b577daa5b53c2cf7fe2d30ea9c0235 ...@@ -84,7 +84,7 @@ md5sum = 48b577daa5b53c2cf7fe2d30ea9c0235
[dnsmasq.jinja2.cfg] [dnsmasq.jinja2.cfg]
filename = config/dnsmasq.jinja2.cfg filename = config/dnsmasq.jinja2.cfg
md5sum = 1eb5703c1c60bddea65f3a49f2391173 md5sum = 5f67c7f750e7c7bd9b9839c527a06853
[ims.jinja2.cfg] [ims.jinja2.cfg]
filename = config/ims.jinja2.cfg filename = config/ims.jinja2.cfg
...@@ -104,7 +104,7 @@ md5sum = e435990eb0a0d4be41efa9bd16dce09b ...@@ -104,7 +104,7 @@ md5sum = e435990eb0a0d4be41efa9bd16dce09b
[cu_config.jinja2.xml] [cu_config.jinja2.xml]
filename = netconf/cu_config.jinja2.xml filename = netconf/cu_config.jinja2.xml
md5sum = 50b8f86cf4ed87be179f6a62284c56d7 md5sum = 89500648f3996c78bb1009ab31997b4b
[software.cfg.html] [software.cfg.html]
_update_hash_filename_ = gadget/software.cfg.html _update_hash_filename_ = gadget/software.cfg.html
......
{% if slapparameter_dict.get('rrh', '') == "Lopcomm ORAN" %}
dhcp-leasefile={{ directory['etc'] }}/dnsmasq.leases
port=5354
dhcp-range=::1,::1,constructor:{{ slap_configuration.get('tap-name', '') }},ra-names,64,12h
dhcp-host={{ slapparameter_dict.get('rrh_mac_addr', '00:0a:00:00:10:20') }},[{{ netaddr.IPAddress(slap_configuration.get('tap-ipv6-gateway', '')) }}]
dhcp-option=option6:dns-server,[{{ netaddr.IPAddress(slap_configuration.get('tap-ipv6-gateway', '')) + 1 }}],[{{ netaddr.IPAddress(slap_configuration.get('tap-ipv6-gateway', '')) + 2 }}]
dhcp-option=option6:domain-search,bbu.local
enable-ra
ra-param=adv-send-advert
ra-param=adv-managed-flag
ra-param=adv-other-config-flag
ra-param=adv-autonomous
{% else %}
interface={{ slap_configuration.get('tun-name', '') }} interface={{ slap_configuration.get('tun-name', '') }}
port=5353 port=5353
{%- set filtered_slave_instance_list = [] %} {%- set filtered_slave_instance_list = [] %}
{%- for slave_instance in slap_configuration.get('slave-instance-list', []) %} {%- for slave_instance in slap_configuration.get('slave-instance-list', []) %}
{%- if slave_instance.get('_', '') != '' %} {%- if slave_instance.get('_', '') != '' %}
...@@ -16,3 +28,4 @@ port=5353 ...@@ -16,3 +28,4 @@ port=5353
{% for i, slave in enumerate(filtered_slave_instance_list) -%} {% for i, slave in enumerate(filtered_slave_instance_list) -%}
address=/{{ slave['subdomain'] }}.{{ slap_configuration['configuration'].get('local_domain', '') }}/{{ slave.get('ip', '') }} address=/{{ slave['subdomain'] }}.{{ slap_configuration['configuration'].get('local_domain', '') }}/{{ slave.get('ip', '') }}
{% endfor -%} {% endfor -%}
{% endif %}
{% if rf_mode == 'tdd' %}
#define TDD 1
{% else %}
#define TDD 0
{% endif %}
#define N_RB_DL {{ slapparameter_dict.get('n_rb_dl', slap_configuration['configuration.default_lte_n_rb_dl']) }} #define N_RB_DL {{ slapparameter_dict.get('n_rb_dl', slap_configuration['configuration.default_lte_n_rb_dl']) }}
#define N_ANTENNA_DL {{ slapparameter_dict.get('n_antenna_dl', slap_configuration['configuration.default_n_antenna_dl']) }} #define N_ANTENNA_DL {{ slapparameter_dict.get('n_antenna_dl', slap_configuration['configuration.default_n_antenna_dl']) }}
#define N_ANTENNA_UL {{ slapparameter_dict.get('n_antenna_ul', slap_configuration['configuration.default_n_antenna_ul']) }} #define N_ANTENNA_UL {{ slapparameter_dict.get('n_antenna_ul', slap_configuration['configuration.default_n_antenna_ul']) }}
...@@ -99,13 +104,10 @@ ...@@ -99,13 +104,10 @@
cell_default: { cell_default: {
n_antenna_dl: N_ANTENNA_DL, n_antenna_dl: N_ANTENNA_DL,
n_antenna_ul: N_ANTENNA_UL, n_antenna_ul: N_ANTENNA_UL,
{% if slapparameter_dict.get('rrh', '') == "Lopcomm ORAN" %} #if TDD == 1
// uldl_config: 2, uldl_config: 2, /* TDD only */
// sp_config: 7, sp_config: 7, /* TDD only */
{% else %} #endif
uldl_config: 2,
sp_config: 7,
{% endif %}
n_rb_dl: N_RB_DL, n_rb_dl: N_RB_DL,
cyclic_prefix: "normal", cyclic_prefix: "normal",
...@@ -160,11 +162,9 @@ ...@@ -160,11 +162,9 @@
pucch_dedicated: { pucch_dedicated: {
n1_pucch_sr_count: 11, n1_pucch_sr_count: 11,
cqi_pucch_n_rb: 1, cqi_pucch_n_rb: 1,
{% if slapparameter_dict.get('rrh', '') == "Lopcomm ORAN" %} #if TDD == 1
// tdd_ack_nack_feedback_mode: "multiplexing", tdd_ack_nack_feedback_mode: "multiplexing", /* TDD only */
{% else %} #endif
tdd_ack_nack_feedback_mode: "multiplexing",
{% endif %}
}, },
pusch_dedicated: { pusch_dedicated: {
...@@ -251,7 +251,11 @@ ...@@ -251,7 +251,11 @@
} }
], ],
#if defined(TDD) && TDD == 1
#define T_REORDERING 65 #define T_REORDERING 65
#else
#define T_REORDERING 35
#endif
drb_config: [ drb_config: [
{ {
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
"$schema": "http://json-schema.org/draft-04/schema", "$schema": "http://json-schema.org/draft-04/schema",
"title": "Input Parameters", "title": "Input Parameters",
"properties": { "properties": {
{%- if rf_mode == 'tdd' %} {%- if rf_mode == 'fdd' %}
"rrh": { "rrh": {
"title": "RRH", "title": "RRH",
"description": "RRH", "description": "RRH",
...@@ -14,6 +14,42 @@ ...@@ -14,6 +14,42 @@
"Lopcomm ORAN" "Lopcomm ORAN"
] ]
}, },
"cpri_mult": {
"title": "cpri_mult",
"description": "Select the CPRI line bit rate in terms of multiple of option 1 (614.4 Mbps). E.g set 4 for option 3, 8 for option 5 and 16 for option 7.",
"type": "number",
"default": 16
},
"cpri_rx_delay": {
"title": "cpri_rx_delay",
"description": "Delay between TX and RX position in CPRI frame. This should be set to the value of (T2a + T3a - Toffset) provided by the RRH specification.",
"type": "number",
"default": 0
},
"cpri_tx_delay": {
"title": "cpri_tx_delay",
"description": "Advance Start of Frame relative to PPS to compensate for delays in transmit line and RRH. This should be set to T12 + T2a.",
"type": "number",
"default": 0
},
"cpri_tx_dbm": {
"title": "cpri_tx_dbm",
"description": "Optional floating point value in dBm (default 0). Needed by ENB/GNB to have a notion of actual output power. Computed from maximum power output of the RRH for a 0dBFS input signal (full scale). ",
"type": "number",
"default": 0
},
"dnsmasq": {
"default": false,
"title": "dnsmasq",
"description": "dnsmasq",
"type": "boolean"
},
"rrh_mac_addr": {
"default": "00:0a:00:00:10:20",
"title": "RRH MAC address",
"description": "RRH MAC address used for DNSMASQ",
"type": "string"
},
"txa0cc00_active": { "txa0cc00_active": {
"title": "Lopcomm ORAN TX array carriers (TXA0CC00)", "title": "Lopcomm ORAN TX array carriers (TXA0CC00)",
"description": "Activate or inactivate Lopcomm ORAN TX array carriers (TXA0CC00)", "description": "Activate or inactivate Lopcomm ORAN TX array carriers (TXA0CC00)",
...@@ -34,6 +70,42 @@ ...@@ -34,6 +70,42 @@
"INACTIVE" "INACTIVE"
] ]
}, },
"txa0cc00_center_frequency_earfcn": {
"title": "Lopcomm ORAN Center Frequency EARFCN (TXA0CC00)",
"description": "Lopcomm ORAN Center Frequency EARFCN (TXA0CC00)",
"type": "number",
"default": 300,
},
"txa0cc00_center_frequency": {
"title": "Lopcomm ORAN Center Frequency in Hz (TXA0CC00)",
"description": "Lopcomm ORAN Center Frequency in Hz (TXA0CC00)",
"type": "number",
"default": 2140000000,
},
"txa0cc00_bandwidth": {
"title": "Lopcomm ORAN bandwidth in Hz (TXA0CC00)",
"description": "Lopcomm ORAN bandwidth in Hz (TXA0CC00)",
"type": "number",
"default": 20000000,
},
"rxa0cc00_center_frequency_earfcn": {
"title": "Lopcomm ORAN Center Frequency EARFCN (RXA0CC00)",
"description": "Lopcomm ORAN Center Frequency EARFCN (RXA0CC00)",
"type": "number",
"default": 18300,
},
"rxa0cc00_center_frequency": {
"title": "Lopcomm ORAN Center Frequency in Hz (RXA0CC00)",
"description": "Lopcomm ORAN Center Frequency in Hz (RXA0CC00)",
"type": "number",
"default": 1950000000,
},
"rxa0cc00_bandwidth": {
"title": "Lopcomm ORAN bandwidth in Hz (RXA0CC00)",
"description": "Lopcomm ORAN bandwidth in Hz (RXA0CC00)",
"type": "number",
"default": 20000000,
},
{%- endif %} {%- endif %}
"log_phy_debug": { "log_phy_debug": {
"title": "Physical layer log debug", "title": "Physical layer log debug",
......
...@@ -12,9 +12,16 @@ parts = ...@@ -12,9 +12,16 @@ parts =
lopcomm-rrh-config-template lopcomm-rrh-config-template
lopcomm-cu-config lopcomm-cu-config
check-lopcomm-vswr.py check-lopcomm-vswr.py
check-lopcomm-pa-current.py
check-lopcomm-lof.py check-lopcomm-lof.py
check-lopcomm-rssi.py check-lopcomm-rssi.py
check-lopcomm-sync.py
check-lopcomm-config-log.py
check-lopcomm-stats-log.py
check-cpri-lock.py check-cpri-lock.py
{% endif %}
{% if slapparameter_dict.get("dnsmasq", None) %}
dnsmasq-service
{% endif %} {% endif %}
check-sdr-busy.py check-sdr-busy.py
check-baseband-latency.py check-baseband-latency.py
...@@ -73,7 +80,6 @@ configuration.default_n_antenna_ul = {{ default_n_antenna_ul }} ...@@ -73,7 +80,6 @@ configuration.default_n_antenna_ul = {{ default_n_antenna_ul }}
recipe = slapos.cookbook:mkdirectory recipe = slapos.cookbook:mkdirectory
software = {{ buildout_directory }} software = {{ buildout_directory }}
home = ${buildout:directory} home = ${buildout:directory}
etc = ${:home}/etc
var = ${:home}/var var = ${:home}/var
etc = ${:home}/etc etc = ${:home}/etc
bin = ${:home}/bin bin = ${:home}/bin
...@@ -131,6 +137,25 @@ environment = ...@@ -131,6 +137,25 @@ environment =
LD_LIBRARY_PATH={{ openssl_location }}/lib LD_LIBRARY_PATH={{ openssl_location }}/lib
AMARISOFT_PATH=/opt/amarisoft/.amarisoft AMARISOFT_PATH=/opt/amarisoft/.amarisoft
{% if slapparameter_dict.get("dnsmasq", None) %}
[dnsmasq-service]
recipe = slapos.cookbook:wrapper
port = 5353
ip = ${slap-configuration:tun-ipv4-addr}
command-line = {{ dnsmasq_location }}/sbin/dnsmasq --conf-file={{ dnsmasq_config_path }} -x ${directory:run}/dnsmasq.pid --local-service --keep-in-foreground
wrapper-path = ${directory:service}/dnsmasq
mode = 0775
hash-files =
{{ dnsmasq_config_path }}
#[dnsmasq-listen-promise]
#<= monitor-promise-base
#promise = check_socket_listening
#name = dnsmasq-port-listening.py
#config-host = ${dnsmasq-service:ip}
#config-port = ${dnsmasq-service:port}
{% endif %}
[xamari-xlog-script] [xamari-xlog-script]
recipe = slapos.recipe.template recipe = slapos.recipe.template
output = ${directory:bin}/${:_buildout_section_name_} output = ${directory:bin}/${:_buildout_section_name_}
...@@ -252,6 +277,7 @@ hash-files = ...@@ -252,6 +277,7 @@ hash-files =
[config-base] [config-base]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
extensions = jinja2.ext.do extensions = jinja2.ext.do
extra-context =
context = context =
section directory directory section directory directory
section slap_configuration slap-configuration section slap_configuration slap-configuration
...@@ -260,6 +286,7 @@ context = ...@@ -260,6 +286,7 @@ context =
raw gtp_addr_v4 {{ lan_ipv4 }} raw gtp_addr_v4 {{ lan_ipv4 }}
raw sib23 {{ sib23 }} raw sib23 {{ sib23 }}
import netaddr netaddr import netaddr netaddr
${:extra-context}
[enb-config] [enb-config]
<= config-base <= config-base
...@@ -269,6 +296,8 @@ url = ${enb-config-dl:target} ...@@ -269,6 +296,8 @@ url = ${enb-config-dl:target}
url = {{ enb_template }} url = {{ enb_template }}
{% endif %} {% endif %}
output = ${directory:etc}/enb.cfg output = ${directory:etc}/enb.cfg
extra-context =
raw rf_mode rf_mode
[publish-connection-information] [publish-connection-information]
<= monitor-publish <= monitor-publish
...@@ -325,6 +354,20 @@ config-testing = {{ slapparameter_dict.get("testing", False) }} ...@@ -325,6 +354,20 @@ config-testing = {{ slapparameter_dict.get("testing", False) }}
config-netconf-log = ${lopcomm-rrh-stats-template:json-log-output} config-netconf-log = ${lopcomm-rrh-stats-template:json-log-output}
config-stats-period = {{ slapparameter_dict.get("enb_stats_fetch_period", 60) }} config-stats-period = {{ slapparameter_dict.get("enb_stats_fetch_period", 60) }}
[check-lopcomm-pa-current.py]
<= macro.promise
promise = check_lopcomm_pa_current
config-testing = {{ slapparameter_dict.get("testing", False) }}
config-netconf-log = ${lopcomm-rrh-stats-template:json-log-output}
config-stats-period = {{ slapparameter_dict.get("enb_stats_fetch_period", 60) }}
[check-lopcomm-sync.py]
<= macro.promise
promise = check_lopcomm_sync
config-testing = {{ slapparameter_dict.get("testing", False) }}
config-netconf-log = ${lopcomm-rrh-stats-template:json-log-output}
config-stats-period = {{ slapparameter_dict.get("enb_stats_fetch_period", 60) }}
[check-lopcomm-lof.py] [check-lopcomm-lof.py]
<= macro.promise <= macro.promise
promise = check_lopcomm_lof promise = check_lopcomm_lof
...@@ -332,6 +375,20 @@ config-testing = {{ slapparameter_dict.get("testing", False) }} ...@@ -332,6 +375,20 @@ config-testing = {{ slapparameter_dict.get("testing", False) }}
config-netconf-log = ${lopcomm-rrh-stats-template:json-log-output} config-netconf-log = ${lopcomm-rrh-stats-template:json-log-output}
config-stats-period = {{ slapparameter_dict.get("enb_stats_fetch_period", 60) }} config-stats-period = {{ slapparameter_dict.get("enb_stats_fetch_period", 60) }}
[check-lopcomm-stats-log.py]
<= macro.promise
promise = check_lopcomm_stats_log
config-testing = {{ slapparameter_dict.get("testing", False) }}
config-stats-log = ${lopcomm-rrh-stats-template:log-output}
config-stats-period = {{ slapparameter_dict.get("enb_stats_fetch_period", 60) }}
[check-lopcomm-config-log.py]
<= macro.promise
promise = check_lopcomm_config_log
config-testing = {{ slapparameter_dict.get("testing", False) }}
config-config-log = ${lopcomm-rrh-config-template:log-output}
config-stats-period = {{ slapparameter_dict.get("enb_stats_fetch_period", 60) }}
[check-cpri-lock.py] [check-cpri-lock.py]
<= macro.promise <= macro.promise
promise = check_cpri_lock promise = check_cpri_lock
......
{
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema",
"title": "Input Parameters",
"properties": {
"rrh": {
"title": "RRH",
"description": "RRH",
"type": "string",
"default": "SDR",
"enum": [
"SDR",
"Lopcomm ORAN"
]
},
"cpri_mult": {
"title": "cpri_mult",
"description": "Select the CPRI line bit rate in terms of multiple of option 1 (614.4 Mbps). E.g set 4 for option 3, 8 for option 5 and 16 for option 7.",
"type": "number",
"default": 16
},
"cpri_rx_delay": {
"title": "cpri_rx_delay",
"description": "Delay between TX and RX position in CPRI frame. This should be set to the value of (T2a + T3a - Toffset) provided by the RRH specification.",
"type": "number",
"default": 0
},
"cpri_tx_delay": {
"title": "cpri_tx_delay",
"description": "Advance Start of Frame relative to PPS to compensate for delays in transmit line and RRH. This should be set to T12 + T2a.",
"type": "number",
"default": 0
},
"cpri_tx_dbm": {
"title": "cpri_tx_dbm",
"description": "Optional floating point value in dBm (default 0). Needed by ENB/GNB to have a notion of actual output power. Computed from maximum power output of the RRH for a 0dBFS input signal (full scale). ",
"type": "number",
"default": 0
},
"dnsmasq": {
"default": false,
"title": "dnsmasq",
"description": "dnsmasq",
"type": "boolean"
},
"rrh_mac_addr": {
"default": "00:0a:00:00:10:20",
"title": "RRH MAC address",
"description": "RRH MAC address used for DNSMASQ",
"type": "string"
},
"txa0cc00_active": {
"title": "Lopcomm ORAN TX array carriers (TXA0CC00)",
"description": "Activate or inactivate Lopcomm ORAN TX array carriers (TXA0CC00)",
"type": "string",
"default": "ACTIVE",
"enum": [
"ACTIVE",
"INACTIVE"
]
},
"rxa0cc00_active": {
"title": "Lopcomm ORAN RX array carriers (RXA0CC00)",
"description": "Activate or inactivate Lopcomm ORAN RX array carriers (RXA0CC00)",
"type": "string",
"default": "ACTIVE",
"enum": [
"ACTIVE",
"INACTIVE"
]
},
"txa0cc00_center_frequency_earfcn": {
"title": "Lopcomm ORAN Center Frequency EARFCN (TXA0CC00)",
"description": "Lopcomm ORAN Center Frequency EARFCN (TXA0CC00)",
"type": "number",
"default": 300,
},
"txa0cc00_center_frequency": {
"title": "Lopcomm ORAN Center Frequency in Hz (TXA0CC00)",
"description": "Lopcomm ORAN Center Frequency in Hz (TXA0CC00)",
"type": "number",
"default": 2140000000,
},
"txa0cc00_bandwidth": {
"title": "Lopcomm ORAN bandwidth in Hz (TXA0CC00)",
"description": "Lopcomm ORAN bandwidth in Hz (TXA0CC00)",
"type": "number",
"default": 20000000,
},
"rxa0cc00_center_frequency_earfcn": {
"title": "Lopcomm ORAN Center Frequency EARFCN (RXA0CC00)",
"description": "Lopcomm ORAN Center Frequency EARFCN (RXA0CC00)",
"type": "number",
"default": 18300,
},
"rxa0cc00_center_frequency": {
"title": "Lopcomm ORAN Center Frequency in Hz (RXA0CC00)",
"description": "Lopcomm ORAN Center Frequency in Hz (RXA0CC00)",
"type": "number",
"default": 1950000000,
},
"rxa0cc00_bandwidth": {
"title": "Lopcomm ORAN bandwidth in Hz (RXA0CC00)",
"description": "Lopcomm ORAN bandwidth in Hz (RXA0CC00)",
"type": "number",
"default": 20000000,
},
"log_phy_debug": {
"title": "Physical layer log debug",
"description": "Enable debug mode for physical layer logs",
"type": "boolean",
"default": false
},
"tx_gain": {
"title": "Tx gain",
"description": "Tx gain (in dB)",
"type": "number",
"default": 60
},
"rx_gain": {
"title": "Rx gain",
"description": "Rx gain (in dB)",
"type": "number",
"default": 45
},
"gps_sync": {
"default": false,
"title": "GPS synchronisation",
"description": "True if GPS should be used for synchronisation",
"type": "boolean"
},
"n_antenna_dl": {
"title": "Number of DL antennas",
"description": "Enumeration: 1, 2, 4 or 8. Number of DL antennas. It must be the same for all NB-IoT and LTE cells sharing the same RF port.",
"type": "number",
"default": 2
},
"n_antenna_ul": {
"title": "Number of UL antennas",
"description": "Enumeration: 1, 2, 4 or 8. Number of UL antennas. It must be the same for all NB-IoT and LTE cells sharing the same RF port.",
"type": "number",
"default": 2
},
"dl_earfcn": {
"title": "DL EARFCN",
"description": "Downlink E-UTRA Absolute Radio Frequency Channel Number of the cell",
"type": "number",
"default": 0
},
"n_rb_dl": {
"title": "DL RB",
"description": "number of DL resource blocks",
"type": "number",
"default": 100
},
"mme_list": {
"title": "MME list",
"description": "Optionnal. List of MME to which the gNodeB is connected",
"patternProperties": {
".*": {
"properties": {
"mme_addr": {
"title": "MME Address",
"description": "IP address (and optional port) of S1AP SCTP connection to the MME. The default port is 36412.",
"type": "string"
}
},
"type": "object"
}
},
"type": "object",
"default": {}
},
"enb_id": {
"title": "eNB ID",
"description": "eNB ID",
"type": "string",
"default": "0x1A2D0"
},
"pci": {
"title": "Physical Cell ID",
"description": "Physical Cell ID",
"type": "number",
"default": 1
},
"plmn_list": {
"title": "PLMN list",
"description": "List of PLMNs broadcasted by the eNodeB, at most 6 (default: 00101)",
"patternProperties": {
".*": {
"properties": {
"plmn": {
"default": "00101",
"title": "Public Land Mobile Network",
"description": "Public Land Mobile Network",
"type": "string"
},
"attach_without_pdn": {
"default": false,
"title": "Attach Without PDN",
"description": "Optional boolean. Indicates if PLMN supports attach without PDN connectivity.",
"type": "boolean"
},
"reserved": {
"default": false,
"title": "Reserved",
"description": "True if the cell is reserved for operator use.",
"type": "boolean"
}
},
"type": "object"
}
},
"type": "object",
"default": {}
},
"inactivity_timer": {
"title": "Inactivity Timer",
"description": "Send RRC connection release after this time (in ms) of network inactivity.",
"type": "number",
"default": 10000
},
"use_ipv4": {
"default": false,
"title": "Use IPv4",
"description": "Set to true to use IPv4 for AMF / MME addresses",
"type": "boolean"
},
"enb_stats_fetch_period": {
"title": "eNB statistics fetch period (seconds)",
"description": "Describes how often a call to Amarisoft remote API is made to get eNB statistics",
"type": "number",
"default": 60
},
"enb_drb_stats_enabled": {
"title": "Enable eNB drb statistics",
"description": "Enable eNB drb statistics through 100Hz polling, needed for E-UTRAN IP Throughput KPI",
"type": "boolean",
"default": true
},
"max_rx_sample_db": {
"title": "Maximum RX sample value (dB)",
"description": "Maximum RX sample threshold above which RX saturated promise will fail",
"type": "number",
"default": 0
},
"min_txrx_delay": {
"title": "Minimum available time for radio front end processing (ms)",
"description": "Baseband latency promise will fail if minimum TX/RX diff reaches threshold (higher than this value)",
"type": "number",
"default": 5
},
"avg_txrx_delay": {
"title": "Average available time for radio front end processing (ms)",
"description": "Baseband latency promise will fail if average TX/RX diff reaches threshold (higher than this value)",
"type": "number",
"default": 7
}
}
}
{
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema",
"title": "Input Parameters",
"properties": {
"log_phy_debug": {
"title": "Physical layer log debug",
"description": "Enable debug mode for physical layer logs",
"type": "boolean",
"default": false
},
"nr_handover_a3_offset": {
"title": "A3 offset for NR handover",
"description": "RSRP gain offset between gNBs which will trigger handover",
"type": "number",
"default": 6
},
"nr_handover_time_to_trigger": {
"title": "Time to Trigger for NR handover",
"description": "Time to triger after which NR handover will be triggerd if A3 offset is reached",
"type": "number",
"enum": [
0,
40,
64,
80,
100,
128,
160,
256,
320,
480,
512,
640,
1024,
1280,
2560,
5120
],
"default": 100
},
"tdd_ul_dl_config": {
"title": "TDD",
"description": "TDD",
"type": "string",
"enum": [
"5ms 2UL 7DL 4/6 (default)",
"2.5ms 1UL 3DL 2/10"
],
"default": "5ms 2UL 7DL 4/6 (default)"
},
"tx_gain": {
"title": "Tx gain",
"description": "Tx gain (in dB)",
"type": "number",
"default": 60
},
"rx_gain": {
"title": "Rx gain",
"description": "Rx gain (in dB)",
"type": "number",
"default": 45
},
"n_antenna_dl": {
"title": "Number of DL antennas",
"description": "Enumeration: 1, 2, 4 or 8. Number of DL antennas. It must be the same for all NB-IoT and LTE cells sharing the same RF port.",
"type": "number",
"default": 2
},
"n_antenna_ul": {
"title": "Number of UL antennas",
"description": "Enumeration: 1, 2, 4 or 8. Number of UL antennas. It must be the same for all NB-IoT and LTE cells sharing the same RF port.",
"type": "number",
"default": 2
},
"gps_sync": {
"default": false,
"title": "GPS synchronisation",
"description": "True if GPS should be used for synchronisation",
"type": "boolean"
},
"dl_nr_arfcn": {
"title": "DL NR ARFCN",
"description": "Downlink NR Absolute Radio Frequency Channel Number of the cell",
"type": "number",
"default": 0
},
"nr_band": {
"title": "NR band",
"description": "NR band number",
"type": "number",
"default": 0
},
"nr_bandwidth": {
"title": "Bandwidth",
"description": "Downlink Bandwidth (in MHz)",
"type": "number",
"default": 40
},
"amf_list": {
"title": "AMF list",
"description": "Optionnal. List of AMF to which the gNodeB is connected",
"patternProperties": {
".*": {
"properties": {
"amf_addr": {
"title": "AMF Address",
"description": "IP address (and optional port) of NGAP SCTP connection to the AMF. The default port is 38412.",
"type": "string"
}
},
"type": "object"
}
},
"type": "object",
"default": {}
},
"ncell_list": {
"title": "Neighbour Cell Info",
"description": "Neighbour Cell Info",
"patternProperties": {
".*": {
"properties": {
"dl_nr_arfcn": {
"title": "DL NR ARFCN",
"description": "Downlink NR Absolute Radio Frequency Channel Number of the neighbour cell",
"type": "number"
},
"ssb_nr_arfcn": {
"title": "SSB NR ARFCN",
"description": "SSB NR Absolute Radio Frequency Channel Number of the neighbour cell",
"type": "number"
},
"pci": {
"title": "Physical Cell ID",
"description": "Physical Cell ID of the neighbour cell",
"type": "number"
},
"nr_cell_id": {
"title": "NR Cell ID",
"description": "Concatenation of gnb_id and cell_id of the neighbour cell",
"type": "string"
},
"gnb_id_bits": {
"title": "gNB ID bits",
"description": "Number of bits for the gNodeB global identifier. (range 22 to 32)",
"type": "number"
},
"nr_band": {
"title": "NR band",
"description": "NR band number",
"type": "number"
},
"tac": {
"title": "Tracking Area Code",
"description": "Integer (range 0 to 16777215)",
"type": "number"
}
},
"type": "object"
}
},
"type": "object",
"default": {}
},
"xn_peers": {
"title": "XN Peers",
"description": "XN Peers",
"patternProperties": {
".*": {
"properties": {
"xn_addr": {
"title": "XN Address",
"description": "XN Address of the neighbour cell (gNB Address)",
"type": "string"
}
},
"type": "object"
}
},
"type": "object",
"default": {}
},
"gnb_id": {
"title": "gNB ID",
"description": "gNB ID",
"type": "string",
"default": "0x12345"
},
"gnb_id_bits": {
"title": "gNB ID bits",
"description": "Number of bits for the gNodeB global identifier. (range 22 to 32)",
"type": "number",
"default": 28
},
"cell_id": {
"title": "Cell ID",
"description": "Cell ID",
"type": "string",
"default": "0x01"
},
"pci": {
"title": "Physical Cell ID",
"description": "Physical Cell ID",
"type": "number",
"default": 500
},
"ssb_pos_bitmap": {
"title": "SSB Position Bitmap",
"description": "SSB position bitmap in bits (4, 8 or 64 bits depending on the DL frequency).",
"type": "string",
"default": 10000000
},
"plmn_list": {
"title": "PLMN list",
"description": "List of PLMNs broadcasted by the gNodeB, at most 12 (default: 00101)",
"patternProperties": {
".*": {
"properties": {
"plmn": {
"default": "00101",
"title": "Public Land Mobile Network",
"description": "Public Land Mobile Network",
"type": "string"
},
"tac": {
"default": 100,
"title": "Tracking Area Code",
"description": "Integer (range 0 to 16777215)",
"type": "number"
},
"ranac": {
"title": "Optional integer (range 0 to 255)",
"description": "RAN Area Code",
"type": "number"
},
"reserved": {
"default": false,
"title": "Reserved",
"description": "True if the cell is reserved for operator use.",
"type": "boolean"
}
},
"type": "object"
}
},
"type": "object",
"default": {}
},
"nssai": {
"title": "AMF slices configuration",
"description": "AMF slices configuration.",
"patternProperties": {
".*": {
"properties": {
"sst": {
"default": 1,
"title": "Slice Service Type",
"description": "Integer (range 1 to 255).",
"type": "number"
},
"sd": {
"default": 50,
"title": "Slice Differentiator",
"description": "Optional integer (range 0 to 0xFFFFFE)",
"type": "number"
}
},
"type": "object"
}
},
"type": "object",
"default": {}
},
"inactivity_timer": {
"title": "Inactivity Timer",
"description": "Send RRC connection release after this time (in ms) of network inactivity.",
"type": "number",
"default": 10000
},
"use_ipv4": {
"default": false,
"title": "Use IPv4",
"description": "Set to true to use IPv4 for AMF / MME addresses",
"type": "boolean"
},
"gnb_stats_fetch_period": {
"title": "gNB statistics fetch period (seconds)",
"description": "Describes how often a call to Amarisoft remote API is made to get gNB statistics",
"type": "number",
"default": 60
},
"gnb_drb_stats_enabled": {
"title": "Enable gNB drb statistics",
"description": "Enable gNB drb statistics through 100Hz polling, needed for E-UTRAN IP Throughput KPI",
"type": "boolean",
"default": true
},
"max_rx_sample_db": {
"title": "Maximum RX sample value (dB)",
"description": "Maximum RX sample threshold above which RX saturated promise will fail",
"type": "number",
"default": 0
},
"min_txrx_delay": {
"title": "Minimum available time for radio front end processing (ms)",
"description": "Minimum TX/RX diff threshold above which baseband latency promise will fail",
"type": "number",
"default": 5
},
"avg_txrx_delay": {
"title": "Average available time for radio front end processing (ms)",
"description": "Average TX/RX diff threshold above which baseband latency promise will fail",
"type": "number",
"default": 7
}
}
}
{
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema",
"title": "Input Parameters",
"properties": {
"rue_addr": {
"title": "[Required] Remote UE address",
"description": "[Required] Address of remote UE server. Default port is 2152.",
"type": "string",
"default": ""
},
"tx_gain": {
"title": "Tx gain",
"description": "Tx gain (in dB)",
"type": "number",
"default": 60
},
"rx_gain": {
"title": "Rx gain",
"description": "Rx gain (in dB)",
"type": "number",
"default": 45
},
"dl_earfcn": {
"title": "DL EARFCN",
"description": "Downlink E-UTRA Absolute Radio Frequency Channel Number of the cell",
"type": "number",
"default": 0
},
"n_rb_dl": {
"title": "DL RB",
"description": "number of DL resource blocks",
"type": "number",
"default": 100
},
"n_antenna_dl": {
"title": "Number of DL antennas",
"description": "Enumeration: 1, 2, 4 or 8. Number of DL antennas. It must be the same for all NB-IoT and LTE cells sharing the same RF port.",
"type": "number",
"default": 2
},
"n_antenna_ul": {
"title": "Number of UL antennas",
"description": "Enumeration: 1, 2, 4 or 8. Number of UL antennas. It must be the same for all NB-IoT and LTE cells sharing the same RF port.",
"type": "number",
"default": 2
},
"imsi": {
"title": "IMSI",
"description": "IMSI",
"type": "string",
"default": "001010123456789"
},
"k": {
"title": "K",
"description": "Set the user secret key (as a 16 bytes hexadecimal string, or eventually 32 bytes hexadecimal string for TUAK).",
"type": "string",
"default": "00112233445566778899aabbccddeeff"
},
"sim_algo": {
"title": "sim_algo",
"description": "Optional enumeration. xor, milenage or tuak (default = milenage). Set the USIM authentication algorithm. Note: test USIM cards use the XOR algorithm.",
"type": "string",
"default": "milenage"
},
"opc": {
"title": "opc",
"description": "Optional string. Operator key preprocessed with the user secret key (as a 16 byte hexadecimal string). When the Milenage authentication algorithm is used, either op or opc must be set.",
"type": "string",
"default": "milenage"
},
"amf": {
"title": "amf",
"description": "Range: 0 to 65535. Set the Authentication Management Field.",
"type": "string",
"default": "0x9001"
},
"sqn": {
"title": "sqn",
"description": "Optional String (6 byte hexadecimal string). Default = '000000000000'. Set the initial sequence number. For the XOR algorithm, the actual value does not matter. For the Milenage or TUAK algorithm, a sequence number resynchronization is initiated if the sequence number does not match the one stored in the USIM.",
"type": "string",
"default": "000000000000"
},
"impu": {
"title": "impu",
"description": "Array of string or object. Each string represent an IMPU and can be a sip URI or a telephone number.",
"type": "string",
"default": ""
},
"impi": {
"title": "impi",
"description": "String. Defines user IMPI. Must be fully filled with hostname if necessary.",
"type": "string",
"default": ""
}
}
}
{
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema",
"title": "Input Parameters",
"properties": {
"rue_addr": {
"title": "[Required] Remote UE address",
"description": "[Required] Address of remote UE server. Default port is 2152.",
"type": "string",
"default": ""
},
"tx_gain": {
"title": "Tx gain",
"description": "Tx gain (in dB)",
"type": "number",
"default": 60
},
"rx_gain": {
"title": "Rx gain",
"description": "Rx gain (in dB)",
"type": "number",
"default": 45
},
"dl_nr_arfcn": {
"title": "DL NR ARFCN",
"description": "Downlink NR Absolute Radio Frequency Channel Number of the cell",
"type": "number",
"default": 0
},
"nr_band": {
"title": "NR band",
"description": "NR band number",
"type": "number",
"default": 0
},
"nr_bandwidth": {
"title": "Bandwidth",
"description": "Downlink Bandwidth (in MHz)",
"type": "number",
"default": 40
},
"ssb_nr_arfcn": {
"title": "SSB NR ARFCN",
"description": "SSB NR ARFCN, you can retrieve from ENB/GNB side",
"type": "number",
"default": 0
},
"n_antenna_dl": {
"title": "Number of DL antennas",
"description": "Enumeration: 1, 2, 4 or 8. Number of DL antennas. It must be the same for all NB-IoT and LTE cells sharing the same RF port.",
"type": "number",
"default": 2
},
"n_antenna_ul": {
"title": "Number of UL antennas",
"description": "Enumeration: 1, 2, 4 or 8. Number of UL antennas. It must be the same for all NB-IoT and LTE cells sharing the same RF port.",
"type": "number",
"default": 2
},
"imsi": {
"title": "IMSI",
"description": "IMSI",
"type": "string",
"default": "001010123456789"
},
"k": {
"title": "K",
"description": "Set the user secret key (as a 16 bytes hexadecimal string, or eventually 32 bytes hexadecimal string for TUAK).",
"type": "string",
"default": "00112233445566778899aabbccddeeff"
},
"sim_algo": {
"title": "sim_algo",
"description": "Optional enumeration. xor, milenage or tuak (default = milenage). Set the USIM authentication algorithm. Note: test USIM cards use the XOR algorithm.",
"type": "string",
"default": "milenage"
},
"opc": {
"title": "opc",
"description": "Optional string. Operator key preprocessed with the user secret key (as a 16 byte hexadecimal string). When the Milenage authentication algorithm is used, either op or opc must be set.",
"type": "string",
"default": "milenage"
},
"amf": {
"title": "amf",
"description": "Range: 0 to 65535. Set the Authentication Management Field.",
"type": "string",
"default": "0x9001"
},
"sqn": {
"title": "sqn",
"description": "Optional String (6 byte hexadecimal string). Default = '000000000000'. Set the initial sequence number. For the XOR algorithm, the actual value does not matter. For the Milenage or TUAK algorithm, a sequence number resynchronization is initiated if the sequence number does not match the one stored in the USIM.",
"type": "string",
"default": "000000000000"
},
"impu": {
"title": "impu",
"description": "Array of string or object. Each string represent an IMPU and can be a sip URI or a telephone number.",
"type": "string",
"default": ""
},
"impi": {
"title": "impi",
"description": "String. Defines user IMPI. Must be fully filled with hostname if necessary.",
"type": "string",
"default": ""
}
}
}
...@@ -3,36 +3,6 @@ ...@@ -3,36 +3,6 @@
"$schema": "http://json-schema.org/draft-04/schema", "$schema": "http://json-schema.org/draft-04/schema",
"title": "Input Parameters", "title": "Input Parameters",
"properties": { "properties": {
"rrh": {
"title": "RRH",
"description": "RRH",
"type": "string",
"default": "SDR",
"enum": [
"SDR",
"Lopcomm ORAN"
]
},
"txa0cc00_active": {
"title": "Lopcomm ORAN TX array carriers (TXA0CC00)",
"description": "Activate or inactivate Lopcomm ORAN TX array carriers (TXA0CC00)",
"type": "string",
"default": "ACTIVE",
"enum": [
"ACTIVE",
"INACTIVE"
]
},
"rxa0cc00_active": {
"title": "Lopcomm ORAN RX array carriers (RXA0CC00)",
"description": "Activate or inactivate Lopcomm ORAN RX array carriers (RXA0CC00)",
"type": "string",
"default": "ACTIVE",
"enum": [
"ACTIVE",
"INACTIVE"
]
},
"log_phy_debug": { "log_phy_debug": {
"title": "Physical layer log debug", "title": "Physical layer log debug",
"description": "Enable debug mode for physical layer logs", "description": "Enable debug mode for physical layer logs",
......
...@@ -116,6 +116,10 @@ extra-context = ...@@ -116,6 +116,10 @@ extra-context =
raw default_n_antenna_ul ${default-params:default-n-antenna-ul} raw default_n_antenna_ul ${default-params:default-n-antenna-ul}
raw min_frequency ${default-params:min-frequency} raw min_frequency ${default-params:min-frequency}
raw max_frequency ${default-params:max-frequency} raw max_frequency ${default-params:max-frequency}
raw rf_mode ${rf-mode:rf-mode}
raw dnsmasq_template ${dnsmasq.jinja2.cfg:target}
raw dnsmasq_location ${dnsmasq:location}
key dnsmasq_config_path dnsmasq-config:output
[dynamic-template-gnb] [dynamic-template-gnb]
< = jinja2-template-base < = jinja2-template-base
...@@ -228,4 +232,8 @@ extensions = jinja2.ext.do ...@@ -228,4 +232,8 @@ extensions = jinja2.ext.do
output = $${directory:etc}/$${:filename} output = $${directory:etc}/$${:filename}
context = context =
import json_module json import json_module json
import netaddr netaddr
section directory directory
section slap_configuration slap-configuration section slap_configuration slap-configuration
key slapparameter_dict slap-configuration:configuration
...@@ -67,7 +67,7 @@ if __name__ == '__main__': ...@@ -67,7 +67,7 @@ if __name__ == '__main__':
nc = LopcommNetconfClient() nc = LopcommNetconfClient()
while True: while True:
try: try:
nc.connect("192.168.0.210", 830, "oranuser", "oranpassword") nc.connect("2a11:9ac1:6:800a::1", 830, "oranuser", "oranpassword")
nc.edit_config(["{{ CreateProcessingEle_template }}", "{{ cu_config_template }}"]) nc.edit_config(["{{ CreateProcessingEle_template }}", "{{ cu_config_template }}"])
break break
except Exception as e: except Exception as e:
......
...@@ -95,7 +95,7 @@ if __name__ == '__main__': ...@@ -95,7 +95,7 @@ if __name__ == '__main__':
nc = LopcommNetconfClient() nc = LopcommNetconfClient()
while True: while True:
try: try:
nc.connect("192.168.0.210", 830, "oranuser", "oranpassword") nc.connect("2a11:9ac1:6:800a::1", 830, "oranuser", "oranpassword")
nc.subscribe() nc.subscribe()
while True: while True:
nc.get_notification() nc.get_notification()
......
...@@ -13,6 +13,18 @@ ...@@ -13,6 +13,18 @@
<tx-array-carrier>TXA0CC00</tx-array-carrier> <tx-array-carrier>TXA0CC00</tx-array-carrier>
<low-level-tx-endpoint>TXA0P01C00</low-level-tx-endpoint> <low-level-tx-endpoint>TXA0P01C00</low-level-tx-endpoint>
</low-level-tx-links> </low-level-tx-links>
<low-level-tx-links>
<name>TXA0P02C00</name>
<processing-element>PE0</processing-element>
<tx-array-carrier>TXA0CC00</tx-array-carrier>
<low-level-tx-endpoint>TXA0P02C00</low-level-tx-endpoint>
</low-level-tx-links>
<low-level-tx-links>
<name>TXA0P03C00</name>
<processing-element>PE0</processing-element>
<tx-array-carrier>TXA0CC00</tx-array-carrier>
<low-level-tx-endpoint>TXA0P03C00</low-level-tx-endpoint>
</low-level-tx-links>
<low-level-rx-links> <low-level-rx-links>
<name>RXA0P00C00</name> <name>RXA0P00C00</name>
...@@ -38,6 +50,31 @@ ...@@ -38,6 +50,31 @@
<rx-array-carrier>RXA0CC00</rx-array-carrier> <rx-array-carrier>RXA0CC00</rx-array-carrier>
<low-level-rx-endpoint>PRACH0P01C00</low-level-rx-endpoint> <low-level-rx-endpoint>PRACH0P01C00</low-level-rx-endpoint>
</low-level-rx-links> </low-level-rx-links>
<low-level-rx-links>
<name>RXA0P02C00</name>
<processing-element>PE0</processing-element>
<rx-array-carrier>RXA0CC00</rx-array-carrier>
<low-level-rx-endpoint>RXA0P02C00</low-level-rx-endpoint>
</low-level-rx-links>
<low-level-rx-links>
<name>PRACH0P02C00</name>
<processing-element>PE0</processing-element>
<rx-array-carrier>RXA0CC00</rx-array-carrier>
<low-level-rx-endpoint>PRACH0P02C00</low-level-rx-endpoint>
</low-level-rx-links>
<low-level-rx-links>
<name>RXA0P03C00</name>
<processing-element>PE0</processing-element>
<rx-array-carrier>RXA0CC00</rx-array-carrier>
<low-level-rx-endpoint>RXA0P03C00</low-level-rx-endpoint>
</low-level-rx-links>
<low-level-rx-links>
<name>PRACH0P03C00</name>
<processing-element>PE0</processing-element>
<rx-array-carrier>RXA0CC00</rx-array-carrier>
<low-level-rx-endpoint>PRACH0P03C00</low-level-rx-endpoint>
</low-level-rx-links>
<!-- low-level-t[r]x-endpoints --> <!-- low-level-t[r]x-endpoints -->
<low-level-tx-endpoints> <low-level-tx-endpoints>
<name>TXA0P00C00</name> <name>TXA0P00C00</name>
...@@ -59,6 +96,26 @@ ...@@ -59,6 +96,26 @@
<eaxc-id>1</eaxc-id> <eaxc-id>1</eaxc-id>
</e-axcid> </e-axcid>
</low-level-tx-endpoints> </low-level-tx-endpoints>
<low-level-tx-endpoints>
<name>TXA0P02C00</name>
<e-axcid>
<o-du-port-bitmask>61440</o-du-port-bitmask>
<band-sector-bitmask>3968</band-sector-bitmask>
<ccid-bitmask>112</ccid-bitmask>
<ru-port-bitmask>15</ru-port-bitmask>
<eaxc-id>2</eaxc-id>
</e-axcid>
</low-level-tx-endpoints>
<low-level-tx-endpoints>
<name>TXA0P03C00</name>
<e-axcid>
<o-du-port-bitmask>61440</o-du-port-bitmask>
<band-sector-bitmask>3968</band-sector-bitmask>
<ccid-bitmask>112</ccid-bitmask>
<ru-port-bitmask>15</ru-port-bitmask>
<eaxc-id>3</eaxc-id>
</e-axcid>
</low-level-tx-endpoints>
<low-level-rx-endpoints> <low-level-rx-endpoints>
<name>RXA0P00C00</name> <name>RXA0P00C00</name>
...@@ -69,6 +126,7 @@ ...@@ -69,6 +126,7 @@
<ru-port-bitmask>15</ru-port-bitmask> <ru-port-bitmask>15</ru-port-bitmask>
<eaxc-id>0</eaxc-id> <eaxc-id>0</eaxc-id>
</e-axcid> </e-axcid>
<non-time-managed-delay-enabled>false</non-time-managed-delay-enabled>
</low-level-rx-endpoints> </low-level-rx-endpoints>
<low-level-rx-endpoints> <low-level-rx-endpoints>
<name>PRACH0P00C00</name> <name>PRACH0P00C00</name>
...@@ -79,6 +137,7 @@ ...@@ -79,6 +137,7 @@
<ru-port-bitmask>15</ru-port-bitmask> <ru-port-bitmask>15</ru-port-bitmask>
<eaxc-id>8</eaxc-id> <eaxc-id>8</eaxc-id>
</e-axcid> </e-axcid>
<non-time-managed-delay-enabled>false</non-time-managed-delay-enabled>
</low-level-rx-endpoints> </low-level-rx-endpoints>
<low-level-rx-endpoints> <low-level-rx-endpoints>
<name>RXA0P01C00</name> <name>RXA0P01C00</name>
...@@ -89,6 +148,7 @@ ...@@ -89,6 +148,7 @@
<ru-port-bitmask>15</ru-port-bitmask> <ru-port-bitmask>15</ru-port-bitmask>
<eaxc-id>1</eaxc-id> <eaxc-id>1</eaxc-id>
</e-axcid> </e-axcid>
<non-time-managed-delay-enabled>false</non-time-managed-delay-enabled>
</low-level-rx-endpoints> </low-level-rx-endpoints>
<low-level-rx-endpoints> <low-level-rx-endpoints>
<name>PRACH0P01C00</name> <name>PRACH0P01C00</name>
...@@ -99,15 +159,61 @@ ...@@ -99,15 +159,61 @@
<ru-port-bitmask>15</ru-port-bitmask> <ru-port-bitmask>15</ru-port-bitmask>
<eaxc-id>9</eaxc-id> <eaxc-id>9</eaxc-id>
</e-axcid> </e-axcid>
<non-time-managed-delay-enabled>false</non-time-managed-delay-enabled>
</low-level-rx-endpoints>
<low-level-rx-endpoints>
<name>RXA0P02C00</name>
<e-axcid>
<o-du-port-bitmask>61440</o-du-port-bitmask>
<band-sector-bitmask>3968</band-sector-bitmask>
<ccid-bitmask>112</ccid-bitmask>
<ru-port-bitmask>15</ru-port-bitmask>
<eaxc-id>2</eaxc-id>
</e-axcid>
<non-time-managed-delay-enabled>false</non-time-managed-delay-enabled>
</low-level-rx-endpoints>
<low-level-rx-endpoints>
<name>PRACH0P02C00</name>
<e-axcid>
<o-du-port-bitmask>61440</o-du-port-bitmask>
<band-sector-bitmask>3968</band-sector-bitmask>
<ccid-bitmask>112</ccid-bitmask>
<ru-port-bitmask>15</ru-port-bitmask>
<eaxc-id>10</eaxc-id>
</e-axcid>
<non-time-managed-delay-enabled>false</non-time-managed-delay-enabled>
</low-level-rx-endpoints>
<low-level-rx-endpoints>
<name>RXA0P03C00</name>
<e-axcid>
<o-du-port-bitmask>61440</o-du-port-bitmask>
<band-sector-bitmask>3968</band-sector-bitmask>
<ccid-bitmask>112</ccid-bitmask>
<ru-port-bitmask>15</ru-port-bitmask>
<eaxc-id>3</eaxc-id>
</e-axcid>
<non-time-managed-delay-enabled>false</non-time-managed-delay-enabled>
</low-level-rx-endpoints>
<low-level-rx-endpoints>
<name>PRACH0P03C00</name>
<e-axcid>
<o-du-port-bitmask>61440</o-du-port-bitmask>
<band-sector-bitmask>3968</band-sector-bitmask>
<ccid-bitmask>112</ccid-bitmask>
<ru-port-bitmask>15</ru-port-bitmask>
<eaxc-id>11</eaxc-id>
</e-axcid>
<non-time-managed-delay-enabled>false</non-time-managed-delay-enabled>
</low-level-rx-endpoints> </low-level-rx-endpoints>
<!-- t[r]x-array-carriers --> <!-- t[r]x-array-carriers -->
<tx-array-carriers> <tx-array-carriers>
<name>TXA0CC00</name> <name>TXA0CC00</name>
<absolute-frequency-center>300</absolute-frequency-center> <absolute-frequency-center>{{ slapparameter_dict.get('txa0cc00_center_frequency_earfcn', 300) }}</absolute-frequency-center>
<center-of-channel-bandwidth>2140000000</center-of-channel-bandwidth> <center-of-channel-bandwidth>{{ slapparameter_dict.get('txa0cc00_center_frequency', 2140000000) }}</center-of-channel-bandwidth>
<channel-bandwidth>20000000</channel-bandwidth> <channel-bandwidth>{{ slapparameter_dict.get('txa0cc00_bandwidth', 20000000) }}</channel-bandwidth>
<active>{{ slapparameter_dict.get('txa0cc00_active', 'ACTIVE') }}</active> <active>{{ slapparameter_dict.get('txa0cc00_active', 'INACTIVE') }}</active>
<rw-type>LTE</rw-type>
<rw-duplex-scheme>FDD</rw-duplex-scheme> <rw-duplex-scheme>FDD</rw-duplex-scheme>
<gain>50</gain> <gain>50</gain>
<downlink-radio-frame-offset>0</downlink-radio-frame-offset> <downlink-radio-frame-offset>0</downlink-radio-frame-offset>
...@@ -115,10 +221,10 @@ ...@@ -115,10 +221,10 @@
</tx-array-carriers> </tx-array-carriers>
<rx-array-carriers> <rx-array-carriers>
<name>RXA0CC00</name> <name>RXA0CC00</name>
<absolute-frequency-center>18300</absolute-frequency-center> <absolute-frequency-center>{{ slapparameter_dict.get('rxa0cc00_center_frequency_earfcn', 18300) }}</absolute-frequency-center>
<center-of-channel-bandwidth>1950000000</center-of-channel-bandwidth> <center-of-channel-bandwidth>{{ slapparameter_dict.get('rxa0cc00_center_frequency', 1950000000) }}</center-of-channel-bandwidth>
<channel-bandwidth>20000000</channel-bandwidth> <channel-bandwidth>{{ slapparameter_dict.get('rxa0cc00_bandwidth', 20000000) }}</channel-bandwidth>
<active>{{ slapparameter_dict.get('rxa0cc00_active', 'ACTIVE') }}</active> <active>{{ slapparameter_dict.get('rxa0cc00_active', 'INACTIVE') }}</active>
<downlink-radio-frame-offset>0</downlink-radio-frame-offset> <downlink-radio-frame-offset>0</downlink-radio-frame-offset>
<downlink-sfn-offset>0</downlink-sfn-offset> <downlink-sfn-offset>0</downlink-sfn-offset>
<gain-correction>0.0</gain-correction> <gain-correction>0.0</gain-correction>
......
...@@ -84,6 +84,18 @@ rf_mode_context_list = [ ...@@ -84,6 +84,18 @@ rf_mode_context_list = [
'default_ssb_nr_arfcn' : 0, 'default_ssb_nr_arfcn' : 0,
'min_frequency' : 0, 'min_frequency' : 0,
'max_frequency' : 0, 'max_frequency' : 0,
}, {
'rf_mode' : 'fdd',
'default_dl_earfcn' : 0,
'default_lte_dl_freq' : 0.0,
'default_lte_band' : 0,
'default_dl_nr_arfcn' : 0,
'default_nr_band' : 0,
'default_nr_dl_freq' : 0.0,
'default_nr_ssb_pos_bitmap' : "10000000",
'default_ssb_nr_arfcn' : 0,
'min_frequency' : 0,
'max_frequency' : 0,
} }
] ]
......
...@@ -41,9 +41,24 @@ parts += ...@@ -41,9 +41,24 @@ parts +=
dnsmasq dnsmasq
eggs eggs
xamari xamari
setcap
# unimplemented parts - the http monitor and better log handling using logrotate # unimplemented parts - the http monitor and better log handling using logrotate
# apache-php # apache-php
# logrotate # logrotate
slapos.toolbox-dev
[slapos.toolbox-repository]
recipe = slapos.recipe.build:gitclone
repository = https://lab.nexedi.com/nexedi/slapos.toolbox.git
branch = ors
git-executable = ${git:location}/bin/git
develop = true
[slapos.toolbox-dev]
recipe = zc.recipe.egg:develop
egg = slapos.toolbox
setup = ${slapos.toolbox-repository:location}
depends = ${slapos-toolbox-dependencies:eggs}
[template] [template]
recipe = slapos.recipe.template recipe = slapos.recipe.template
...@@ -203,6 +218,10 @@ recipe = zc.recipe.egg ...@@ -203,6 +218,10 @@ recipe = zc.recipe.egg
eggs = ${xlte:egg} eggs = ${xlte:egg}
scripts = xamari scripts = xamari
[setcap]
recipe = plone.recipe.command
command = sudo /opt/amarisoft/setcap ${dnsmasq:location}/sbin/dnsmasq
[versions] [versions]
websocket-client = 1.4.2 websocket-client = 1.4.2
ncclient = 0.6.13 ncclient = 0.6.13
......
# This file was generated using a jinja2 template and the render-templates script, don't modify directly.
[buildout]
extends =
software-base.cfg
[default-params]
default-dl-earfcn = 0
default-lte-dl-freq = 0.0
default-lte-band = 0
default-lte-n-rb-dl = 100
default-lte-tx-gain = 60
default-lte-rx-gain = 45
default-lte-inactivity-timer = 10000
default-lte-imsi = 001010123456789
default-lte-k = 00112233445566778899aabbccddeeff
default-dl-nr-arfcn = 0
default-nr-band = 0
default-nr-dl-freq = 0.0
default-nr-bandwidth = 40
default-nr-tx-gain = 60
default-nr-rx-gain = 45
default-nr-ssb-pos-bitmap = 10000000
default-ssb-nr-arfcn = 0
default-nr-inactivity-timer = 10000
default-nr-imsi = 001010123456789
default-nr-k = 00112233445566778899aabbccddeeff
min-frequency = 0
max-frequency = 0
default-n-antenna-dl =2
default-n-antenna-ul =2
[rf-mode]
rf-mode = fdd
{
"name": "ORS Amarisoft",
"description": "4G and 5G amarisoft stack for ORS",
"serialisation": "json-in-xml",
"software-type": {
"enb": {
"title": "eNB",
"software-type": "enb",
"description": "eNodeB Configuration",
"request": "instance-fdd-enb-input-schema.json",
"response": "instance-fdd-enb-schema.json",
"index": 0
},
"gnb": {
"title": "gNB",
"software-type": "gnb",
"description": "gNodeB Configuration",
"request": "instance-fdd-gnb-input-schema.json",
"response": "instance-fdd-gnb-schema.json",
"index": 1
},
"core-network": {
"title": "Core Network",
"software-type": "core-network",
"description": "Core Network Configuration",
"request": "instance-core-network-input-schema.json",
"response": "instance-core-network-schema.json",
"index": 2
},
"core-network-slave": {
"title": "Core Network Sim Card",
"description": "Core Network Sim Card Configuration",
"software-type": "core-network",
"request": "instance-core-network-slave-input-schema.json",
"response": "instance-core-network-slave-schema.json",
"shared": true,
"index": 3
}
}
}
...@@ -30,3 +30,8 @@ min-frequency = 0 ...@@ -30,3 +30,8 @@ min-frequency = 0
max-frequency = 0 max-frequency = 0
default-n-antenna-dl =2 default-n-antenna-dl =2
default-n-antenna-ul =2 default-n-antenna-ul =2
[rf-mode]
rf-mode = tdd
...@@ -30,3 +30,8 @@ min-frequency = 1880.0 ...@@ -30,3 +30,8 @@ min-frequency = 1880.0
max-frequency = 1920 max-frequency = 1920
default-n-antenna-dl =2 default-n-antenna-dl =2
default-n-antenna-ul =2 default-n-antenna-ul =2
[rf-mode]
rf-mode = tdd
...@@ -30,3 +30,8 @@ min-frequency = 2570 ...@@ -30,3 +30,8 @@ min-frequency = 2570
max-frequency = 2620 max-frequency = 2620
default-n-antenna-dl =2 default-n-antenna-dl =2
default-n-antenna-ul =2 default-n-antenna-ul =2
[rf-mode]
rf-mode = tdd
...@@ -30,3 +30,8 @@ min-frequency = 3400 ...@@ -30,3 +30,8 @@ min-frequency = 3400
max-frequency = 3600 max-frequency = 3600
default-n-antenna-dl =2 default-n-antenna-dl =2
default-n-antenna-ul =2 default-n-antenna-ul =2
[rf-mode]
rf-mode = tdd
...@@ -30,3 +30,8 @@ min-frequency = 3600 ...@@ -30,3 +30,8 @@ min-frequency = 3600
max-frequency = 3800 max-frequency = 3800
default-n-antenna-dl =2 default-n-antenna-dl =2
default-n-antenna-ul =2 default-n-antenna-ul =2
[rf-mode]
rf-mode = tdd
...@@ -30,3 +30,10 @@ min-frequency = {{ min_frequency }} ...@@ -30,3 +30,10 @@ min-frequency = {{ min_frequency }}
max-frequency = {{ max_frequency }} max-frequency = {{ max_frequency }}
default-n-antenna-dl ={{ default_n_antenna_dl }} default-n-antenna-dl ={{ default_n_antenna_dl }}
default-n-antenna-ul ={{ default_n_antenna_ul }} default-n-antenna-ul ={{ default_n_antenna_ul }}
[rf-mode]
{% if 'tdd' in rf_mode %}
rf-mode = tdd
{% else %}
rf-mode = fdd
{% endif %}
##############################################################################
#
# Copyright (c) 2018 Nexedi SA and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# guarantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
import os
import yaml
import json
import glob
import requests
from slapos.testing.testcase import makeModuleSetUpAndTestCaseClass
setUpModule, ORSTestCase = makeModuleSetUpAndTestCaseClass(
os.path.abspath(
os.path.join(os.path.dirname(__file__), '..', 'software-fdd.cfg')))
param_dict = {
'testing': True,
'sim_algo': 'milenage',
'imsi': '001010000000331',
'opc': '000102030405060708090A0B0C0D0E0F',
'amf': '0x9001',
'sqn': '000000000000',
'k': '00112233445566778899AABBCCDDEEFF',
'impu': 'impu331',
'impi': 'impi331@amarisoft.com',
'tx_gain': 17,
'rx_gain': 17,
'dl_earfcn': 325320,
'n_rb_dl': 50,
'enb_id': '0x17',
'pci': 250,
'mme_list': {
'10.0.0.1': {'mme_addr': '10.0.0.1'},
'2001:db8::1': {'mme_addr': '2001:db8::1'},
},
'core_network_plmn': '00102',
'dl_nr_arfcn': 325320,
'nr_band': 99,
'nr_bandwidth': 50,
'ssb_nr_arfcn': 377790,
'rue_addr': '192.168.99.88',
'n_antenna_dl': 2,
'n_antenna_ul': 2,
'inactivity_timer': 17,
'gnb_id': '0x17',
'gnb_id_bits': 30,
'ssb_pos_bitmap': '10',
'amf_list': {
'10.0.0.1': {'amf_addr': '10.0.0.1'},
'2001:db8::1': {'amf_addr': '2001:db8::1'},
},
'nr_handover_time_to_trigger': 50,
'nr_handover_a3_offset': 10,
'ncell_list': {
'ORS1': {
'dl_nr_arfcn': 100000,
'ssb_nr_arfcn': 100000,
'pci': 1,
'nr_cell_id': '0x0000001',
'gnb_id_bits': 28,
'nr_band': 1,
'tac': 1
},
'ORS2': {
'dl_nr_arfcn': 200000,
'ssb_nr_arfcn': 200000,
'pci': 2,
'nr_cell_id': '0x0000002',
'gnb_id_bits': 30,
'nr_band': 2,
'tac': 2
},
},
'xn_peers': {
'2001:db8::1': {
'xn_addr': '2001:db8::1',
},
'2001:db8::2': {
'xn_addr': '2001:db8::2',
},
},
'tdd_ul_dl_config': '2.5ms 1UL 3DL 2/10',
}
enb_param_dict = {
'plmn_list': {
'00101': {'attach_without_pdn': True, 'plmn': '00101', 'reserved': True},
'00102': {'attach_without_pdn': False, 'plmn': '00102', 'reserved': False},
},
}
gnb_param_dict1 = {
'plmn_list': {
'00101': {'plmn': '00101', 'ranac': 1, 'reserved': True, 'tac': 1},
'00102': {'plmn': '00102', 'ranac': 2, 'reserved': False, 'tac': 2},
},
}
gnb_param_dict2 = {
'nssai': {
'1': {'sd': 1, 'sst': 10},
'2': {'sd': 2, 'sst': 20},
},
}
enb_param_dict.update(param_dict)
gnb_param_dict1.update(param_dict)
gnb_param_dict2.update(param_dict)
def test_enb_conf(self):
conf_file = glob.glob(os.path.join(
self.slap.instance_directory, '*', 'etc', 'enb.cfg'))[0]
with open(conf_file, 'r') as f:
conf = yaml.load(f)
self.assertEqual(conf['tx_gain'], enb_param_dict['tx_gain'])
self.assertEqual(conf['rx_gain'], enb_param_dict['rx_gain'])
self.assertEqual(conf['cell_default']['inactivity_timer'], enb_param_dict['inactivity_timer'])
self.assertEqual(conf['cell_list'][0]['dl_earfcn'], enb_param_dict['dl_earfcn'])
self.assertEqual(conf['enb_id'], int(enb_param_dict['enb_id'], 16))
self.assertEqual(conf['cell_list'][0]['n_id_cell'], enb_param_dict['pci'])
for p in conf['cell_list'][0]['plmn_list']:
for n in "plmn attach_without_pdn reserved".split():
self.assertEqual(p[n], enb_param_dict['plmn_list'][p['plmn']][n])
for p in conf['mme_list']:
self.assertEqual(p['mme_addr'], enb_param_dict['mme_list'][p['mme_addr']]['mme_addr'])
with open(conf_file, 'r') as f:
for l in f:
if l.startswith('#define N_RB_DL'):
self.assertIn(str(enb_param_dict['n_rb_dl']), l)
def test_gnb_conf1(self):
conf_file = glob.glob(os.path.join(
self.slap.instance_directory, '*', 'etc', 'gnb.cfg'))[0]
with open(conf_file, 'r') as f:
conf = yaml.load(f)
self.assertEqual(conf['tx_gain'], gnb_param_dict1['tx_gain'])
self.assertEqual(conf['rx_gain'], gnb_param_dict1['rx_gain'])
self.assertEqual(conf['nr_cell_default']['inactivity_timer'], gnb_param_dict1['inactivity_timer'])
self.assertEqual(conf['nr_cell_list'][0]['dl_nr_arfcn'], gnb_param_dict1['dl_nr_arfcn'])
self.assertEqual(conf['nr_cell_list'][0]['band'], gnb_param_dict1['nr_band'])
self.assertEqual(conf['nr_cell_list'][0]['ssb_pos_bitmap'], gnb_param_dict1['ssb_pos_bitmap'])
self.assertEqual(conf['nr_cell_default']['n_id_cell'], gnb_param_dict1['pci'])
self.assertEqual(conf['gnb_id'], int(gnb_param_dict1['gnb_id'], 16))
self.assertEqual(conf['gnb_id_bits'], gnb_param_dict1['gnb_id_bits'])
for p in conf['nr_cell_default']['plmn_list']:
for n in "plmn ranac reserved tac".split():
self.assertEqual(p[n], gnb_param_dict1['plmn_list'][p['plmn']][n])
for p in conf['amf_list']:
self.assertEqual(p['amf_addr'], gnb_param_dict1['amf_list'][p['amf_addr']]['amf_addr'])
for p in conf['xn_peers']:
self.assertEqual(p, gnb_param_dict1['xn_peers'][p]['xn_addr'])
for p in conf['nr_cell_list'][0]['ncell_list']:
for k in gnb_param_dict1['ncell_list']:
if p['dl_nr_arfcn'] == gnb_param_dict1['ncell_list'][k]['dl_nr_arfcn']:
break
conf_ncell = gnb_param_dict1['ncell_list'][k]
self.assertEqual(p['dl_nr_arfcn'], conf_ncell['dl_nr_arfcn'])
self.assertEqual(p['ssb_nr_arfcn'], conf_ncell['ssb_nr_arfcn'])
self.assertEqual(p['ul_nr_arfcn'], conf_ncell['dl_nr_arfcn'])
self.assertEqual(p['n_id_cell'], conf_ncell['pci'])
self.assertEqual(p['gnb_id_bits'], conf_ncell['gnb_id_bits'])
self.assertEqual(p['nr_cell_id'], int(conf_ncell['nr_cell_id'], 16))
self.assertEqual(p['tac'], conf_ncell['tac'])
self.assertEqual(p['band'], conf_ncell['nr_band'])
tdd_config = conf['nr_cell_default']['tdd_ul_dl_config']['pattern1']
self.assertEqual(float(tdd_config['period']), 2.5)
self.assertEqual(int(tdd_config['dl_slots']), 3)
self.assertEqual(int(tdd_config['dl_symbols']), 10)
self.assertEqual(int(tdd_config['ul_slots']), 1)
self.assertEqual(int(tdd_config['ul_symbols']), 2)
with open(conf_file, 'r') as f:
for l in f:
if l.startswith('#define NR_BANDWIDTH'):
self.assertIn(str(gnb_param_dict1['nr_bandwidth']), l)
def test_gnb_conf2(self):
conf_file = glob.glob(os.path.join(
self.slap.instance_directory, '*', 'etc', 'gnb.cfg'))[0]
with open(conf_file, 'r') as f:
conf = yaml.load(f)
for p in conf['nr_cell_default']['plmn_list'][0]['nssai']:
for n in "sd sst".split():
self.assertEqual(p[n], gnb_param_dict2['nssai'][str(p['sd'])][n])
def test_mme_conf(self):
conf_file = glob.glob(os.path.join(
self.slap.instance_directory, '*', 'etc', 'mme.cfg'))[0]
with open(conf_file, 'r') as f:
conf = yaml.load(f)
self.assertEqual(conf['plmn'], param_dict['core_network_plmn'])
def test_sim_card(self):
conf_file = glob.glob(os.path.join(
self.slap.instance_directory, '*', 'etc', 'ue_db.cfg'))[0]
with open(conf_file, 'r') as f:
conf = yaml.load(f)
for n in "sim_algo imsi opc sqn impu impi".split():
self.assertEqual(conf['ue_db'][0][n], param_dict[n])
self.assertEqual(conf['ue_db'][0]['K'], param_dict['k'])
self.assertEqual(conf['ue_db'][0]['amf'], int(param_dict['amf'], 16))
p = self.requestSlaveInstance().getConnectionParameterDict()
p = p['_'] if '_' in p else p
self.assertIn('info', p)
def test_monitor_gadget_url(self):
parameters = json.loads(self.computer_partition.getConnectionParameterDict()['_'])
self.assertIn('monitor-gadget-url', parameters)
monitor_setup_url = parameters['monitor-setup-url']
monitor_gadget_url = parameters['monitor-gadget-url']
monitor_base_url = parameters['monitor-base-url']
public_url = monitor_base_url + '/public'
response = requests.get(public_url, verify=False)
self.assertEqual(requests.codes['OK'], response.status_code)
self.assertIn('software.cfg.html', monitor_gadget_url)
response = requests.get(monitor_gadget_url, verify=False)
self.assertEqual(requests.codes['OK'], response.status_code)
self.assertIn('<script src="rsvp.js"></script>', response.text)
self.assertIn('<script src="renderjs.js"></script>', response.text)
self.assertIn('<script src="g-chart.line.js"></script>', response.text)
self.assertIn('<script src="promise.gadget.js"></script>', response.text)
class TestENBParameters(ORSTestCase):
@classmethod
def getInstanceParameterDict(cls):
return {'_': json.dumps(enb_param_dict)}
@classmethod
def getInstanceSoftwareType(cls):
return "enb"
def test_enb_conf(self):
test_enb_conf(self)
class TestGNBParameters1(ORSTestCase):
@classmethod
def getInstanceParameterDict(cls):
return {'_': json.dumps(gnb_param_dict1)}
@classmethod
def getInstanceSoftwareType(cls):
return "gnb"
def test_gnb_conf(self):
test_gnb_conf1(self)
class TestGNBParameters2(ORSTestCase):
@classmethod
def getInstanceParameterDict(cls):
return {'_': json.dumps(gnb_param_dict2)}
@classmethod
def getInstanceSoftwareType(cls):
return "gnb"
def test_gnb_conf(self):
test_gnb_conf2(self)
class TestCoreNetworkParameters(ORSTestCase):
@classmethod
def getInstanceParameterDict(cls):
return {'_': json.dumps(param_dict)}
@classmethod
def getInstanceSoftwareType(cls):
return "core-network"
def test_mme_conf(self):
test_mme_conf(self)
def requestSlaveInstance(cls):
software_url = cls.getSoftwareURL()
return cls.slap.request(
software_release=software_url,
partition_reference="SIM-CARD",
partition_parameter_kw={'_': json.dumps(param_dict)},
shared=True,
software_type='core-network',
)
class TestENBMonitorGadgetUrl(ORSTestCase):
@classmethod
def getInstanceParameterDict(cls):
return {'_': json.dumps(enb_param_dict)}
@classmethod
def getInstanceSoftwareType(cls):
return "enb"
def test_monitor_gadget_url(self):
test_monitor_gadget_url(self)
class TestGNBMonitorGadgetUrl(ORSTestCase):
@classmethod
def getInstanceParameterDict(cls):
return {'_': json.dumps(gnb_param_dict1)}
@classmethod
def getInstanceSoftwareType(cls):
return "gnb"
def test_monitor_gadget_url(self):
test_monitor_gadget_url(self)
class TestCoreNetworkMonitorGadgetUrl(ORSTestCase):
@classmethod
def getInstanceParameterDict(cls):
return {'_': json.dumps({'testing': True, 'slave-list': []})}
@classmethod
def getInstanceSoftwareType(cls):
return "core-network"
def test_monitor_gadget_url(self):
test_monitor_gadget_url(self)
class TestUELTEMonitorGadgetUrl(ORSTestCase):
@classmethod
def getInstanceParameterDict(cls):
return {'_': json.dumps({'testing': True})}
@classmethod
def getInstanceSoftwareType(cls):
return "ue-lte"
def test_monitor_gadget_url(self):
test_monitor_gadget_url(self)
class TestUENRMonitorGadgetUrl(ORSTestCase):
@classmethod
def getInstanceParameterDict(cls):
return {'_': json.dumps({'testing': True})}
@classmethod
def getInstanceSoftwareType(cls):
return "ue-nr"
def test_monitor_gadget_url(self):
test_monitor_gadget_url(self)
class TestSimCard(ORSTestCase):
@classmethod
def requestDefaultInstance(cls, state='started'):
default_instance = super(
ORSTestCase, cls).requestDefaultInstance(state=state)
cls.requestSlaveInstance()
return default_instance
@classmethod
def requestSlaveInstance(cls):
return requestSlaveInstance(cls)
@classmethod
def getInstanceParameterDict(cls):
return {'_': json.dumps({'testing': True})}
@classmethod
def getInstanceSoftwareType(cls):
return "core-network"
def test_sim_card(self):
test_sim_card(self)
class TestUELTEParameters(ORSTestCase):
@classmethod
def getInstanceParameterDict(cls):
return {'_': json.dumps(param_dict)}
@classmethod
def getInstanceSoftwareType(cls):
return "ue-lte"
def test_ue_lte_conf(self):
conf_file = glob.glob(os.path.join(
self.slap.instance_directory, '*', 'etc', 'ue.cfg'))[0]
with open(conf_file, 'r') as f:
conf = yaml.load(f)
self.assertEqual(conf['cell_groups'][0]['cells'][0]['dl_earfcn'], param_dict['dl_earfcn'])
self.assertEqual(conf['cell_groups'][0]['cells'][0]['bandwidth'], param_dict['n_rb_dl'])
self.assertEqual(conf['cell_groups'][0]['cells'][0]['n_antenna_dl'], param_dict['n_antenna_dl'])
self.assertEqual(conf['cell_groups'][0]['cells'][0]['n_antenna_ul'], param_dict['n_antenna_ul'])
self.assertEqual(conf['ue_list'][0]['rue_addr'], param_dict['rue_addr'])
self.assertEqual(conf['ue_list'][0]['imsi'], param_dict['imsi'])
self.assertEqual(conf['ue_list'][0]['K'], param_dict['k'])
self.assertEqual(conf['ue_list'][0]['sim_algo'], param_dict['sim_algo'])
self.assertEqual(conf['ue_list'][0]['opc'], param_dict['opc'])
self.assertEqual(conf['ue_list'][0]['amf'], int(param_dict['amf'], 16))
self.assertEqual(conf['ue_list'][0]['sqn'], param_dict['sqn'])
self.assertEqual(conf['ue_list'][0]['impu'], param_dict['impu'])
self.assertEqual(conf['ue_list'][0]['impi'], param_dict['impi'])
self.assertEqual(conf['tx_gain'], param_dict['tx_gain'])
self.assertEqual(conf['rx_gain'], param_dict['rx_gain'])
class TestUENRParameters(ORSTestCase):
@classmethod
def getInstanceParameterDict(cls):
return {'_': json.dumps(param_dict)}
@classmethod
def getInstanceSoftwareType(cls):
return "ue-nr"
def test_ue_nr_conf(self):
conf_file = glob.glob(os.path.join(
self.slap.instance_directory, '*', 'etc', 'ue.cfg'))[0]
with open(conf_file, 'r') as f:
conf = yaml.load(f)
self.assertEqual(conf['cell_groups'][0]['cells'][0]['ssb_nr_arfcn'], param_dict['ssb_nr_arfcn'])
self.assertEqual(conf['cell_groups'][0]['cells'][0]['dl_nr_arfcn'], param_dict['dl_nr_arfcn'])
self.assertEqual(conf['cell_groups'][0]['cells'][0]['bandwidth'], param_dict['nr_bandwidth'])
self.assertEqual(conf['cell_groups'][0]['cells'][0]['band'], param_dict['nr_band'])
self.assertEqual(conf['cell_groups'][0]['cells'][0]['n_antenna_dl'], param_dict['n_antenna_dl'])
self.assertEqual(conf['cell_groups'][0]['cells'][0]['n_antenna_ul'], param_dict['n_antenna_ul'])
self.assertEqual(conf['ue_list'][0]['rue_addr'], param_dict['rue_addr'])
self.assertEqual(conf['ue_list'][0]['imsi'], param_dict['imsi'])
self.assertEqual(conf['ue_list'][0]['K'], param_dict['k'])
self.assertEqual(conf['ue_list'][0]['sim_algo'], param_dict['sim_algo'])
self.assertEqual(conf['ue_list'][0]['opc'], param_dict['opc'])
self.assertEqual(conf['ue_list'][0]['amf'], int(param_dict['amf'], 16))
self.assertEqual(conf['ue_list'][0]['sqn'], param_dict['sqn'])
self.assertEqual(conf['ue_list'][0]['impu'], param_dict['impu'])
self.assertEqual(conf['ue_list'][0]['impi'], param_dict['impi'])
self.assertEqual(conf['tx_gain'], param_dict['tx_gain'])
self.assertEqual(conf['rx_gain'], param_dict['rx_gain'])
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