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