Commit 016d417a authored by Lu Xu's avatar Lu Xu 👀 Committed by Joanne Hugé

software/ors-amarisoft: Update lopcomm config

- activate cu_config_link parameter
- update cu-config.xml
- add supervision log and nc session log
parent fe8fb0cc
...@@ -28,7 +28,7 @@ md5sum = c930c28365c685a6066f382c9b5d8893 ...@@ -28,7 +28,7 @@ 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 = 6d6cc0c311ff4fe807e919ce3cb3d0d8 md5sum = f0451b3c2494f103042bda04433c943d
[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
...@@ -36,7 +36,7 @@ md5sum = b34fe47a73890097fbc6ea6374aeb38d ...@@ -36,7 +36,7 @@ md5sum = b34fe47a73890097fbc6ea6374aeb38d
[template-enb] [template-enb]
_update_hash_filename_ = instance-enb.jinja2.cfg _update_hash_filename_ = instance-enb.jinja2.cfg
md5sum = 8b6e778ec21e03ef3f832ee420d7e83a md5sum = 3c3f65517979cae3d46c560daeba886d
[template-gnb] [template-gnb]
_update_hash_filename_ = instance-gnb.jinja2.cfg _update_hash_filename_ = instance-gnb.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 = edd54bb35c13526291924de8d1d3b795 md5sum = 39ef850c68ea6cb1282176e718819c4a
[software.cfg.html] [software.cfg.html]
_update_hash_filename_ = gadget/software.cfg.html _update_hash_filename_ = gadget/software.cfg.html
......
...@@ -104,6 +104,15 @@ version = {{ slapparameter_dict.get("enb_config_version") }} ...@@ -104,6 +104,15 @@ version = {{ slapparameter_dict.get("enb_config_version") }}
offline = false offline = false
{% endif %} {% endif %}
{% if slapparameter_dict.get("cu_config_link", None) %}
[cu-config-dl]
recipe = slapos.recipe.build:download
url = {{ slapparameter_dict.get("cu_config_link") }}
version = {{ slapparameter_dict.get("cu_config_version") }}
offline = false
{% endif %}
[enb-sh-wrapper] [enb-sh-wrapper]
recipe = slapos.recipe.template recipe = slapos.recipe.template
output = ${directory:bin}/${:_buildout_section_name_} output = ${directory:bin}/${:_buildout_section_name_}
...@@ -252,6 +261,8 @@ extensions = jinja2.ext.do ...@@ -252,6 +261,8 @@ 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 cfg-json-log-output = ${directory:var}/log/lopcomm-rrh-config.json.log
supervision-json-log-output = ${directory:var}/log/lopcomm-rrh-supervision.json.log
ncsession-json-log-output = ${directory:var}/log/lopcomm-rrh-ncsession.json.log
context = context =
section directory directory section directory directory
section slap_configuration slap-configuration section slap_configuration slap-configuration
...@@ -259,6 +270,8 @@ context = ...@@ -259,6 +270,8 @@ context =
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 key cfg_json_log_file :cfg-json-log-output
key supervision_json_log_file :supervision-json-log-output
key ncsession_json_log_file :ncsession-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
import netaddr netaddr import netaddr netaddr
...@@ -268,7 +281,11 @@ output = ${directory:bin}/lopcomm-rrh-stats.py ...@@ -268,7 +281,11 @@ output = ${directory:bin}/lopcomm-rrh-stats.py
[lopcomm-cu-config] [lopcomm-cu-config]
<= config-base <= config-base
{% if slapparameter_dict.get("cu_config_link", None) %}
url = ${enb-config-dl:target}
{% else %}
url = {{ cu_config_template }} url = {{ cu_config_template }}
{% endif %}
output = ${directory:etc}/cu_config.xml output = ${directory:etc}/cu_config.xml
[lopcomm-rrh-config-template] [lopcomm-rrh-config-template]
......
...@@ -15,13 +15,19 @@ class LopcommNetconfClient: ...@@ -15,13 +15,19 @@ 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 }}" cfg_json_log_file = "{{ cfg_json_log_file }}"
supervision_json_log_file = "{{ supervision_json_log_file }}"
ncsession_json_log_file = "{{ ncsession_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.cfg_json_logger = logging.getLogger('cfg_json_logger')
self.supervision_json_logger = logging.getLogger('supervision_json_logger')
self.ncsession_json_logger = logging.getLogger('ncsession_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) self.cfg_json_logger.setLevel(logging.DEBUG)
self.supervision_json_logger.setLevel(logging.DEBUG)
self.ncsession_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}')
...@@ -33,6 +39,16 @@ class LopcommNetconfClient: ...@@ -33,6 +39,16 @@ class LopcommNetconfClient:
cfg_json_handler.setFormatter(cfg_json_formatter) cfg_json_handler.setFormatter(cfg_json_formatter)
self.cfg_json_logger.addHandler(cfg_json_handler) self.cfg_json_logger.addHandler(cfg_json_handler)
supervision_json_handler = RotatingFileHandler(supervision_json_log_file, maxBytes=100000, backupCount=5)
supervision_json_formatter = logging.Formatter('{"time": "%(asctime)s", "log_level": "%(levelname)s", "message": "%(message)s", "data": %(data)s}')
supervision_json_handler.setFormatter(supervision_json_formatter)
self.supervision_json_logger.addHandler(supervision_json_handler)
ncsession_json_handler = RotatingFileHandler(ncsession_json_log_file, maxBytes=100000, backupCount=5)
ncsession_json_formatter = logging.Formatter('{"time": "%(asctime)s", "log_level": "%(levelname)s", "message": "%(message)s", "data": %(data)s}')
ncsession_json_handler.setFormatter(ncsession_json_formatter)
self.ncsession_json_logger.addHandler(ncsession_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")
...@@ -81,6 +97,10 @@ class LopcommNetconfClient: ...@@ -81,6 +97,10 @@ class LopcommNetconfClient:
data_dict = xmltodict.parse(result_in_xml) data_dict = xmltodict.parse(result_in_xml)
if 'alarm-notif' in data_dict['notification']: if 'alarm-notif' in data_dict['notification']:
self.json_logger.info('', extra={'data': data_dict}) self.json_logger.info('', extra={'data': data_dict})
elif 'supervision-notification' in data_dict['notification']:
self.supervision_json_logger.info('', extra={'data': data_dict})
elif 'netconf-session-start' or 'netconf-session-end' in data_dict['notification']:
self.ncsession_json_logger.info('', extra={'data': data_dict})
else: else:
self.cfg_json_logger.info('', extra={'data': data_dict}) self.cfg_json_logger.info('', extra={'data': data_dict})
......
<config xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> <config xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<!-- low-level-t[r]x-links --> <user-plane-configuration xmlns="urn:o-ran:uplane-conf-option8:1.0">
<low-level-tx-links> <!-- t[r]x-links -->
<tx-links>
<name>TXA0P00C00</name> <name>TXA0P00C00</name>
<processing-element>PE0</processing-element> <processing-element>PE0</processing-element>
<tx-array-carrier>TXA0CC00</tx-array-carrier> <tx-array-carrier>TXA0CC00</tx-array-carrier>
<low-level-tx-endpoint>TXA0P00C00</low-level-tx-endpoint> <tx-endpoint>TXA0P00C00</tx-endpoint>
</low-level-tx-links> </tx-links>
<low-level-tx-links> <tx-links>
<name>TXA0P01C00</name> <name>TXA0P01C00</name>
<processing-element>PE0</processing-element> <processing-element>PE0</processing-element>
<tx-array-carrier>TXA0CC00</tx-array-carrier> <tx-array-carrier>TXA0CC00</tx-array-carrier>
<low-level-tx-endpoint>TXA0P01C00</low-level-tx-endpoint> <tx-endpoint>TXA0P01C00</tx-endpoint>
</low-level-tx-links> </tx-links>
<low-level-tx-links> <rx-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>
<name>RXA0P00C00</name> <name>RXA0P00C00</name>
<processing-element>PE0</processing-element> <processing-element>PE0</processing-element>
<rx-array-carrier>RXA0CC00</rx-array-carrier> <rx-array-carrier>RXA0CC00</rx-array-carrier>
<low-level-rx-endpoint>RXA0P00C00</low-level-rx-endpoint> <rx-endpoint>RXA0P00C00</rx-endpoint>
</low-level-rx-links> </rx-links>
<low-level-rx-links> <rx-links>
<name>PRACH0P00C00</name> <name>PRACH0P00C00</name>
<processing-element>PE0</processing-element> <processing-element>PE0</processing-element>
<rx-array-carrier>RXA0CC00</rx-array-carrier> <rx-array-carrier>RXA0CC00</rx-array-carrier>
<low-level-rx-endpoint>PRACH0P00C00</low-level-rx-endpoint> <rx-endpoint>PRACH0P00C00</rx-endpoint>
</low-level-rx-links> </rx-links>
<low-level-rx-links> <rx-links>
<name>RXA0P01C00</name> <name>RXA0P01C00</name>
<processing-element>PE0</processing-element> <processing-element>PE0</processing-element>
<rx-array-carrier>RXA0CC00</rx-array-carrier> <rx-array-carrier>RXA0CC00</rx-array-carrier>
<low-level-rx-endpoint>RXA0P01C00</low-level-rx-endpoint> <rx-endpoint>RXA0P01C00</rx-endpoint>
</low-level-rx-links> </rx-links>
<low-level-rx-links> <rx-links>
<name>PRACH0P01C00</name> <name>PRACH0P01C00</name>
<processing-element>PE0</processing-element> <processing-element>PE0</processing-element>
<rx-array-carrier>RXA0CC00</rx-array-carrier> <rx-array-carrier>RXA0CC00</rx-array-carrier>
<low-level-rx-endpoint>PRACH0P01C00</low-level-rx-endpoint> <rx-endpoint>PRACH0P01C00</rx-endpoint>
</low-level-rx-links> </rx-links>
<low-level-rx-links> <!-- t[r]x-endpoints -->
<name>RXA0P02C00</name> <tx-endpoints>
<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-tx-endpoints>
<name>TXA0P00C00</name> <name>TXA0P00C00</name>
<e-axcid> <e-axcid>
<o-du-port-bitmask>61440</o-du-port-bitmask> <o-du-port-bitmask>61440</o-du-port-bitmask>
...@@ -84,8 +47,8 @@ ...@@ -84,8 +47,8 @@
<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>
</low-level-tx-endpoints> </tx-endpoints>
<low-level-tx-endpoints> <tx-endpoints>
<name>TXA0P01C00</name> <name>TXA0P01C00</name>
<e-axcid> <e-axcid>
<o-du-port-bitmask>61440</o-du-port-bitmask> <o-du-port-bitmask>61440</o-du-port-bitmask>
...@@ -94,29 +57,8 @@ ...@@ -94,29 +57,8 @@
<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>
</low-level-tx-endpoints> </tx-endpoints>
<low-level-tx-endpoints> <rx-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>
<name>RXA0P00C00</name> <name>RXA0P00C00</name>
<e-axcid> <e-axcid>
<o-du-port-bitmask>61440</o-du-port-bitmask> <o-du-port-bitmask>61440</o-du-port-bitmask>
...@@ -126,8 +68,8 @@ ...@@ -126,8 +68,8 @@
<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> <non-time-managed-delay-enabled>false</non-time-managed-delay-enabled>
</low-level-rx-endpoints> </rx-endpoints>
<low-level-rx-endpoints> <rx-endpoints>
<name>PRACH0P00C00</name> <name>PRACH0P00C00</name>
<e-axcid> <e-axcid>
<o-du-port-bitmask>61440</o-du-port-bitmask> <o-du-port-bitmask>61440</o-du-port-bitmask>
...@@ -137,8 +79,8 @@ ...@@ -137,8 +79,8 @@
<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> <non-time-managed-delay-enabled>false</non-time-managed-delay-enabled>
</low-level-rx-endpoints> </rx-endpoints>
<low-level-rx-endpoints> <rx-endpoints>
<name>RXA0P01C00</name> <name>RXA0P01C00</name>
<e-axcid> <e-axcid>
<o-du-port-bitmask>61440</o-du-port-bitmask> <o-du-port-bitmask>61440</o-du-port-bitmask>
...@@ -148,8 +90,8 @@ ...@@ -148,8 +90,8 @@
<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> <non-time-managed-delay-enabled>false</non-time-managed-delay-enabled>
</low-level-rx-endpoints> </rx-endpoints>
<low-level-rx-endpoints> <rx-endpoints>
<name>PRACH0P01C00</name> <name>PRACH0P01C00</name>
<e-axcid> <e-axcid>
<o-du-port-bitmask>61440</o-du-port-bitmask> <o-du-port-bitmask>61440</o-du-port-bitmask>
...@@ -159,52 +101,7 @@ ...@@ -159,52 +101,7 @@
<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> <non-time-managed-delay-enabled>false</non-time-managed-delay-enabled>
</low-level-rx-endpoints> </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>
<!-- t[r]x-array-carriers --> <!-- t[r]x-array-carriers -->
<tx-array-carriers> <tx-array-carriers>
<name>TXA0CC00</name> <name>TXA0CC00</name>
...@@ -214,7 +111,7 @@ ...@@ -214,7 +111,7 @@
<active>{{ slapparameter_dict.get('txa0cc00_active', 'INACTIVE') }}</active> <active>{{ slapparameter_dict.get('txa0cc00_active', 'INACTIVE') }}</active>
<rw-type>LTE</rw-type> <rw-type>LTE</rw-type>
<rw-duplex-scheme>FDD</rw-duplex-scheme> <rw-duplex-scheme>FDD</rw-duplex-scheme>
<gain>50</gain> <gain>0</gain>
<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>
</tx-array-carriers> </tx-array-carriers>
...@@ -229,4 +126,5 @@ ...@@ -229,4 +126,5 @@
<gain-correction>0.0</gain-correction> <gain-correction>0.0</gain-correction>
<n-ta-offset>0</n-ta-offset> <n-ta-offset>0</n-ta-offset>
</rx-array-carriers> </rx-array-carriers>
</user-plane-configuration>
</config> </config>
\ No newline at end of file
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