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
107
Merge Requests
107
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
a25b77c7
Commit
a25b77c7
authored
Jan 27, 2023
by
Joanne Hugé
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WIP
parent
a2a2e362
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
6 deletions
+8
-6
software/ors-amarisoft/buildout.hash.cfg
software/ors-amarisoft/buildout.hash.cfg
+1
-1
software/ors-amarisoft/lopcomm-rrh-stats.jinja2.py
software/ors-amarisoft/lopcomm-rrh-stats.jinja2.py
+7
-5
No files found.
software/ors-amarisoft/buildout.hash.cfg
View file @
a25b77c7
...
...
@@ -24,7 +24,7 @@ md5sum = 6e0a052bd0ca08cc0c7b4880d3deffcc
[lopcomm-rrh-stats.jinja2.py]
_update_hash_filename_ = lopcomm-rrh-stats.jinja2.py
md5sum =
dc58a06cbfef97a0a04dbada9b91e65c
md5sum =
f56f7f49b7c86e087ececc2b11455381
[template-lte-enb-epc]
_update_hash_filename_ = instance-enb-epc.jinja2.cfg
...
...
software/ors-amarisoft/lopcomm-rrh-stats.jinja2.py
View file @
a25b77c7
...
...
@@ -35,7 +35,9 @@ class LopcommNetconfClient:
if
{{
testing
}}:
return
self
.
logger
.
info
(
'Connecting to %s, user %s...'
%
((
host
,
port
),
user
))
self
.
address
=
(
host
,
port
)
self
.
logger
.
info
(
'Connecting to %s, user %s...'
%
(
self
.
address
,
user
))
self
.
conn
=
manager
.
connect
(
host
=
host
,
port
=
port
,
...
...
@@ -47,23 +49,23 @@ class LopcommNetconfClient:
},
hostkey_verify
=
False
)
self
.
logger
.
info
(
'Connection to %s successful'
%
(
(
host
,
port
)
,))
self
.
logger
.
info
(
'Connection to %s successful'
%
(
self
.
address
,))
def
subscribe
(
self
):
# Filter not compatible between ncclient and netconf server
#result = self.conn.create_subscription(filter=('xpath', '/o-ran-fm:*'))
sub
=
self
.
conn
.
create_subscription
()
self
.
logger
.
info
(
'Subscription to %s successful'
%
(
(
host
,
port
)
,))
self
.
logger
.
info
(
'Subscription to %s successful'
%
(
self
.
address
,))
def
get_notification
(
self
):
result
=
None
while
result
==
None
:
self
.
logger
.
debug
(
'Waiting for notification from %s...'
%
(
(
host
,
port
)
,))
self
.
logger
.
debug
(
'Waiting for notification from %s...'
%
(
self
.
address
,))
result
=
self
.
conn
.
take_notification
(
block
=
True
)
if
result
:
self
.
logger
.
debug
(
'Got new notification from %s...'
%
(
(
host
,
port
)
,))
self
.
logger
.
debug
(
'Got new notification from %s...'
%
(
self
.
address
,))
result_in_xml
=
result
.
_raw
data_dict
=
xmltodict
.
parse
(
result_in_xml
)
result_in_json
=
json
.
dumps
(
data_dict
)
...
...
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