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
Paul Graydon
slapos
Commits
2eb3e0dd
Commit
2eb3e0dd
authored
Jan 27, 2023
by
Joanne Hugé
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WIP
parent
96e96eaf
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
8 deletions
+14
-8
software/ors-amarisoft/buildout.hash.cfg
software/ors-amarisoft/buildout.hash.cfg
+2
-2
software/ors-amarisoft/instance-enb.jinja2.cfg
software/ors-amarisoft/instance-enb.jinja2.cfg
+3
-1
software/ors-amarisoft/lopcomm-rrh-stats.jinja2.py
software/ors-amarisoft/lopcomm-rrh-stats.jinja2.py
+9
-5
No files found.
software/ors-amarisoft/buildout.hash.cfg
View file @
2eb3e0dd
...
@@ -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 =
85d735779c1351f8ad2dcbef3742cf5d
md5sum =
fdadec073c6beec2082d57114eb7fa86
[template-lte-enb-epc]
[template-lte-enb-epc]
_update_hash_filename_ = instance-enb-epc.jinja2.cfg
_update_hash_filename_ = instance-enb-epc.jinja2.cfg
...
@@ -32,7 +32,7 @@ md5sum = 833667743c693b8d5f78a2527b275a9e
...
@@ -32,7 +32,7 @@ md5sum = 833667743c693b8d5f78a2527b275a9e
[template-lte-enb]
[template-lte-enb]
_update_hash_filename_ = instance-enb.jinja2.cfg
_update_hash_filename_ = instance-enb.jinja2.cfg
md5sum =
fb2e5265bdb844c5c936d1f3837f9892
md5sum =
61cbcd637e8661502d5b30f44a882fa3
[template-lte-gnb-epc]
[template-lte-gnb-epc]
_update_hash_filename_ = instance-gnb-epc.jinja2.cfg
_update_hash_filename_ = instance-gnb-epc.jinja2.cfg
...
...
software/ors-amarisoft/instance-enb.jinja2.cfg
View file @
2eb3e0dd
...
@@ -124,11 +124,13 @@ output = ${directory:bin}/amarisoft-stats.py
...
@@ -124,11 +124,13 @@ output = ${directory:bin}/amarisoft-stats.py
[lopcomm-rrh-stats-template]
[lopcomm-rrh-stats-template]
recipe = slapos.recipe.template:jinja2
recipe = slapos.recipe.template:jinja2
extensions = jinja2.ext.do
extensions = jinja2.ext.do
log-output = ${directory:var}/log/lopcomm-rrh-stats.json.log
log-output = ${directory:var}/log/lopcomm-rrh-stats.log
json-log-output = ${directory:var}/log/lopcomm-rrh-stats.json.log
context =
context =
section directory directory
section directory directory
key slapparameter_dict slap-configuration:configuration
key slapparameter_dict slap-configuration:configuration
key log_file :log-output
key log_file :log-output
key json_log_file :json-log-output
raw testing {{ slapparameter_dict.get("testing", False) }}
raw testing {{ slapparameter_dict.get("testing", False) }}
raw python_path {{ buildout_directory}}/bin/pythonwitheggs
raw python_path {{ buildout_directory}}/bin/pythonwitheggs
mode = 0775
mode = 0775
...
...
software/ors-amarisoft/lopcomm-rrh-stats.jinja2.py
View file @
2eb3e0dd
...
@@ -12,16 +12,20 @@ class LopcommNetconfClient:
...
@@ -12,16 +12,20 @@ class LopcommNetconfClient:
def
__init__
(
self
):
def
__init__
(
self
):
log_file
=
"{{ log_file }}"
log_file
=
"{{ log_file }}"
json_log_file
=
"{{ json_log_file }}"
self
.
logger
=
logging
.
getLogger
(
'logger'
)
self
.
logger
=
logging
.
getLogger
(
'logger'
)
self
.
json_logger
=
logging
.
getLogger
(
'json_logger'
)
self
.
json_logger
=
logging
.
getLogger
(
'json_logger'
)
self
.
logger
.
setLevel
(
logging
.
DEBUG
)
self
.
logger
.
setLevel
(
logging
.
DEBUG
)
self
.
json_logger
.
setLevel
(
logging
.
DEBUG
)
self
.
json_logger
.
setLevel
(
logging
.
DEBUG
)
handler
=
RotatingFileHandler
(
log_file
,
maxBytes
=
30000
,
backupCount
=
2
)
formatter
=
logging
.
Formatter
(
'{"time": "%(asctime)s", "log_level": "%(levelname)s", "message": "%(message)s", "data": %(data)s}'
)
json_handler
=
RotatingFileHandler
(
json_log_file
,
maxBytes
=
100000
,
backupCount
=
5
)
handler
.
setFormatter
(
formatter
)
json_formatter
=
logging
.
Formatter
(
'{"time": "%(asctime)s", "log_level": "%(levelname)s", "message": "%(message)s", "data": %(data)s}'
)
self
.
json_logger
.
addHandler
(
handler
)
json_handler
.
setFormatter
(
json_formatter
)
self
.
json_logger
.
addHandler
(
json_handler
)
handler
=
RotatingFileHandler
(
log_file
,
maxBytes
=
100000
,
backupCount
=
5
)
self
.
logger
.
addHandler
(
handler
)
if
{{
testing
}}:
if
{{
testing
}}:
return
return
...
...
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