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
Labels
Merge Requests
104
Merge Requests
104
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
slapos
Commits
51fa921f
Commit
51fa921f
authored
Nov 29, 2024
by
Joanne Hugé
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
simpleran: fix amarisoft-rf-info.jinja2.py
parent
7b2d6349
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
4 deletions
+19
-4
software/simpleran/buildout.hash.cfg
software/simpleran/buildout.hash.cfg
+3
-3
software/simpleran/ru/amarisoft-rf-info.jinja2.py
software/simpleran/ru/amarisoft-rf-info.jinja2.py
+14
-1
software/simpleran/ru/amarisoft-stats.jinja2.py
software/simpleran/ru/amarisoft-stats.jinja2.py
+1
-0
software/simpleran/ru/libinstance.jinja2.cfg
software/simpleran/ru/libinstance.jinja2.cfg
+1
-0
No files found.
software/simpleran/buildout.hash.cfg
View file @
51fa921f
...
@@ -28,15 +28,15 @@ md5sum = 8d6eb90fc1191c3a1b24200df2ebf4fa
...
@@ -28,15 +28,15 @@ md5sum = 8d6eb90fc1191c3a1b24200df2ebf4fa
[ru_amarisoft-stats.jinja2.py]
[ru_amarisoft-stats.jinja2.py]
_update_hash_filename_ = ru/amarisoft-stats.jinja2.py
_update_hash_filename_ = ru/amarisoft-stats.jinja2.py
md5sum =
31b609f80a82b6efed963161c8907878
md5sum =
9075f5d5d6d453d02b4f284b7edabe41
[ru_amarisoft-rf-info.jinja2.py]
[ru_amarisoft-rf-info.jinja2.py]
_update_hash_filename_ = ru/amarisoft-rf-info.jinja2.py
_update_hash_filename_ = ru/amarisoft-rf-info.jinja2.py
md5sum =
93a5e07a763b619747255b4e03b50bbe
md5sum =
a1ccf6143b7441cbe76db4d91f762037
[ru_libinstance.jinja2.cfg]
[ru_libinstance.jinja2.cfg]
_update_hash_filename_ = ru/libinstance.jinja2.cfg
_update_hash_filename_ = ru/libinstance.jinja2.cfg
md5sum =
f0d7d38ef486f5be44020c3d5ce2a94f
md5sum =
e436824a4325636fcd479b9711a94044
[ru_sdr_libinstance.jinja2.cfg]
[ru_sdr_libinstance.jinja2.cfg]
_update_hash_filename_ = ru/sdr/libinstance.jinja2.cfg
_update_hash_filename_ = ru/sdr/libinstance.jinja2.cfg
...
...
software/simpleran/ru/amarisoft-rf-info.jinja2.py
View file @
51fa921f
...
@@ -21,7 +21,20 @@ class enbWebSocket:
...
@@ -21,7 +21,20 @@ class enbWebSocket:
if
{{
testing
}}:
if
{{
testing
}}:
return
return
self
.
ws
=
create_connection
(
"{{ ws_url }}"
)
self
.
ws_url
=
"{{ ws_url }}"
self
.
ws_password
=
"{{ ws_password }}"
self
.
ws
=
create_connection
(
self
.
ws_url
)
# Password authentication
data
=
json
.
loads
(
self
.
ws
.
recv
())
res
=
hmac
.
new
(
"{}:{}:{}"
.
format
(
data
[
'type'
],
self
.
ws_password
,
data
[
'name'
]).
encode
(),
msg
=
data
[
'challenge'
].
encode
(),
digestmod
=
hashlib
.
sha256
).
hexdigest
()
msg
=
{
"message"
:
"authenticate"
,
"res"
:
res
}
self
.
ws
.
send
(
json
.
dumps
(
msg
))
self
.
ws
.
recv
()
def
close
(
self
):
def
close
(
self
):
if
{{
testing
}}:
if
{{
testing
}}:
...
...
software/simpleran/ru/amarisoft-stats.jinja2.py
View file @
51fa921f
...
@@ -27,6 +27,7 @@ class enbWebSocket:
...
@@ -27,6 +27,7 @@ class enbWebSocket:
self
.
ws_password
=
"{{ ws_password }}"
self
.
ws_password
=
"{{ ws_password }}"
self
.
ws
=
create_connection
(
self
.
ws_url
)
self
.
ws
=
create_connection
(
self
.
ws_url
)
# Password authentication
data
=
json
.
loads
(
self
.
ws
.
recv
())
data
=
json
.
loads
(
self
.
ws
.
recv
())
res
=
hmac
.
new
(
res
=
hmac
.
new
(
"{}:{}:{}"
.
format
(
data
[
'type'
],
self
.
ws_password
,
data
[
'name'
]).
encode
(),
"{}:{}:{}"
.
format
(
data
[
'type'
],
self
.
ws_password
,
data
[
'name'
]).
encode
(),
...
...
software/simpleran/ru/libinstance.jinja2.cfg
View file @
51fa921f
...
@@ -328,6 +328,7 @@ context =
...
@@ -328,6 +328,7 @@ context =
key log_file :log-output
key log_file :log-output
raw stats_period {{ slapparameter_dict.get("enb_stats_fetch_period", 60) }}
raw stats_period {{ slapparameter_dict.get("enb_stats_fetch_period", 60) }}
raw testing {{ testing }}
raw testing {{ testing }}
raw ws_password ${websocket-password:passwd}
raw ws_url ws://{{ slapparameter_dict.com_addr }}:{{ slapparameter_dict.com_ws_port }}
raw ws_url ws://{{ slapparameter_dict.com_addr }}:{{ slapparameter_dict.com_ws_port }}
raw python_path {{ buildout_directory}}/bin/pythonwitheggs
raw python_path {{ buildout_directory}}/bin/pythonwitheggs
mode = 0775
mode = 0775
...
...
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