Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Titouan Soulard
slapos
Commits
ffebd58a
Commit
ffebd58a
authored
Sep 07, 2023
by
Lu Xu
👀
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sw upgrading wip
parent
e6fe524e
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
40 additions
and
11 deletions
+40
-11
software/ors-amarisoft/buildout.hash.cfg
software/ors-amarisoft/buildout.hash.cfg
+3
-3
software/ors-amarisoft/instance-enb-input-schema.json.jinja2
software/ors-amarisoft/instance-enb-input-schema.json.jinja2
+10
-0
software/ors-amarisoft/instance-enb.jinja2.cfg
software/ors-amarisoft/instance-enb.jinja2.cfg
+2
-0
software/ors-amarisoft/instance-fdd-enb-input-schema.json
software/ors-amarisoft/instance-fdd-enb-input-schema.json
+10
-0
software/ors-amarisoft/lopcomm-rrh-software.jinja2.py
software/ors-amarisoft/lopcomm-rrh-software.jinja2.py
+15
-8
No files found.
software/ors-amarisoft/buildout.hash.cfg
View file @
ffebd58a
...
...
@@ -28,7 +28,7 @@ md5sum = c930c28365c685a6066f382c9b5d8893
[ncclient_common]
_update_hash_filename_ = ncclient_common.py
md5sum =
8f8b4a45e300f2caa3a5261d47a88639
md5sum =
bd2866db984fdf24605d2d60abbe807a
[lopcomm-rrh-stats.jinja2.py]
_update_hash_filename_ = lopcomm-rrh-stats.jinja2.py
...
...
@@ -40,11 +40,11 @@ md5sum = 20764fa7554d90d040f3847a9573ef93
[lopcomm-rrh-software.jinja2.py]
_update_hash_filename_ = lopcomm-rrh-software.jinja2.py
md5sum =
1dab59eec5b5df9869ea16d2c68e85b0
md5sum =
673516819477d924f94315ffc734a1cc
[template-enb]
_update_hash_filename_ = instance-enb.jinja2.cfg
md5sum = d
be9dd2e7b0d84bcef3a3c7f217d9d6d
md5sum = d
33c06a2bc32796af4fa3064380d2544
[template-gnb]
_update_hash_filename_ = instance-gnb.jinja2.cfg
...
...
software/ors-amarisoft/instance-enb-input-schema.json.jinja2
View file @
ffebd58a
...
...
@@ -118,6 +118,16 @@
"textarea": true,
"type": "string"
},
"customised_download_rpc_xml": {
"title": "Firmware Download XML",
"description": "Customised firmware download XML",
"type": "string"
},
"firmware_name": {
"title": "Lopcomm Firmware Name",
"description": "Lopcomm firmware name. It is used to compare the current running version.",
"type": "string"
},
{%- endif %}
"log_phy_debug": {
"title": "Physical layer log debug",
...
...
software/ors-amarisoft/instance-enb.jinja2.cfg
View file @
ffebd58a
...
...
@@ -231,6 +231,7 @@ 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
software-json-log-output = ${directory:var}/log/lopcomm-rrh-software.json.log
remote-file-path = sftp://${user-info:pw-name}@[${slap-configuration:ipv6-random}]:${sshd-port:port}/etc
context =
section directory directory
section slap_configuration slap-configuration
...
...
@@ -244,6 +245,7 @@ context =
raw testing {{ slapparameter_dict.get("testing", False) }}
raw python_path {{ buildout_directory }}/bin/pythonwitheggs
raw buildout_directory_path {{ buildout_directory }}
raw remote_file_path {{ remote-file-path }}
import netaddr netaddr
mode = 0775
url = {{ lopcomm_rrh_stats_template }}
...
...
software/ors-amarisoft/instance-fdd-enb-input-schema.json
View file @
ffebd58a
...
...
@@ -117,6 +117,16 @@
"textarea"
:
true
,
"type"
:
"string"
},
"customised_download_rpc_xml"
:
{
"title"
:
"Firmware Download XML"
,
"description"
:
"Customised firmware download XML"
,
"type"
:
"string"
},
"firmware_name"
:
{
"title"
:
"Lopcomm Firmware Name"
,
"description"
:
"Lopcomm firmware name. It is used to compare the current running version."
,
"type"
:
"string"
},
"log_phy_debug"
:
{
"title"
:
"Physical layer log debug"
,
"description"
:
"Enable debug mode for physical layer logs"
,
...
...
software/ors-amarisoft/lopcomm-rrh-software.jinja2.py
View file @
ffebd58a
...
...
@@ -26,19 +26,26 @@ if __name__ == '__main__':
if
running_slot_name
and
nonrunning_slot_name
:
if
running_slot_name
:
nc
.
logger
.
info
(
"One slot is running and one is non-running. Proceeding..."
)
if
running_slot_name_build_version
in
"{{ firmware_name }}"
:
{
%
if
slapparameter_dict
.
get
(
'customised_download_rpc_xml'
)
%
}
{
%
set
firmware_name
=
slapparameter_dict
.
get
(
'firmware_name'
)
%
}
{
%
else
%
}
{
%
set
firmware_name
=
"{{ firmware_name }}"
%
}
{
%
endif
%
}
if
running_slot_name_build_version
in
firmware_name
:
nc
.
logger
.
info
(
"Running slot's build-version %s is already updated. Skipping install."
%
running_slot_name_build_version
)
else
:
nc
.
logger
.
info
(
"Current build version: %s"
%
running_slot_name_build_version
)
{
%
if
slapparameter_dict
.
get
(
'customised_download_rpc_xml'
)
%
}
download_rpc_xml
=
f"""
{{ slapparameter_dict.get('customised_download_rpc_xml') }}
"""
{
%
else
%
}
download_rpc_xml
=
f"""
<software-download xmlns="urn:o-ran:software-management:1.0">
<remote-file-path>sftp://test@[2a11:9ac1:6::1]:/home/test/{{ firmware_name }}</remote-file-path>
<password>
<password>123456</password>
</password>
<remote-file-path>{{ remote_file_path }}/
{
firmware_name
}
</remote-file-path>
</software-download>
"""
{
%
endif
%
}
download_reply_xml
=
nc
.
custom_rpc_request
(
download_rpc_xml
)
if
download_reply_xml
:
download_data
=
xmltodict
.
parse
(
download_reply_xml
)
...
...
@@ -47,7 +54,7 @@ if __name__ == '__main__':
install_rpc_xml
=
f"""
<software-install xmlns="urn:o-ran:software-management:1.0">
<slot-name>
{
nonrunning_slot_name
}
</slot-name>
<file-names>{
{ firmware_name }
}</file-names>
<file-names>
{
firmware_name
}
</file-names>
</software-install>
"""
install_reply_xml
=
nc
.
custom_rpc_request
(
install_rpc_xml
)
...
...
@@ -66,7 +73,7 @@ if __name__ == '__main__':
nc
.
software_reply_json_logger
.
info
(
''
,
extra
=
{
'data'
:
activate_data
})
nc
.
get_inventory
()
if
nonrunning_slot_name_build_version
in
"{{ firmware_name }}"
and
active_nonrunning_slot_name
:
if
nonrunning_slot_name_build_version
in
firmware_name
and
active_nonrunning_slot_name
:
nc
.
logger
.
info
(
"Active non-running slot has the updated build version. Resetting device."
)
nc
.
reset_device
()
break
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment