Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
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
lizhongxiao
OpenXG-RAN
Commits
3b53e583
Commit
3b53e583
authored
Jan 07, 2024
by
Jaroslava Fiedlerova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename ci_ueinfra.yaml and cls_module_ue.py
parent
99a46f49
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
13 deletions
+13
-13
ci-scripts/ci_infra.yaml
ci-scripts/ci_infra.yaml
+0
-0
ci-scripts/cls_module.py
ci-scripts/cls_module.py
+2
-2
ci-scripts/cls_oaicitest.py
ci-scripts/cls_oaicitest.py
+11
-11
No files found.
ci-scripts/ci_
ue
infra.yaml
→
ci-scripts/ci_infra.yaml
View file @
3b53e583
File moved
ci-scripts/cls_module
_ue
.py
→
ci-scripts/cls_module.py
View file @
3b53e583
...
@@ -41,7 +41,7 @@ import cls_cmd
...
@@ -41,7 +41,7 @@ import cls_cmd
class
Module_UE
:
class
Module_UE
:
def
__init__
(
self
,
module_name
,
filename
=
"ci_
ue
infra.yaml"
):
def
__init__
(
self
,
module_name
,
filename
=
"ci_infra.yaml"
):
with
open
(
filename
,
'r'
)
as
f
:
with
open
(
filename
,
'r'
)
as
f
:
all_ues
=
yaml
.
load
(
f
,
Loader
=
yaml
.
FullLoader
)
all_ues
=
yaml
.
load
(
f
,
Loader
=
yaml
.
FullLoader
)
m
=
all_ues
.
get
(
module_name
)
m
=
all_ues
.
get
(
module_name
)
...
@@ -64,7 +64,7 @@ class Module_UE:
...
@@ -64,7 +64,7 @@ class Module_UE:
self
.
trace
=
m
.
get
(
'trace'
)
==
True
self
.
trace
=
m
.
get
(
'trace'
)
==
True
self
.
logStore
=
m
.
get
(
'LogStore'
)
self
.
logStore
=
m
.
get
(
'LogStore'
)
self
.
cmd_prefix
=
m
.
get
(
'CmdPrefix'
)
self
.
cmd_prefix
=
m
.
get
(
'CmdPrefix'
)
logging
.
info
(
f'initialized
UE
{
self
.
module_name
}
@
{
self
.
host
}
from
{
filename
}
'
)
logging
.
info
(
f'initialized
{
self
.
module_name
}
@
{
self
.
host
}
from
{
filename
}
'
)
def
__str__
(
self
):
def
__str__
(
self
):
return
f"
{
self
.
module_name
}
@
{
self
.
host
}
[IP:
{
self
.
getIP
()
}
]"
return
f"
{
self
.
module_name
}
@
{
self
.
host
}
[IP:
{
self
.
getIP
()
}
]"
...
...
ci-scripts/cls_oaicitest.py
View file @
3b53e583
...
@@ -53,7 +53,7 @@ import constants as CONST
...
@@ -53,7 +53,7 @@ import constants as CONST
import
cls_cluster
as
OC
import
cls_cluster
as
OC
import
sshconnection
import
sshconnection
import
cls_module
_ue
import
cls_module
import
cls_cmd
import
cls_cmd
logging
.
getLogger
(
"matplotlib"
).
setLevel
(
logging
.
WARNING
)
logging
.
getLogger
(
"matplotlib"
).
setLevel
(
logging
.
WARNING
)
...
@@ -224,7 +224,7 @@ class OaiCiTest():
...
@@ -224,7 +224,7 @@ class OaiCiTest():
def
InitializeUE
(
self
,
HTML
):
def
InitializeUE
(
self
,
HTML
):
ues
=
[
cls_module
_ue
.
Module_UE
(
n
.
strip
())
for
n
in
self
.
ue_ids
]
ues
=
[
cls_module
.
Module_UE
(
n
.
strip
())
for
n
in
self
.
ue_ids
]
messages
=
[]
messages
=
[]
with
concurrent
.
futures
.
ThreadPoolExecutor
()
as
executor
:
with
concurrent
.
futures
.
ThreadPoolExecutor
()
as
executor
:
futures
=
[
executor
.
submit
(
ue
.
initialize
)
for
ue
in
ues
]
futures
=
[
executor
.
submit
(
ue
.
initialize
)
for
ue
in
ues
]
...
@@ -440,7 +440,7 @@ class OaiCiTest():
...
@@ -440,7 +440,7 @@ class OaiCiTest():
self
.
AutoTerminateUEandeNB
(
HTML
,
RAN
,
EPC
,
CONTAINERS
)
self
.
AutoTerminateUEandeNB
(
HTML
,
RAN
,
EPC
,
CONTAINERS
)
def
AttachUE
(
self
,
HTML
,
RAN
,
EPC
,
CONTAINERS
):
def
AttachUE
(
self
,
HTML
,
RAN
,
EPC
,
CONTAINERS
):
ues
=
[
cls_module
_ue
.
Module_UE
(
n
.
strip
())
for
n
in
self
.
ue_ids
]
ues
=
[
cls_module
.
Module_UE
(
n
.
strip
())
for
n
in
self
.
ue_ids
]
with
concurrent
.
futures
.
ThreadPoolExecutor
()
as
executor
:
with
concurrent
.
futures
.
ThreadPoolExecutor
()
as
executor
:
futures
=
[
executor
.
submit
(
ue
.
attach
)
for
ue
in
ues
]
futures
=
[
executor
.
submit
(
ue
.
attach
)
for
ue
in
ues
]
attached
=
[
f
.
result
()
for
f
in
futures
]
attached
=
[
f
.
result
()
for
f
in
futures
]
...
@@ -455,7 +455,7 @@ class OaiCiTest():
...
@@ -455,7 +455,7 @@ class OaiCiTest():
self
.
AutoTerminateUEandeNB
(
HTML
,
RAN
,
EPC
,
CONTAINERS
)
self
.
AutoTerminateUEandeNB
(
HTML
,
RAN
,
EPC
,
CONTAINERS
)
def
DetachUE
(
self
,
HTML
):
def
DetachUE
(
self
,
HTML
):
ues
=
[
cls_module
_ue
.
Module_UE
(
n
.
strip
())
for
n
in
self
.
ue_ids
]
ues
=
[
cls_module
.
Module_UE
(
n
.
strip
())
for
n
in
self
.
ue_ids
]
with
concurrent
.
futures
.
ThreadPoolExecutor
()
as
executor
:
with
concurrent
.
futures
.
ThreadPoolExecutor
()
as
executor
:
futures
=
[
executor
.
submit
(
ue
.
detach
)
for
ue
in
ues
]
futures
=
[
executor
.
submit
(
ue
.
detach
)
for
ue
in
ues
]
[
f
.
result
()
for
f
in
futures
]
[
f
.
result
()
for
f
in
futures
]
...
@@ -463,7 +463,7 @@ class OaiCiTest():
...
@@ -463,7 +463,7 @@ class OaiCiTest():
HTML
.
CreateHtmlTestRowQueue
(
'NA'
,
'OK'
,
messages
)
HTML
.
CreateHtmlTestRowQueue
(
'NA'
,
'OK'
,
messages
)
def
DataDisableUE
(
self
,
HTML
):
def
DataDisableUE
(
self
,
HTML
):
ues
=
[
cls_module
_ue
.
Module_UE
(
n
.
strip
())
for
n
in
self
.
ue_ids
]
ues
=
[
cls_module
.
Module_UE
(
n
.
strip
())
for
n
in
self
.
ue_ids
]
with
concurrent
.
futures
.
ThreadPoolExecutor
()
as
executor
:
with
concurrent
.
futures
.
ThreadPoolExecutor
()
as
executor
:
futures
=
[
executor
.
submit
(
ue
.
dataDisable
)
for
ue
in
ues
]
futures
=
[
executor
.
submit
(
ue
.
dataDisable
)
for
ue
in
ues
]
status
=
[
f
.
result
()
for
f
in
futures
]
status
=
[
f
.
result
()
for
f
in
futures
]
...
@@ -475,7 +475,7 @@ class OaiCiTest():
...
@@ -475,7 +475,7 @@ class OaiCiTest():
HTML
.
CreateHtmlTestRowQueue
(
'N/A'
,
'KO'
,
[
"Could not disable UE data!"
])
HTML
.
CreateHtmlTestRowQueue
(
'N/A'
,
'KO'
,
[
"Could not disable UE data!"
])
def
DataEnableUE
(
self
,
HTML
):
def
DataEnableUE
(
self
,
HTML
):
ues
=
[
cls_module
_ue
.
Module_UE
(
n
.
strip
())
for
n
in
self
.
ue_ids
]
ues
=
[
cls_module
.
Module_UE
(
n
.
strip
())
for
n
in
self
.
ue_ids
]
logging
.
debug
(
f'disabling data for UEs
{
ues
}
'
)
logging
.
debug
(
f'disabling data for UEs
{
ues
}
'
)
with
concurrent
.
futures
.
ThreadPoolExecutor
()
as
executor
:
with
concurrent
.
futures
.
ThreadPoolExecutor
()
as
executor
:
futures
=
[
executor
.
submit
(
ue
.
dataEnable
)
for
ue
in
ues
]
futures
=
[
executor
.
submit
(
ue
.
dataEnable
)
for
ue
in
ues
]
...
@@ -488,7 +488,7 @@ class OaiCiTest():
...
@@ -488,7 +488,7 @@ class OaiCiTest():
HTML
.
CreateHtmlTestRowQueue
(
'N/A'
,
'KO'
,
[
"Could not enable UE data!"
])
HTML
.
CreateHtmlTestRowQueue
(
'N/A'
,
'KO'
,
[
"Could not enable UE data!"
])
def
CheckStatusUE
(
self
,
HTML
):
def
CheckStatusUE
(
self
,
HTML
):
ues
=
[
cls_module
_ue
.
Module_UE
(
n
.
strip
())
for
n
in
self
.
ue_ids
]
ues
=
[
cls_module
.
Module_UE
(
n
.
strip
())
for
n
in
self
.
ue_ids
]
logging
.
debug
(
f'checking status of UEs
{
ues
}
'
)
logging
.
debug
(
f'checking status of UEs
{
ues
}
'
)
messages
=
[]
messages
=
[]
with
concurrent
.
futures
.
ThreadPoolExecutor
()
as
executor
:
with
concurrent
.
futures
.
ThreadPoolExecutor
()
as
executor
:
...
@@ -592,7 +592,7 @@ class OaiCiTest():
...
@@ -592,7 +592,7 @@ class OaiCiTest():
if
self
.
ue_ids
==
[]:
if
self
.
ue_ids
==
[]:
raise
Exception
(
"no module names in self.ue_ids provided"
)
raise
Exception
(
"no module names in self.ue_ids provided"
)
ues
=
[
cls_module
_ue
.
Module_UE
(
n
.
strip
())
for
n
in
self
.
ue_ids
]
ues
=
[
cls_module
.
Module_UE
(
n
.
strip
())
for
n
in
self
.
ue_ids
]
logging
.
debug
(
ues
)
logging
.
debug
(
ues
)
pingLock
=
Lock
()
pingLock
=
Lock
()
with
concurrent
.
futures
.
ThreadPoolExecutor
()
as
executor
:
with
concurrent
.
futures
.
ThreadPoolExecutor
()
as
executor
:
...
@@ -938,8 +938,8 @@ class OaiCiTest():
...
@@ -938,8 +938,8 @@ class OaiCiTest():
logging
.
debug
(
f'Iperf: iperf_args "
{
self
.
iperf_args
}
" iperf_direction "
{
self
.
iperf_direction
}
" iperf_packetloss_threshold "
{
self
.
iperf_packetloss_threshold
}
" iperf_bitrate_threshold "
{
self
.
iperf_bitrate_threshold
}
" iperf_profile "
{
self
.
iperf_profile
}
" iperf_options "
{
self
.
iperf_options
}
"'
)
logging
.
debug
(
f'Iperf: iperf_args "
{
self
.
iperf_args
}
" iperf_direction "
{
self
.
iperf_direction
}
" iperf_packetloss_threshold "
{
self
.
iperf_packetloss_threshold
}
" iperf_bitrate_threshold "
{
self
.
iperf_bitrate_threshold
}
" iperf_profile "
{
self
.
iperf_profile
}
" iperf_options "
{
self
.
iperf_options
}
"'
)
ues
=
[
cls_module
_ue
.
Module_UE
(
n
.
strip
())
for
n
in
self
.
ue_ids
]
ues
=
[
cls_module
.
Module_UE
(
n
.
strip
())
for
n
in
self
.
ue_ids
]
svr
=
cls_module
_ue
.
Module_UE
(
self
.
svr_id
)
svr
=
cls_module
.
Module_UE
(
self
.
svr_id
)
logging
.
debug
(
ues
)
logging
.
debug
(
ues
)
with
concurrent
.
futures
.
ThreadPoolExecutor
()
as
executor
:
with
concurrent
.
futures
.
ThreadPoolExecutor
()
as
executor
:
futures
=
[
executor
.
submit
(
self
.
Iperf_Module
,
EPC
,
ue
,
svr
,
RAN
,
i
,
len
(
ues
))
for
i
,
ue
in
enumerate
(
ues
)]
futures
=
[
executor
.
submit
(
self
.
Iperf_Module
,
EPC
,
ue
,
svr
,
RAN
,
i
,
len
(
ues
))
for
i
,
ue
in
enumerate
(
ues
)]
...
@@ -1221,7 +1221,7 @@ class OaiCiTest():
...
@@ -1221,7 +1221,7 @@ class OaiCiTest():
return
global_status
return
global_status
def
TerminateUE
(
self
,
HTML
):
def
TerminateUE
(
self
,
HTML
):
ues
=
[
cls_module
_ue
.
Module_UE
(
n
.
strip
())
for
n
in
self
.
ue_ids
]
ues
=
[
cls_module
.
Module_UE
(
n
.
strip
())
for
n
in
self
.
ue_ids
]
with
concurrent
.
futures
.
ThreadPoolExecutor
()
as
executor
:
with
concurrent
.
futures
.
ThreadPoolExecutor
()
as
executor
:
futures
=
[
executor
.
submit
(
ue
.
terminate
)
for
ue
in
ues
]
futures
=
[
executor
.
submit
(
ue
.
terminate
)
for
ue
in
ues
]
archives
=
[
f
.
result
()
for
f
in
futures
]
archives
=
[
f
.
result
()
for
f
in
futures
]
...
...
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