Commit 770f8796 authored by Joanne Hugé's avatar Joanne Hugé

Update Release Candidate

parents 2bebbd55 a151c3a2
...@@ -22,16 +22,16 @@ extends = ...@@ -22,16 +22,16 @@ extends =
[apr] [apr]
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
shared = true shared = true
version = 1.7.0 version = 1.7.2
md5sum = 7a14a83d664e87599ea25ff4432e48a7 md5sum = 9a00835e4da8c215348e263b550fc130
url = https://archive.apache.org/dist/apr/apr-${:version}.tar.bz2 url = https://archive.apache.org/dist/apr/apr-${:version}.tar.bz2
[apr-util] [apr-util]
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
shared = true shared = true
version = 1.6.1 version = 1.6.3
url = https://archive.apache.org/dist/apr/apr-util-${:version}.tar.bz2 url = https://archive.apache.org/dist/apr/apr-util-${:version}.tar.bz2
md5sum = 8ff5dc36fa39a2a3db1df196d3ed6086 md5sum = b6e8c9b31d938fe5797ceb0d1ff2eb69
configure-options = configure-options =
--with-apr=${apr:location} --with-apr=${apr:location}
--with-expat=${libexpat:location} --with-expat=${libexpat:location}
......
# Dnsmasq provides network infrastructure for small networks: DNS, DHCP, router advertisement and network boot.
# https://dnsmasq.org/
[buildout]
parts =
dnsmasq
[dnsmasq]
recipe = slapos.recipe.cmmi
url = https://thekelleys.org.uk/dnsmasq/dnsmasq-2.89.tar.gz
md5sum = f94ca2dad3d002a4f3e41cb8ddd6c260
configure-command = true
make-options =
PREFIX=%(location)s
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
[template] [template]
filename = instance.cfg filename = instance.cfg
md5sum = 4af831f81760b37250fa50ad3812142a md5sum = 3f982f31a642ba9d6a1613f49e1c0d10
[amarisoft-stats.jinja2.py] [amarisoft-stats.jinja2.py]
_update_hash_filename_ = amarisoft-stats.jinja2.py _update_hash_filename_ = amarisoft-stats.jinja2.py
...@@ -28,39 +28,43 @@ md5sum = c930c28365c685a6066f382c9b5d8893 ...@@ -28,39 +28,43 @@ 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 = 39e191080722ac13ebc56b1e6350eb8f md5sum = 6339dd6c5dcbef95b58ed52a9fadc9a4
[lopcomm-rrh-config.jinja2.py]
_update_hash_filename_ = lopcomm-rrh-config.jinja2.py
md5sum = e0b68a87238282568e0e04c792ec7288
[template-lte-enb-epc] [template-lte-enb-epc]
_update_hash_filename_ = instance-enb-epc.jinja2.cfg _update_hash_filename_ = instance-enb-epc.jinja2.cfg
md5sum = bb4435f433e100fede09ff921d42c927 md5sum = 22c2d4f52463de898fcd7516269aed62
[template-lte-enb] [template-lte-enb]
_update_hash_filename_ = instance-enb.jinja2.cfg _update_hash_filename_ = instance-enb.jinja2.cfg
md5sum = 31707b64ab531c60fc99287238130c5b md5sum = dd85f04ab2836cf459078f0adaf7b847
[template-lte-gnb-epc] [template-lte-gnb-epc]
_update_hash_filename_ = instance-gnb-epc.jinja2.cfg _update_hash_filename_ = instance-gnb-epc.jinja2.cfg
md5sum = 9a0e36188b23831bec3cb53b226baa66 md5sum = 12b4a6eb722d0ddd0c6edb2a48285f73
[template-lte-epc] [template-lte-epc]
_update_hash_filename_ = instance-epc.jinja2.cfg _update_hash_filename_ = instance-epc.jinja2.cfg
md5sum = acc9176fd9abe1d04c60a08cdd520eee md5sum = 397dccca5d9fa027dfc9ba0aab3b7544
[template-lte-gnb] [template-lte-gnb]
_update_hash_filename_ = instance-gnb.jinja2.cfg _update_hash_filename_ = instance-gnb.jinja2.cfg
md5sum = 6695165ae0e5116073a802f10aba3d94 md5sum = a6a57b623cf072b713954c44b55d2dbc
[template-lte-mme] [template-lte-mme]
_update_hash_filename_ = instance-mme.jinja2.cfg _update_hash_filename_ = instance-mme.jinja2.cfg
md5sum = 400accb9d5bc104b1b122a7b9bc3a261 md5sum = e4ce3208b530e4d01fed328843ea76ca
[template-lte-ue-lte] [template-lte-ue-lte]
_update_hash_filename_ = instance-ue-lte.jinja2.cfg _update_hash_filename_ = instance-ue-lte.jinja2.cfg
md5sum = 5c1f78588a0d7447807c10765552a6e7 md5sum = e201f486d31388cc2542e91bbda85711
[template-lte-ue-nr] [template-lte-ue-nr]
_update_hash_filename_ = instance-ue-nr.jinja2.cfg _update_hash_filename_ = instance-ue-nr.jinja2.cfg
md5sum = 5b032c3c9dbbd5b8552b0ebd8dcc9acf md5sum = 765fd303d6013cf4dbee108c53623412
[ue_db.jinja2.cfg] [ue_db.jinja2.cfg]
filename = config/ue_db.jinja2.cfg filename = config/ue_db.jinja2.cfg
...@@ -97,3 +101,19 @@ md5sum = 31c166f0a1b6d664f92b8f318b233d9a ...@@ -97,3 +101,19 @@ md5sum = 31c166f0a1b6d664f92b8f318b233d9a
[ue-nr.jinja2.cfg] [ue-nr.jinja2.cfg]
filename = config/ue-nr.jinja2.cfg filename = config/ue-nr.jinja2.cfg
md5sum = b3078deab008d7e81ddd88ac02b8b698 md5sum = b3078deab008d7e81ddd88ac02b8b698
[CreateProcessingEle.jinja2.xml]
filename = netconf/CreateProcessingEle.jinja2.xml
md5sum = e435990eb0a0d4be41efa9bd16dce09b
[cu_config.jinja2.xml]
filename = netconf/cu_config.jinja2.xml
md5sum = 50b8f86cf4ed87be179f6a62284c56d7
[software.cfg.html]
_update_hash_filename_ = gadget/software.cfg.html
md5sum = 61a2f783fbf683a34aed3d13e00baca2
[promise.gadget.js]
_update_hash_filename_ = gadget/promise.gadget.js
md5sum = 330f5f07806f1da11cd05bb8e4b52e55
Changelog Changelog
========= =========
Version 1.0.308 (2023-02-09) Version 1.0.310 (2023-02-22)
------------- -------------
* Add support for IPv6 in UEs if available * Add carrier control for Lopcomm RRH
* Use latest amarisoft version on ORS if available
* Add gnb_id_bits parameter Version 1.0.312 (2023-03-20)
* Use promises from slapos.toolbox repository -------------
* Rotate and add timestamps in enb-output.log, gnb-output.log, mme-output.log etc...
* Add support for Lopcomm RRH * Add promise to test if reception is saturated
* Remove UE power emission limitation * Add IMSI in connection parameters when SIM gets attached
\ No newline at end of file
/*global window, rJS, RSVP, LineChart*/
/*jslint indent:2, maxlen:80, nomen:true */
(function () {
"use strict";
rJS(window)
.declareAcquiredMethod("getPromiseDocument", "getPromiseDocument")
.declareMethod("render", function () {
var gadget = this;
return gadget.getPromiseDocument(
"check-cpu-temperature",
"log/monitor/promise/check-cpu-temperature.json.log"
)
.push(function (result) {
//gadget.element.textContent = result;
result = result.replace(/\'/g, "\"");
var item = result.split("\n"),
tmp = "",
data_tmp = "",
data_list = [],
time = [],
data = [],
i = 0,
data_list_list,
canvas,
label,
tooltip,
line_chart;
item = JSON.parse(JSON.stringify(item));
for (i = 0; i < 30; i += 1) {
data_list.push(item[i]);
data_list_list = JSON.parse(data_list[i]);
if (data_list_list.hasOwnProperty("time")
&& data_list_list.hasOwnProperty("data")) {
tmp = data_list_list.time.split(" ")[1].split(",")[0];
data_tmp = data_list_list.data.cpu_temperature;
}
time.push(tmp);
data.push(data_tmp);
gadget.time = time;
gadget.data = data;
}
canvas = gadget.element.children.line;
data = gadget.data;
label = gadget.time;
tooltip = ['Twelve', 'Fifteen', 'Thirteen', 'Twenty-two',
'Eight', 'Twelve', 'Thirdy-one', 'Three', 'Five'];
line_chart = new LineChart(canvas, data, label, tooltip);
line_chart.draw();
line_chart.tooltipOn('mousemove');
});
});
}());
\ No newline at end of file
<html>
<head>
<script src="rsvp.js"></script>
<script src="renderjs.js"></script>
<script src="g-chart.line.js"></script>
<script src="promise.gadget.js"></script>
<style type="text/css">
.tooltip-chart {
position: fixed;
z-index: 1000;
transform: translate(-50%, -120%);
padding: 10px;
background-color: white;
border-radius: 5px;
text-align: center;
min-width: 100px;
border: 1px solid #000;
box-shadow: 0 0 10px 5px #000;
}
</style>
</head>
<body>
<canvas id="line" width="1600" height="350"></canvas>
</body>
</html>
{% set part_list = [] -%} {% set part_list = [] -%}
{%- for i, slave in enumerate(slave_instance_list) %} {%- for i, slave in enumerate(slave_instance_list) %}
{%- set slave_parameters = json_module.loads(slave['_']) %}
{% set slave_reference = slave.get('slave_reference', '') %} {% set slave_reference = slave.get('slave_reference', '') %}
{% set publish_section_title = 'publish-%s' % slave_reference %} {% set publish_section_title = 'publish-%s' % slave_reference %}
{% do part_list.append(publish_section_title) %} {% do part_list.append(publish_section_title) %}
[{{ publish_section_title }}] [{{ publish_section_title }}]
recipe = slapos.cookbook:publish.serialised recipe = slapos.cookbook:publish.serialised
-slave-reference = {{ slave_reference }} -slave-reference = {{ slave_reference }}
info = Your SIM card has been attached to service ${slap-configuration:instance-title}. info = Your SIM card with IMSI {{ slave_parameters.get('imsi', '') }} has been attached to service ${slap-configuration:instance-title}.
{%- endfor %} {%- endfor %}
[buildout] [buildout]
...@@ -26,6 +27,20 @@ eggs-directory = {{ eggs_directory }} ...@@ -26,6 +27,20 @@ eggs-directory = {{ eggs_directory }}
develop-eggs-directory = {{ develop_eggs_directory }} develop-eggs-directory = {{ develop_eggs_directory }}
offline = true offline = true
[monitor-httpd-conf-parameter]
httpd-include-file = {{ buildout_directory }}/etc/httpd-include-file.conf
port = ${monitor-instance-parameter:monitor-httpd-port}
url = https://[${monitor-instance-parameter:monitor-httpd-ipv6}]:${:port}
[monitor-instance-parameter]
monitor-httpd-port = ${monitor-address:port}
[monitor-address]
recipe = slapos.cookbook:free_port
minimum = 8035
maximum = 8055
ip = ${monitor-instance-parameter:monitor-httpd-ipv6}
[slap-configuration] [slap-configuration]
recipe = slapos.cookbook:slapconfiguration.serialised recipe = slapos.cookbook:slapconfiguration.serialised
computer = {{ slap_connection['computer-id'] }} computer = {{ slap_connection['computer-id'] }}
...@@ -106,3 +121,4 @@ recipe = slapos.cookbook:publish.serialised ...@@ -106,3 +121,4 @@ recipe = slapos.cookbook:publish.serialised
<= monitor-publish <= monitor-publish
epc-ipv6 = ${lte-mme-request:connection-epc-ipv6} epc-ipv6 = ${lte-mme-request:connection-epc-ipv6}
epc-ipv4 = {{ epc_ipv4 }} epc-ipv4 = {{ epc_ipv4 }}
monitor-gadget-url = ${:monitor-base-url}/gadget/software.cfg.html
...@@ -183,6 +183,26 @@ ...@@ -183,6 +183,26 @@
"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.", "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", "type": "number",
"default": {{ default_n_antenna_ul }} "default": {{ default_n_antenna_ul }}
},
"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"
]
} }
} }
} }
...@@ -8,6 +8,8 @@ parts = ...@@ -8,6 +8,8 @@ parts =
amarisoft-rf-info-service amarisoft-rf-info-service
{% if slapparameter_dict.get('rrh', '') == "Lopcomm ORAN" %} {% if slapparameter_dict.get('rrh', '') == "Lopcomm ORAN" %}
lopcomm-rrh-stats-service lopcomm-rrh-stats-service
lopcomm-rrh-config-template
lopcomm-cu-config
check-lopcomm-vswr.py check-lopcomm-vswr.py
check-lopcomm-lof.py check-lopcomm-lof.py
check-lopcomm-rssi.py check-lopcomm-rssi.py
...@@ -19,6 +21,7 @@ parts = ...@@ -19,6 +21,7 @@ parts =
check-sdr-busy.py check-sdr-busy.py
check-baseband-latency.py check-baseband-latency.py
check-amarisoft-stats-log.py check-amarisoft-stats-log.py
check-rx-saturated.py
monitor-base monitor-base
publish-connection-information publish-connection-information
...@@ -28,6 +31,20 @@ eggs-directory = {{ eggs_directory }} ...@@ -28,6 +31,20 @@ eggs-directory = {{ eggs_directory }}
develop-eggs-directory = {{ develop_eggs_directory }} develop-eggs-directory = {{ develop_eggs_directory }}
offline = true offline = true
[monitor-httpd-conf-parameter]
httpd-include-file = {{ buildout_directory }}/etc/httpd-include-file.conf
port = ${monitor-instance-parameter:monitor-httpd-port}
url = https://[${monitor-instance-parameter:monitor-httpd-ipv6}]:${:port}
[monitor-instance-parameter]
monitor-httpd-port = ${monitor-address:port}
[monitor-address]
recipe = slapos.cookbook:free_port
minimum = 8035
maximum = 8055
ip = ${monitor-instance-parameter:monitor-httpd-ipv6}
[slap-configuration] [slap-configuration]
recipe = slapos.cookbook:slapconfiguration.serialised recipe = slapos.cookbook:slapconfiguration.serialised
computer = {{ slap_connection['computer-id'] }} computer = {{ slap_connection['computer-id'] }}
...@@ -151,17 +168,40 @@ recipe = slapos.recipe.template:jinja2 ...@@ -151,17 +168,40 @@ recipe = slapos.recipe.template:jinja2
extensions = jinja2.ext.do extensions = jinja2.ext.do
log-output = ${directory:var}/log/lopcomm-rrh-stats.log log-output = ${directory:var}/log/lopcomm-rrh-stats.log
json-log-output = ${directory:var}/log/lopcomm-rrh-stats.json.log json-log-output = ${directory:var}/log/lopcomm-rrh-stats.json.log
cfg-json-log-output = ${directory:var}/log/lopcomm-rrh-config.json.log
context = context =
section directory directory section directory directory
key slapparameter_dict slap-configuration:configuration key slapparameter_dict slap-configuration:configuration
key log_file :log-output key log_file :log-output
key json_log_file :json-log-output key json_log_file :json-log-output
key cfg_json_log_file :cfg-json-log-output
raw testing {{ slapparameter_dict.get("testing", False) }} raw testing {{ slapparameter_dict.get("testing", False) }}
raw python_path {{ buildout_directory}}/bin/pythonwitheggs raw python_path {{ buildout_directory}}/bin/pythonwitheggs
mode = 0775 mode = 0775
url = {{ lopcomm_rrh_stats_template }} url = {{ lopcomm_rrh_stats_template }}
output = ${directory:bin}/lopcomm-rrh-stats.py output = ${directory:bin}/lopcomm-rrh-stats.py
[lopcomm-cu-config]
<= config-base
url = {{ cu_config_template }}
output = ${directory:etc}/cu_config.xml
[lopcomm-rrh-config-template]
recipe = slapos.recipe.template:jinja2
extensions = jinja2.ext.do
log-output = ${directory:var}/log/lopcomm-rrh-config.log
context =
section directory directory
key slapparameter_dict slap-configuration:configuration
key log_file :log-output
raw testing {{ slapparameter_dict.get("testing", False) }}
raw python_path {{ buildout_directory}}/bin/pythonwitheggs
raw CreateProcessingEle_template {{ CreateProcessingEle_template }}
key cu_config_template lopcomm-cu-config:output
mode = 0775
url = {{ lopcomm_rrh_config_template }}
output = ${directory:script}/lopcomm-rrh-config.py
[amarisoft-stats-service] [amarisoft-stats-service]
recipe = slapos.cookbook:wrapper recipe = slapos.cookbook:wrapper
command-line = ${amarisoft-stats-template:output} command-line = ${amarisoft-stats-template:output}
...@@ -210,6 +250,7 @@ output = ${directory:etc}/enb.cfg ...@@ -210,6 +250,7 @@ output = ${directory:etc}/enb.cfg
[publish-connection-information] [publish-connection-information]
<= monitor-publish <= monitor-publish
recipe = slapos.cookbook:publish.serialised recipe = slapos.cookbook:publish.serialised
monitor-gadget-url = ${:monitor-base-url}/gadget/software.cfg.html
[monitor-instance-parameter] [monitor-instance-parameter]
{% if slapparameter_dict.get("name", None) %} {% if slapparameter_dict.get("name", None) %}
......
{% set part_list = [] -%} {% set part_list = [] -%}
{%- for i, slave in enumerate(slave_instance_list) %} {%- for i, slave in enumerate(slave_instance_list) %}
{%- set slave_parameters = json_module.loads(slave['_']) %}
{% set slave_reference = slave.get('slave_reference', '') %} {% set slave_reference = slave.get('slave_reference', '') %}
{% set publish_section_title = 'publish-%s' % slave_reference %} {% set publish_section_title = 'publish-%s' % slave_reference %}
{% do part_list.append(publish_section_title) %} {% do part_list.append(publish_section_title) %}
[{{ publish_section_title }}] [{{ publish_section_title }}]
recipe = slapos.cookbook:publish.serialised recipe = slapos.cookbook:publish.serialised
-slave-reference = {{ slave_reference }} -slave-reference = {{ slave_reference }}
info = Your SIM card has been attached to service ${slap-configuration:instance-title}. info = Your SIM card with IMSI {{ slave_parameters.get('imsi', '') }} has been attached to service ${slap-configuration:instance-title}.
{%- endfor %} {%- endfor %}
[buildout] [buildout]
...@@ -25,6 +26,20 @@ eggs-directory = {{ eggs_directory }} ...@@ -25,6 +26,20 @@ eggs-directory = {{ eggs_directory }}
develop-eggs-directory = {{ develop_eggs_directory }} develop-eggs-directory = {{ develop_eggs_directory }}
offline = true offline = true
[monitor-httpd-conf-parameter]
httpd-include-file = {{ buildout_directory }}/etc/httpd-include-file.conf
port = ${monitor-instance-parameter:monitor-httpd-port}
url = https://[${monitor-instance-parameter:monitor-httpd-ipv6}]:${:port}
[monitor-instance-parameter]
monitor-httpd-port = ${monitor-address:port}
[monitor-address]
recipe = slapos.cookbook:free_port
minimum = 8035
maximum = 8055
ip = ${monitor-instance-parameter:monitor-httpd-ipv6}
[slap-configuration] [slap-configuration]
recipe = slapos.cookbook:slapconfiguration.serialised recipe = slapos.cookbook:slapconfiguration.serialised
computer = {{ slap_connection['computer-id'] }} computer = {{ slap_connection['computer-id'] }}
...@@ -93,3 +108,4 @@ recipe = slapos.cookbook:publish.serialised ...@@ -93,3 +108,4 @@ recipe = slapos.cookbook:publish.serialised
<= monitor-publish <= monitor-publish
epc-ipv6 = ${lte-mme-request:connection-epc-ipv6} epc-ipv6 = ${lte-mme-request:connection-epc-ipv6}
epc-ipv4 = {{ epc_ipv4 }} epc-ipv4 = {{ epc_ipv4 }}
monitor-gadget-url = ${:monitor-base-url}/gadget/software.cfg.html
{% set part_list = [] -%} {% set part_list = [] -%}
{%- for i, slave in enumerate(slave_instance_list) %} {%- for i, slave in enumerate(slave_instance_list) %}
{%- set slave_parameters = json_module.loads(slave['_']) %}
{% set slave_reference = slave.get('slave_reference', '') %} {% set slave_reference = slave.get('slave_reference', '') %}
{% set publish_section_title = 'publish-%s' % slave_reference %} {% set publish_section_title = 'publish-%s' % slave_reference %}
{% do part_list.append(publish_section_title) %} {% do part_list.append(publish_section_title) %}
[{{ publish_section_title }}] [{{ publish_section_title }}]
recipe = slapos.cookbook:publish.serialised recipe = slapos.cookbook:publish.serialised
-slave-reference = {{ slave_reference }} -slave-reference = {{ slave_reference }}
info = Your SIM card has been attached to service ${slap-configuration:instance-title}. info = Your SIM card with IMSI {{ slave_parameters.get('imsi', '') }} has been attached to service ${slap-configuration:instance-title}.
{%- endfor %} {%- endfor %}
[buildout] [buildout]
...@@ -26,6 +27,20 @@ eggs-directory = {{ eggs_directory }} ...@@ -26,6 +27,20 @@ eggs-directory = {{ eggs_directory }}
develop-eggs-directory = {{ develop_eggs_directory }} develop-eggs-directory = {{ develop_eggs_directory }}
offline = true offline = true
[monitor-httpd-conf-parameter]
httpd-include-file = {{ buildout_directory }}/etc/httpd-include-file.conf
port = ${monitor-instance-parameter:monitor-httpd-port}
url = https://[${monitor-instance-parameter:monitor-httpd-ipv6}]:${:port}
[monitor-instance-parameter]
monitor-httpd-port = ${monitor-address:port}
[monitor-address]
recipe = slapos.cookbook:free_port
minimum = 8035
maximum = 8055
ip = ${monitor-instance-parameter:monitor-httpd-ipv6}
[slap-configuration] [slap-configuration]
recipe = slapos.cookbook:slapconfiguration.serialised recipe = slapos.cookbook:slapconfiguration.serialised
computer = {{ slap_connection['computer-id'] }} computer = {{ slap_connection['computer-id'] }}
...@@ -106,3 +121,4 @@ recipe = slapos.cookbook:publish.serialised ...@@ -106,3 +121,4 @@ recipe = slapos.cookbook:publish.serialised
<= monitor-publish <= monitor-publish
epc-ipv6 = ${lte-mme-request:connection-epc-ipv6} epc-ipv6 = ${lte-mme-request:connection-epc-ipv6}
epc-ipv4 = {{ epc_ipv4 }} epc-ipv4 = {{ epc_ipv4 }}
monitor-gadget-url = ${:monitor-base-url}/gadget/software.cfg.html
...@@ -19,6 +19,7 @@ parts = ...@@ -19,6 +19,7 @@ parts =
check-sdr-busy.py check-sdr-busy.py
check-baseband-latency.py check-baseband-latency.py
check-amarisoft-stats-log.py check-amarisoft-stats-log.py
check-rx-saturated.py
monitor-base monitor-base
publish-connection-information publish-connection-information
...@@ -28,6 +29,20 @@ eggs-directory = {{ eggs_directory }} ...@@ -28,6 +29,20 @@ eggs-directory = {{ eggs_directory }}
develop-eggs-directory = {{ develop_eggs_directory }} develop-eggs-directory = {{ develop_eggs_directory }}
offline = true offline = true
[monitor-httpd-conf-parameter]
httpd-include-file = {{ buildout_directory }}/etc/httpd-include-file.conf
port = ${monitor-instance-parameter:monitor-httpd-port}
url = https://[${monitor-instance-parameter:monitor-httpd-ipv6}]:${:port}
[monitor-instance-parameter]
monitor-httpd-port = ${monitor-address:port}
[monitor-address]
recipe = slapos.cookbook:free_port
minimum = 8035
maximum = 8055
ip = ${monitor-instance-parameter:monitor-httpd-ipv6}
[slap-configuration] [slap-configuration]
recipe = slapos.cookbook:slapconfiguration.serialised recipe = slapos.cookbook:slapconfiguration.serialised
computer = {{ slap_connection['computer-id'] }} computer = {{ slap_connection['computer-id'] }}
...@@ -188,6 +203,7 @@ output = ${directory:etc}/gnb.cfg ...@@ -188,6 +203,7 @@ output = ${directory:etc}/gnb.cfg
[publish-connection-information] [publish-connection-information]
<= monitor-publish <= monitor-publish
recipe = slapos.cookbook:publish.serialised recipe = slapos.cookbook:publish.serialised
monitor-gadget-url = ${:monitor-base-url}/gadget/software.cfg.html
[monitor-instance-parameter] [monitor-instance-parameter]
{% if slapparameter_dict.get("name", None) %} {% if slapparameter_dict.get("name", None) %}
......
...@@ -18,6 +18,20 @@ eggs-directory = {{ eggs_directory }} ...@@ -18,6 +18,20 @@ eggs-directory = {{ eggs_directory }}
develop-eggs-directory = {{ develop_eggs_directory }} develop-eggs-directory = {{ develop_eggs_directory }}
offline = true offline = true
[monitor-httpd-conf-parameter]
httpd-include-file = {{ buildout_directory }}/etc/httpd-include-file.conf
port = ${monitor-instance-parameter:monitor-httpd-port}
url = https://[${monitor-instance-parameter:monitor-httpd-ipv6}]:${:port}
[monitor-instance-parameter]
monitor-httpd-port = ${monitor-address:port}
[monitor-address]
recipe = slapos.cookbook:free_port
minimum = 8035
maximum = 8055
ip = ${monitor-instance-parameter:monitor-httpd-ipv6}
[slap-configuration] [slap-configuration]
recipe = slapos.cookbook:slapconfiguration.serialised recipe = slapos.cookbook:slapconfiguration.serialised
computer = {{ slap_connection['computer-id'] }} computer = {{ slap_connection['computer-id'] }}
...@@ -180,6 +194,7 @@ password = {{ slapparameter_dict['monitor-password'] | string }} ...@@ -180,6 +194,7 @@ password = {{ slapparameter_dict['monitor-password'] | string }}
recipe = slapos.cookbook:publish.serialised recipe = slapos.cookbook:publish.serialised
epc-ipv6 = ${slap-configuration:ipv6-random} epc-ipv6 = ${slap-configuration:ipv6-random}
epc-ipv4 = {{ epc_ipv4 }} epc-ipv4 = {{ epc_ipv4 }}
monitor-gadget-url = ${:monitor-base-url}/gadget/software.cfg.html
[macro.promise] [macro.promise]
<= monitor-promise-base <= monitor-promise-base
......
...@@ -181,6 +181,26 @@ ...@@ -181,6 +181,26 @@
"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.", "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", "type": "number",
"default": 2 "default": 2
},
"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"
]
} }
} }
} }
...@@ -163,6 +163,26 @@ ...@@ -163,6 +163,26 @@
"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.", "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", "type": "number",
"default": 2 "default": 2
},
"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"
]
} }
} }
} }
...@@ -181,6 +181,26 @@ ...@@ -181,6 +181,26 @@
"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.", "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", "type": "number",
"default": 2 "default": 2
},
"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"
]
} }
} }
} }
...@@ -163,6 +163,26 @@ ...@@ -163,6 +163,26 @@
"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.", "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", "type": "number",
"default": 2 "default": 2
},
"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"
]
} }
} }
} }
...@@ -181,6 +181,26 @@ ...@@ -181,6 +181,26 @@
"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.", "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", "type": "number",
"default": 2 "default": 2
},
"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"
]
} }
} }
} }
...@@ -163,6 +163,26 @@ ...@@ -163,6 +163,26 @@
"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.", "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", "type": "number",
"default": 2 "default": 2
},
"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"
]
} }
} }
} }
...@@ -181,6 +181,26 @@ ...@@ -181,6 +181,26 @@
"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.", "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", "type": "number",
"default": 2 "default": 2
},
"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"
]
} }
} }
} }
...@@ -163,6 +163,26 @@ ...@@ -163,6 +163,26 @@
"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.", "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", "type": "number",
"default": 2 "default": 2
},
"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"
]
} }
} }
} }
...@@ -15,6 +15,20 @@ eggs-directory = {{ eggs_directory }} ...@@ -15,6 +15,20 @@ eggs-directory = {{ eggs_directory }}
develop-eggs-directory = {{ develop_eggs_directory }} develop-eggs-directory = {{ develop_eggs_directory }}
offline = true offline = true
[monitor-httpd-conf-parameter]
httpd-include-file = {{ buildout_directory }}/etc/httpd-include-file.conf
port = ${monitor-instance-parameter:monitor-httpd-port}
url = https://[${monitor-instance-parameter:monitor-httpd-ipv6}]:${:port}
[monitor-instance-parameter]
monitor-httpd-port = ${monitor-address:port}
[monitor-address]
recipe = slapos.cookbook:free_port
minimum = 8035
maximum = 8055
ip = ${monitor-instance-parameter:monitor-httpd-ipv6}
[slap-configuration] [slap-configuration]
recipe = slapos.cookbook:slapconfiguration.serialised recipe = slapos.cookbook:slapconfiguration.serialised
computer = {{ slap_connection['computer-id'] }} computer = {{ slap_connection['computer-id'] }}
...@@ -116,6 +130,7 @@ output = ${directory:etc}/ue.cfg ...@@ -116,6 +130,7 @@ output = ${directory:etc}/ue.cfg
recipe = slapos.cookbook:publish.serialised recipe = slapos.cookbook:publish.serialised
rue_bind_addr = ${slap-configuration:ipv6-random} rue_bind_addr = ${slap-configuration:ipv6-random}
com_addr = [${slap-configuration:ipv6-random}]:9002 com_addr = [${slap-configuration:ipv6-random}]:9002
monitor-gadget-url = ${:monitor-base-url}/gadget/software.cfg.html
[monitor-instance-parameter] [monitor-instance-parameter]
{% if slapparameter_dict.get("name", None) %} {% if slapparameter_dict.get("name", None) %}
......
...@@ -15,6 +15,20 @@ eggs-directory = {{ eggs_directory }} ...@@ -15,6 +15,20 @@ eggs-directory = {{ eggs_directory }}
develop-eggs-directory = {{ develop_eggs_directory }} develop-eggs-directory = {{ develop_eggs_directory }}
offline = true offline = true
[monitor-httpd-conf-parameter]
httpd-include-file = {{ buildout_directory }}/etc/httpd-include-file.conf
port = ${monitor-instance-parameter:monitor-httpd-port}
url = https://[${monitor-instance-parameter:monitor-httpd-ipv6}]:${:port}
[monitor-instance-parameter]
monitor-httpd-port = ${monitor-address:port}
[monitor-address]
recipe = slapos.cookbook:free_port
minimum = 8035
maximum = 8055
ip = ${monitor-instance-parameter:monitor-httpd-ipv6}
[slap-configuration] [slap-configuration]
recipe = slapos.cookbook:slapconfiguration.serialised recipe = slapos.cookbook:slapconfiguration.serialised
computer = {{ slap_connection['computer-id'] }} computer = {{ slap_connection['computer-id'] }}
...@@ -119,6 +133,7 @@ output = ${directory:etc}/ue.cfg ...@@ -119,6 +133,7 @@ output = ${directory:etc}/ue.cfg
recipe = slapos.cookbook:publish.serialised recipe = slapos.cookbook:publish.serialised
rue_bind_addr = ${slap-configuration:ipv6-random} rue_bind_addr = ${slap-configuration:ipv6-random}
com_addr = [${slap-configuration:ipv6-random}]:9002 com_addr = [${slap-configuration:ipv6-random}]:9002
monitor-gadget-url = ${:monitor-base-url}/gadget/software.cfg.html
[monitor-instance-parameter] [monitor-instance-parameter]
{% if slapparameter_dict.get("name", None) %} {% if slapparameter_dict.get("name", None) %}
......
...@@ -112,6 +112,9 @@ extra-context = ...@@ -112,6 +112,9 @@ extra-context =
raw amarisoft_stats_template ${amarisoft-stats.jinja2.py:target} raw amarisoft_stats_template ${amarisoft-stats.jinja2.py:target}
raw amarisoft_rf_info_template ${amarisoft-rf-info.jinja2.py:target} raw amarisoft_rf_info_template ${amarisoft-rf-info.jinja2.py:target}
raw lopcomm_rrh_stats_template ${lopcomm-rrh-stats.jinja2.py:target} raw lopcomm_rrh_stats_template ${lopcomm-rrh-stats.jinja2.py:target}
raw lopcomm_rrh_config_template ${lopcomm-rrh-config.jinja2.py:target}
raw CreateProcessingEle_template ${CreateProcessingEle.jinja2.xml:target}
raw cu_config_template ${cu_config.jinja2.xml:target}
raw openssl_location ${openssl:location} raw openssl_location ${openssl:location}
raw default_dl_earfcn ${default-params:default-dl-earfcn} raw default_dl_earfcn ${default-params:default-dl-earfcn}
raw default_lte_dl_freq ${default-params:default-lte-dl-freq} raw default_lte_dl_freq ${default-params:default-lte-dl-freq}
......
#!{{ python_path }}
import logging
import time
import xmltodict
from logging.handlers import RotatingFileHandler
from ncclient import manager
from ncclient.operations import RPCError
from ncclient.xml_ import *
from ncclient.devices.default import DefaultDeviceHandler
class LopcommNetconfClient:
def __init__(self):
log_file = "{{ log_file }}"
self.logger = logging.getLogger('logger')
self.logger.setLevel(logging.DEBUG)
handler = RotatingFileHandler(log_file, maxBytes=100000, backupCount=5)
self.logger.addHandler(handler)
formatter = logging.Formatter("%(asctime)s [%(levelname)s] %(message)s")
handler.setFormatter(formatter)
if {{ testing }}:
return
def connect(self, host, port, user, password):
if {{ testing }}:
return
self.address = (host, port)
self.logger.info('Connecting to %s, user %s...' % (self.address, user))
self.conn = manager.connect(host=host,
port=port,
username=user,
password=password,
timeout=1800,
device_params={
'name': 'default'
},
hostkey_verify=False)
self.logger.info('Connection to %s successful' % (self.address,))
def edit_config(self, config_files):
for config_file in config_files:
with open(config_file) as f:
config_xml = f.read()
try:
self.logger.info('Sending edit-config RPC request...')
self.conn.edit_config(target='running', config=config_xml)
self.logger.info('Edit-config RPC request sent successfully')
except RPCError as e:
self.logger.error('Error sending edit-config RPC request: %s' % e)
def close(self):
# Close not compatible between ncclient and netconf server
#self.conn.close()
pass
if __name__ == '__main__':
nc = LopcommNetconfClient()
while True:
try:
nc.connect("192.168.0.210", 830, "oranuser", "oranpassword")
nc.edit_config(["{{ CreateProcessingEle_template }}", "{{ cu_config_template }}"])
break
except Exception as e:
nc.logger.debug('Got exception, waiting 10 seconds before reconnecting...')
nc.logger.debug(e)
time.sleep(10)
finally:
nc.close()
...@@ -14,17 +14,25 @@ class LopcommNetconfClient: ...@@ -14,17 +14,25 @@ class LopcommNetconfClient:
log_file = "{{ log_file }}" log_file = "{{ log_file }}"
json_log_file = "{{ json_log_file }}" json_log_file = "{{ json_log_file }}"
cfg_json_log_file = "{{ cfg_json_log_file }}"
self.logger = logging.getLogger('logger') self.logger = logging.getLogger('logger')
self.json_logger = logging.getLogger('json_logger') self.json_logger = logging.getLogger('json_logger')
self.cfg_json_logger = logging.getLogger('cfg_json_logger')
self.logger.setLevel(logging.DEBUG) self.logger.setLevel(logging.DEBUG)
self.json_logger.setLevel(logging.DEBUG) self.json_logger.setLevel(logging.DEBUG)
self.cfg_json_logger.setLevel(logging.DEBUG)
json_handler = RotatingFileHandler(json_log_file, maxBytes=100000, backupCount=5) json_handler = RotatingFileHandler(json_log_file, maxBytes=100000, backupCount=5)
json_formatter = logging.Formatter('{"time": "%(asctime)s", "log_level": "%(levelname)s", "message": "%(message)s", "data": %(data)s}') json_formatter = logging.Formatter('{"time": "%(asctime)s", "log_level": "%(levelname)s", "message": "%(message)s", "data": %(data)s}')
json_handler.setFormatter(json_formatter) json_handler.setFormatter(json_formatter)
self.json_logger.addHandler(json_handler) self.json_logger.addHandler(json_handler)
cfg_json_handler = RotatingFileHandler(cfg_json_log_file, maxBytes=100000, backupCount=5)
cfg_json_formatter = logging.Formatter('{"time": "%(asctime)s", "log_level": "%(levelname)s", "message": "%(message)s", "data": %(data)s}')
cfg_json_handler.setFormatter(cfg_json_formatter)
self.cfg_json_logger.addHandler(cfg_json_handler)
handler = RotatingFileHandler(log_file, maxBytes=100000, backupCount=5) handler = RotatingFileHandler(log_file, maxBytes=100000, backupCount=5)
self.logger.addHandler(handler) self.logger.addHandler(handler)
formatter = logging.Formatter("%(asctime)s [%(levelname)s] %(message)s") formatter = logging.Formatter("%(asctime)s [%(levelname)s] %(message)s")
...@@ -48,7 +56,7 @@ class LopcommNetconfClient: ...@@ -48,7 +56,7 @@ class LopcommNetconfClient:
password=password, password=password,
timeout=1800, timeout=1800,
device_params={ device_params={
'name': 'huawei' 'name': 'default'
}, },
hostkey_verify=False) hostkey_verify=False)
...@@ -71,7 +79,11 @@ class LopcommNetconfClient: ...@@ -71,7 +79,11 @@ class LopcommNetconfClient:
self.logger.debug('Got new notification from %s...' % (self.address,)) self.logger.debug('Got new notification from %s...' % (self.address,))
result_in_xml = result._raw result_in_xml = result._raw
data_dict = xmltodict.parse(result_in_xml) data_dict = xmltodict.parse(result_in_xml)
if 'alarm-notif' in data_dict['notification']:
self.json_logger.info('', extra={'data': data_dict}) self.json_logger.info('', extra={'data': data_dict})
else:
self.cfg_json_logger.info('', extra={'data': data_dict})
def close(self): def close(self):
# Close not compatible between ncclient and netconf server # Close not compatible between ncclient and netconf server
......
<config xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<processing-elements xmlns="urn:o-ran:processing-element:1.0">
<transport-session-type>CPRI-INTERFACE</transport-session-type>
<ru-elements>
<name>PE0</name>
<transport-flow>
<interface-name>eth1</interface-name>
</transport-flow>
</ru-elements>
</processing-elements>
</config>
\ No newline at end of file
<config xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<user-plane-configuration xmlns="urn:o-ran:uplane-conf:1.0">
<!-- low-level-t[r]x-links -->
<low-level-tx-links>
<name>TXA0P00C00</name>
<processing-element>PE0</processing-element>
<tx-array-carrier>TXA0CC00</tx-array-carrier>
<low-level-tx-endpoint>TXA0P00C00</low-level-tx-endpoint>
</low-level-tx-links>
<low-level-tx-links>
<name>TXA0P01C00</name>
<processing-element>PE0</processing-element>
<tx-array-carrier>TXA0CC00</tx-array-carrier>
<low-level-tx-endpoint>TXA0P01C00</low-level-tx-endpoint>
</low-level-tx-links>
<low-level-rx-links>
<name>RXA0P00C00</name>
<processing-element>PE0</processing-element>
<rx-array-carrier>RXA0CC00</rx-array-carrier>
<low-level-rx-endpoint>RXA0P00C00</low-level-rx-endpoint>
</low-level-rx-links>
<low-level-rx-links>
<name>PRACH0P00C00</name>
<processing-element>PE0</processing-element>
<rx-array-carrier>RXA0CC00</rx-array-carrier>
<low-level-rx-endpoint>PRACH0P00C00</low-level-rx-endpoint>
</low-level-rx-links>
<low-level-rx-links>
<name>RXA0P01C00</name>
<processing-element>PE0</processing-element>
<rx-array-carrier>RXA0CC00</rx-array-carrier>
<low-level-rx-endpoint>RXA0P01C00</low-level-rx-endpoint>
</low-level-rx-links>
<low-level-rx-links>
<name>PRACH0P01C00</name>
<processing-element>PE0</processing-element>
<rx-array-carrier>RXA0CC00</rx-array-carrier>
<low-level-rx-endpoint>PRACH0P01C00</low-level-rx-endpoint>
</low-level-rx-links>
<!-- low-level-t[r]x-endpoints -->
<low-level-tx-endpoints>
<name>TXA0P00C00</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>0</eaxc-id>
</e-axcid>
</low-level-tx-endpoints>
<low-level-tx-endpoints>
<name>TXA0P01C00</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>1</eaxc-id>
</e-axcid>
</low-level-tx-endpoints>
<low-level-rx-endpoints>
<name>RXA0P00C00</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>0</eaxc-id>
</e-axcid>
</low-level-rx-endpoints>
<low-level-rx-endpoints>
<name>PRACH0P00C00</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>8</eaxc-id>
</e-axcid>
</low-level-rx-endpoints>
<low-level-rx-endpoints>
<name>RXA0P01C00</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>1</eaxc-id>
</e-axcid>
</low-level-rx-endpoints>
<low-level-rx-endpoints>
<name>PRACH0P01C00</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>9</eaxc-id>
</e-axcid>
</low-level-rx-endpoints>
<!-- t[r]x-array-carriers -->
<tx-array-carriers>
<name>TXA0CC00</name>
<absolute-frequency-center>300</absolute-frequency-center>
<center-of-channel-bandwidth>2140000000</center-of-channel-bandwidth>
<channel-bandwidth>20000000</channel-bandwidth>
<active>{{ slapparameter_dict.get('txa0cc00_active', 'ACTIVE') }}</active>
<rw-duplex-scheme>FDD</rw-duplex-scheme>
<gain>50</gain>
<downlink-radio-frame-offset>0</downlink-radio-frame-offset>
<downlink-sfn-offset>0</downlink-sfn-offset>
</tx-array-carriers>
<rx-array-carriers>
<name>RXA0CC00</name>
<absolute-frequency-center>18300</absolute-frequency-center>
<center-of-channel-bandwidth>1950000000</center-of-channel-bandwidth>
<channel-bandwidth>20000000</channel-bandwidth>
<active>{{ slapparameter_dict.get('rxa0cc00_active', 'ACTIVE') }}</active>
<downlink-radio-frame-offset>0</downlink-radio-frame-offset>
<downlink-sfn-offset>0</downlink-sfn-offset>
<gain-correction>0.0</gain-correction>
<n-ta-offset>0</n-ta-offset>
</rx-array-carriers>
</user-plane-configuration>
</config>
\ No newline at end of file
...@@ -22,9 +22,19 @@ parts += ...@@ -22,9 +22,19 @@ parts +=
ue_db.jinja2.cfg ue_db.jinja2.cfg
ue-lte.jinja2.cfg ue-lte.jinja2.cfg
ue-nr.jinja2.cfg ue-nr.jinja2.cfg
CreateProcessingEle.jinja2.xml
cu_config.jinja2.xml
sib23.asn sib23.asn
monitor-httpd-extra-conf
# copy all gadget file
gadget
g-chart.line.js
promise.gadget.js
software.cfg.html
rsvp.js
iperf3 iperf3
eggs eggs
# 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
...@@ -47,6 +57,9 @@ url = ${:_profile_base_location_}/${:_update_hash_filename_} ...@@ -47,6 +57,9 @@ url = ${:_profile_base_location_}/${:_update_hash_filename_}
[lopcomm-rrh-stats.jinja2.py] [lopcomm-rrh-stats.jinja2.py]
<= download-base <= download-base
[lopcomm-rrh-config.jinja2.py]
<= download-base
[template-lte-enb-epc] [template-lte-enb-epc]
<= download-base <= download-base
...@@ -79,6 +92,34 @@ url = ${:_profile_base_location_}/${:_buildout_section_name_} ...@@ -79,6 +92,34 @@ url = ${:_profile_base_location_}/${:_buildout_section_name_}
recipe = slapos.recipe.build:download recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/config/${:_buildout_section_name_} url = ${:_profile_base_location_}/config/${:_buildout_section_name_}
[copy-netconf-to-instance]
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/netconf/${:_buildout_section_name_}
[gadget]
recipe = slapos.recipe.template
output = ${buildout:directory}/${:_buildout_section_name_}/renderjs.js
url = https://lab.nexedi.com/nexedi/renderjs/raw/b715d066bfddc30bedfc8356fb720dcbb391378e/dist/renderjs-0.28.0.js
md5sum = 7e074a29b07e0045d2ba8a8e63bd499e
[monitor-httpd-extra-conf]
recipe = slapos.recipe.template
output = ${buildout:directory}/etc/httpd-include-file.conf
inline =
Alias /gadget ${buildout:directory}/gadget
<Directory ${buildout:directory}/gadget>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
Satisfy Any
Allow from all
</Directory>
[copy-gadget-to-software]
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/gadget/${:_buildout_section_name_}
destination = ${buildout:directory}/gadget/${:_buildout_section_name_}
[enb.jinja2.cfg] [enb.jinja2.cfg]
<= copy-config-to-instance <= copy-config-to-instance
filename = enb.jinja2.cfg filename = enb.jinja2.cfg
...@@ -107,6 +148,29 @@ filename = ue-lte.jinja2.cfg ...@@ -107,6 +148,29 @@ filename = ue-lte.jinja2.cfg
<= copy-config-to-instance <= copy-config-to-instance
filename = ue-nr.jinja2.cfg filename = ue-nr.jinja2.cfg
[CreateProcessingEle.jinja2.xml]
<= copy-netconf-to-instance
filename = CreateProcessingEle.jinja2.xml
[cu_config.jinja2.xml]
<= copy-netconf-to-instance
filename = cu_config.jinja2.xml
# Download gadget files
[software.cfg.html]
<= copy-gadget-to-software
[promise.gadget.js]
<= copy-gadget-to-software
[rsvp.js]
<= copy-gadget-to-software
url = https://lab.nexedi.com/nexedi/rsvp.js/raw/b0c4596df6a52d75705a59262bc992a166ff11a1/dist/rsvp-2.0.4.js
md5sum = 2b0f2d52857b17fdfb8a5c2ea451a5ad
[g-chart.line.js]
<= copy-gadget-to-software
url = https://raw.githubusercontent.com/guschnwg/g-chart/cbcc7bc40f88fcce4854b55d0902b6273004ba3e/g-chart.line.js
md5sum = 57c50b46c9492c6ab78dc44deac3c0ce
[eggs] [eggs]
recipe = zc.recipe.egg recipe = zc.recipe.egg
eggs = eggs =
......
...@@ -29,6 +29,7 @@ import os ...@@ -29,6 +29,7 @@ import os
import yaml import yaml
import json import json
import glob import glob
import requests
from slapos.testing.testcase import makeModuleSetUpAndTestCaseClass from slapos.testing.testcase import makeModuleSetUpAndTestCaseClass
...@@ -184,6 +185,23 @@ def test_sim_card(self): ...@@ -184,6 +185,23 @@ def test_sim_card(self):
p = p['_'] if '_' in p else p p = p['_'] if '_' in p else p
self.assertIn('info', 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): class TestENBParameters(ORSTestCase):
@classmethod @classmethod
def getInstanceParameterDict(cls): def getInstanceParameterDict(cls):
...@@ -263,6 +281,110 @@ def requestSlaveInstance(cls, software_type): ...@@ -263,6 +281,110 @@ def requestSlaveInstance(cls, software_type):
software_type=software_type, software_type=software_type,
) )
class TestEPCMonitorGadgetUrl(ORSTestCase):
@classmethod
def getInstanceParameterDict(cls):
return {'_': json.dumps({'testing': True})}
@classmethod
def getInstanceSoftwareType(cls):
return "epc"
def test_monitor_gadget_url(self):
self.slap.waitForInstance() # Wait until publish is done
test_monitor_gadget_url(self)
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):
self.slap.waitForInstance() # Wait until publish is done
test_monitor_gadget_url(self)
class TestENBEPCMonitorGadgetUrl(ORSTestCase):
@classmethod
def getInstanceParameterDict(cls):
return {'_': json.dumps(enb_param_dict)}
@classmethod
def getInstanceSoftwareType(cls):
return "enb-epc"
def test_monitor_gadget_url(self):
self.slap.waitForInstance() # Wait until publish is done
test_monitor_gadget_url(self)
class TestGNBEPCMonitorGadgetUrl(ORSTestCase):
@classmethod
def getInstanceParameterDict(cls):
return {'_': json.dumps(gnb_param_dict1)}
@classmethod
def getInstanceSoftwareType(cls):
return "gnb-epc"
def test_monitor_gadget_url(self):
self.slap.waitForInstance() # Wait until publish is done
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):
self.slap.waitForInstance() # Wait until publish is done
test_monitor_gadget_url(self)
class TestMMEMonitorGadgetUrl(ORSTestCase):
@classmethod
def getInstanceParameterDict(cls):
return {'_': json.dumps({'testing': True, 'slave-list': []})}
@classmethod
def getInstanceSoftwareType(cls):
return "mme"
def test_monitor_gadget_url(self):
self.slap.waitForInstance() # Wait until publish is done
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):
self.slap.waitForInstance() # Wait until publish is done
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):
self.slap.waitForInstance() # Wait until publish is done
test_monitor_gadget_url(self)
class TestEPCSimCard(ORSTestCase): class TestEPCSimCard(ORSTestCase):
@classmethod @classmethod
def requestDefaultInstance(cls, state='started'): def requestDefaultInstance(cls, state='started'):
......
...@@ -29,6 +29,7 @@ import os ...@@ -29,6 +29,7 @@ import os
import yaml import yaml
import json import json
import glob import glob
import requests
from slapos.testing.testcase import makeModuleSetUpAndTestCaseClass from slapos.testing.testcase import makeModuleSetUpAndTestCaseClass
...@@ -184,6 +185,23 @@ def test_sim_card(self): ...@@ -184,6 +185,23 @@ def test_sim_card(self):
p = p['_'] if '_' in p else p p = p['_'] if '_' in p else p
self.assertIn('info', 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): class TestENBParameters(ORSTestCase):
@classmethod @classmethod
def getInstanceParameterDict(cls): def getInstanceParameterDict(cls):
...@@ -263,6 +281,110 @@ def requestSlaveInstance(cls, software_type): ...@@ -263,6 +281,110 @@ def requestSlaveInstance(cls, software_type):
software_type=software_type, software_type=software_type,
) )
class TestEPCMonitorGadgetUrl(ORSTestCase):
@classmethod
def getInstanceParameterDict(cls):
return {'_': json.dumps({'testing': True})}
@classmethod
def getInstanceSoftwareType(cls):
return "epc"
def test_monitor_gadget_url(self):
self.slap.waitForInstance() # Wait until publish is done
test_monitor_gadget_url(self)
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):
self.slap.waitForInstance() # Wait until publish is done
test_monitor_gadget_url(self)
class TestENBEPCMonitorGadgetUrl(ORSTestCase):
@classmethod
def getInstanceParameterDict(cls):
return {'_': json.dumps(enb_param_dict)}
@classmethod
def getInstanceSoftwareType(cls):
return "enb-epc"
def test_monitor_gadget_url(self):
self.slap.waitForInstance() # Wait until publish is done
test_monitor_gadget_url(self)
class TestGNBEPCMonitorGadgetUrl(ORSTestCase):
@classmethod
def getInstanceParameterDict(cls):
return {'_': json.dumps(gnb_param_dict1)}
@classmethod
def getInstanceSoftwareType(cls):
return "gnb-epc"
def test_monitor_gadget_url(self):
self.slap.waitForInstance() # Wait until publish is done
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):
self.slap.waitForInstance() # Wait until publish is done
test_monitor_gadget_url(self)
class TestMMEMonitorGadgetUrl(ORSTestCase):
@classmethod
def getInstanceParameterDict(cls):
return {'_': json.dumps({'testing': True, 'slave-list': []})}
@classmethod
def getInstanceSoftwareType(cls):
return "mme"
def test_monitor_gadget_url(self):
self.slap.waitForInstance() # Wait until publish is done
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):
self.slap.waitForInstance() # Wait until publish is done
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):
self.slap.waitForInstance() # Wait until publish is done
test_monitor_gadget_url(self)
class TestEPCSimCard(ORSTestCase): class TestEPCSimCard(ORSTestCase):
@classmethod @classmethod
def requestDefaultInstance(cls, state='started'): def requestDefaultInstance(cls, state='started'):
......
...@@ -29,6 +29,7 @@ import os ...@@ -29,6 +29,7 @@ import os
import yaml import yaml
import json import json
import glob import glob
import requests
from slapos.testing.testcase import makeModuleSetUpAndTestCaseClass from slapos.testing.testcase import makeModuleSetUpAndTestCaseClass
...@@ -184,6 +185,23 @@ def test_sim_card(self): ...@@ -184,6 +185,23 @@ def test_sim_card(self):
p = p['_'] if '_' in p else p p = p['_'] if '_' in p else p
self.assertIn('info', 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): class TestENBParameters(ORSTestCase):
@classmethod @classmethod
def getInstanceParameterDict(cls): def getInstanceParameterDict(cls):
...@@ -263,6 +281,110 @@ def requestSlaveInstance(cls, software_type): ...@@ -263,6 +281,110 @@ def requestSlaveInstance(cls, software_type):
software_type=software_type, software_type=software_type,
) )
class TestEPCMonitorGadgetUrl(ORSTestCase):
@classmethod
def getInstanceParameterDict(cls):
return {'_': json.dumps({'testing': True})}
@classmethod
def getInstanceSoftwareType(cls):
return "epc"
def test_monitor_gadget_url(self):
self.slap.waitForInstance() # Wait until publish is done
test_monitor_gadget_url(self)
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):
self.slap.waitForInstance() # Wait until publish is done
test_monitor_gadget_url(self)
class TestENBEPCMonitorGadgetUrl(ORSTestCase):
@classmethod
def getInstanceParameterDict(cls):
return {'_': json.dumps(enb_param_dict)}
@classmethod
def getInstanceSoftwareType(cls):
return "enb-epc"
def test_monitor_gadget_url(self):
self.slap.waitForInstance() # Wait until publish is done
test_monitor_gadget_url(self)
class TestGNBEPCMonitorGadgetUrl(ORSTestCase):
@classmethod
def getInstanceParameterDict(cls):
return {'_': json.dumps(gnb_param_dict1)}
@classmethod
def getInstanceSoftwareType(cls):
return "gnb-epc"
def test_monitor_gadget_url(self):
self.slap.waitForInstance() # Wait until publish is done
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):
self.slap.waitForInstance() # Wait until publish is done
test_monitor_gadget_url(self)
class TestMMEMonitorGadgetUrl(ORSTestCase):
@classmethod
def getInstanceParameterDict(cls):
return {'_': json.dumps({'testing': True, 'slave-list': []})}
@classmethod
def getInstanceSoftwareType(cls):
return "mme"
def test_monitor_gadget_url(self):
self.slap.waitForInstance() # Wait until publish is done
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):
self.slap.waitForInstance() # Wait until publish is done
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):
self.slap.waitForInstance() # Wait until publish is done
test_monitor_gadget_url(self)
class TestEPCSimCard(ORSTestCase): class TestEPCSimCard(ORSTestCase):
@classmethod @classmethod
def requestDefaultInstance(cls, state='started'): def requestDefaultInstance(cls, state='started'):
......
...@@ -29,6 +29,7 @@ import os ...@@ -29,6 +29,7 @@ import os
import yaml import yaml
import json import json
import glob import glob
import requests
from slapos.testing.testcase import makeModuleSetUpAndTestCaseClass from slapos.testing.testcase import makeModuleSetUpAndTestCaseClass
...@@ -184,6 +185,23 @@ def test_sim_card(self): ...@@ -184,6 +185,23 @@ def test_sim_card(self):
p = p['_'] if '_' in p else p p = p['_'] if '_' in p else p
self.assertIn('info', 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): class TestENBParameters(ORSTestCase):
@classmethod @classmethod
def getInstanceParameterDict(cls): def getInstanceParameterDict(cls):
...@@ -263,6 +281,110 @@ def requestSlaveInstance(cls, software_type): ...@@ -263,6 +281,110 @@ def requestSlaveInstance(cls, software_type):
software_type=software_type, software_type=software_type,
) )
class TestEPCMonitorGadgetUrl(ORSTestCase):
@classmethod
def getInstanceParameterDict(cls):
return {'_': json.dumps({'testing': True})}
@classmethod
def getInstanceSoftwareType(cls):
return "epc"
def test_monitor_gadget_url(self):
self.slap.waitForInstance() # Wait until publish is done
test_monitor_gadget_url(self)
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):
self.slap.waitForInstance() # Wait until publish is done
test_monitor_gadget_url(self)
class TestENBEPCMonitorGadgetUrl(ORSTestCase):
@classmethod
def getInstanceParameterDict(cls):
return {'_': json.dumps(enb_param_dict)}
@classmethod
def getInstanceSoftwareType(cls):
return "enb-epc"
def test_monitor_gadget_url(self):
self.slap.waitForInstance() # Wait until publish is done
test_monitor_gadget_url(self)
class TestGNBEPCMonitorGadgetUrl(ORSTestCase):
@classmethod
def getInstanceParameterDict(cls):
return {'_': json.dumps(gnb_param_dict1)}
@classmethod
def getInstanceSoftwareType(cls):
return "gnb-epc"
def test_monitor_gadget_url(self):
self.slap.waitForInstance() # Wait until publish is done
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):
self.slap.waitForInstance() # Wait until publish is done
test_monitor_gadget_url(self)
class TestMMEMonitorGadgetUrl(ORSTestCase):
@classmethod
def getInstanceParameterDict(cls):
return {'_': json.dumps({'testing': True, 'slave-list': []})}
@classmethod
def getInstanceSoftwareType(cls):
return "mme"
def test_monitor_gadget_url(self):
self.slap.waitForInstance() # Wait until publish is done
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):
self.slap.waitForInstance() # Wait until publish is done
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):
self.slap.waitForInstance() # Wait until publish is done
test_monitor_gadget_url(self)
class TestEPCSimCard(ORSTestCase): class TestEPCSimCard(ORSTestCase):
@classmethod @classmethod
def requestDefaultInstance(cls, state='started'): def requestDefaultInstance(cls, state='started'):
......
...@@ -29,6 +29,7 @@ import os ...@@ -29,6 +29,7 @@ import os
import yaml import yaml
import json import json
import glob import glob
import requests
from slapos.testing.testcase import makeModuleSetUpAndTestCaseClass from slapos.testing.testcase import makeModuleSetUpAndTestCaseClass
...@@ -184,6 +185,23 @@ def test_sim_card(self): ...@@ -184,6 +185,23 @@ def test_sim_card(self):
p = p['_'] if '_' in p else p p = p['_'] if '_' in p else p
self.assertIn('info', 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): class TestENBParameters(ORSTestCase):
@classmethod @classmethod
def getInstanceParameterDict(cls): def getInstanceParameterDict(cls):
...@@ -263,6 +281,110 @@ def requestSlaveInstance(cls, software_type): ...@@ -263,6 +281,110 @@ def requestSlaveInstance(cls, software_type):
software_type=software_type, software_type=software_type,
) )
class TestEPCMonitorGadgetUrl(ORSTestCase):
@classmethod
def getInstanceParameterDict(cls):
return {'_': json.dumps({'testing': True})}
@classmethod
def getInstanceSoftwareType(cls):
return "epc"
def test_monitor_gadget_url(self):
self.slap.waitForInstance() # Wait until publish is done
test_monitor_gadget_url(self)
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):
self.slap.waitForInstance() # Wait until publish is done
test_monitor_gadget_url(self)
class TestENBEPCMonitorGadgetUrl(ORSTestCase):
@classmethod
def getInstanceParameterDict(cls):
return {'_': json.dumps(enb_param_dict)}
@classmethod
def getInstanceSoftwareType(cls):
return "enb-epc"
def test_monitor_gadget_url(self):
self.slap.waitForInstance() # Wait until publish is done
test_monitor_gadget_url(self)
class TestGNBEPCMonitorGadgetUrl(ORSTestCase):
@classmethod
def getInstanceParameterDict(cls):
return {'_': json.dumps(gnb_param_dict1)}
@classmethod
def getInstanceSoftwareType(cls):
return "gnb-epc"
def test_monitor_gadget_url(self):
self.slap.waitForInstance() # Wait until publish is done
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):
self.slap.waitForInstance() # Wait until publish is done
test_monitor_gadget_url(self)
class TestMMEMonitorGadgetUrl(ORSTestCase):
@classmethod
def getInstanceParameterDict(cls):
return {'_': json.dumps({'testing': True, 'slave-list': []})}
@classmethod
def getInstanceSoftwareType(cls):
return "mme"
def test_monitor_gadget_url(self):
self.slap.waitForInstance() # Wait until publish is done
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):
self.slap.waitForInstance() # Wait until publish is done
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):
self.slap.waitForInstance() # Wait until publish is done
test_monitor_gadget_url(self)
class TestEPCSimCard(ORSTestCase): class TestEPCSimCard(ORSTestCase):
@classmethod @classmethod
def requestDefaultInstance(cls, state='started'): def requestDefaultInstance(cls, state='started'):
......
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