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
689b4eee
Commit
689b4eee
authored
Sep 08, 2023
by
Lu Xu
👀
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
firmware 1004
parent
99b96054
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
9 additions
and
57 deletions
+9
-57
software/ors-amarisoft/buildout.hash.cfg
software/ors-amarisoft/buildout.hash.cfg
+2
-2
software/ors-amarisoft/instance-enb-input-schema.json.jinja2
software/ors-amarisoft/instance-enb-input-schema.json.jinja2
+0
-15
software/ors-amarisoft/instance-enb.jinja2.cfg
software/ors-amarisoft/instance-enb.jinja2.cfg
+3
-3
software/ors-amarisoft/instance-fdd-enb-input-schema.json
software/ors-amarisoft/instance-fdd-enb-input-schema.json
+0
-15
software/ors-amarisoft/lopcomm-rrh-software.jinja2.py
software/ors-amarisoft/lopcomm-rrh-software.jinja2.py
+4
-22
No files found.
software/ors-amarisoft/buildout.hash.cfg
View file @
689b4eee
...
...
@@ -40,11 +40,11 @@ md5sum = 20764fa7554d90d040f3847a9573ef93
[lopcomm-rrh-software.jinja2.py]
_update_hash_filename_ = lopcomm-rrh-software.jinja2.py
md5sum =
126641b08c026206d8728a20135eb96
4
md5sum =
68f84ba07ca933f83671989f8d9a08f
4
[template-enb]
_update_hash_filename_ = instance-enb.jinja2.cfg
md5sum =
d33c06a2bc32796af4fa3064380d2544
md5sum =
3d9e8750dee109ffbf449e2ce9c72747
[template-gnb]
_update_hash_filename_ = instance-gnb.jinja2.cfg
...
...
software/ors-amarisoft/instance-enb-input-schema.json.jinja2
View file @
689b4eee
...
...
@@ -118,21 +118,6 @@
"textarea": true,
"type": "string"
},
"sftp_remote_file_path": {
"title": "SFTP Remote file path",
"description": "SFTP Remote file path. e.g. sftp://user@ip_address:port:/path/to/file",
"type": "string"
},
"sftp_remote_file_path_password": {
"title": "SFTP Remote file path password",
"description": "SFTP Remote file path password",
"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 @
689b4eee
...
...
@@ -325,9 +325,9 @@ hash-files =
[lopcomm-firmware-dl]
recipe = slapos.recipe.build:download
url = https://lab.nexedi.com/nexedi/ors-utils/raw/master/lopcomm-firmware/
PR.PRM61C70V1003.tar.gz
filename = PR.PRM61C70V100
3
.tar.gz
md5sum =
0d07cf68b1364df4e160ed7d2a45d272
url = https://lab.nexedi.com/nexedi/ors-utils/raw/master/lopcomm-firmware/
${:filename}
filename = PR.PRM61C70V100
4.002
.tar.gz
md5sum =
4e06fd62968f9f53fd819ef8d880a8f4
destination = ${directory:etc}/${:filename}
offline = false
...
...
software/ors-amarisoft/instance-fdd-enb-input-schema.json
View file @
689b4eee
...
...
@@ -117,21 +117,6 @@
"textarea"
:
true
,
"type"
:
"string"
},
"sftp_remote_file_path"
:
{
"title"
:
"SFTP Remote file path"
,
"description"
:
"SFTP Remote file path. e.g. sftp://user@ip_address:port:/path/to/file"
,
"type"
:
"string"
},
"sftp_remote_file_path_password"
:
{
"title"
:
"SFTP Remote file path password"
,
"description"
:
"SFTP Remote file path password"
,
"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 @
689b4eee
...
...
@@ -26,33 +26,15 @@ 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
slapparameter_dict
.
get
(
'sftp_remote_file_path'
)
%
}
{
%
set
firmware_name
=
slapparameter_dict
.
get
(
'firmware_name'
)
%
}
{
%
set
remote_file_path
=
slapparameter_dict
.
get
(
'sftp_remote_file_path'
)
%
}
{
%
else
%
}
{
%
set
firmware_name
=
"{{ firmware_name }}"
%
}
{
%
set
remote_file_path
=
{{
remote_file_path
}}
%
}
{
%
endif
%
}
if
running_slot_name_build_version
in
firmware_name
:
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
(
'sftp_remote_file_path'
)
%
}
download_rpc_xml
=
f"""
<software-download xmlns="urn:o-ran:software-management:1.0">
<remote-file-path>
{
remote_file_path
}
/
{
firmware_name
}
</remote-file-path>
<password>
<password>{{slapparameter_dict.get('sftp_remote_file_path_password')}}</password>
</password>
<remote-file-path>{{remote_file_path}}/{{firmware_name}}</remote-file-path>
</software-download>
"""
{
%
else
%
}
download_rpc_xml
=
f"""
<software-download xmlns="urn:o-ran:software-management:1.0">
<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
)
...
...
@@ -61,7 +43,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
)
...
...
@@ -80,7 +62,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