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
d5258497
Commit
d5258497
authored
May 02, 2023
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/ci-generic-changes' into integration_2023_w17
parents
d9e38660
149d27d5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
11 deletions
+18
-11
ci-scripts/cls_module_ue.py
ci-scripts/cls_module_ue.py
+13
-9
ci-scripts/cls_oaicitest.py
ci-scripts/cls_oaicitest.py
+4
-1
ci-scripts/ran.py
ci-scripts/ran.py
+1
-1
No files found.
ci-scripts/cls_module_ue.py
View file @
d5258497
...
@@ -81,7 +81,7 @@ class Module_UE:
...
@@ -81,7 +81,7 @@ class Module_UE:
c
=
cls_cmd
.
RemoteCmd
(
self
.
host
)
c
=
cls_cmd
.
RemoteCmd
(
self
.
host
)
response
=
c
.
run
(
cmd
,
silent
=
silent
)
response
=
c
.
run
(
cmd
,
silent
=
silent
)
c
.
close
()
c
.
close
()
return
response
.
stdout
return
response
#-----------------$
#-----------------$
#PUBLIC Methods$
#PUBLIC Methods$
...
@@ -95,7 +95,11 @@ class Module_UE:
...
@@ -95,7 +95,11 @@ class Module_UE:
if
self
.
cmd_dict
[
"detach"
]:
if
self
.
cmd_dict
[
"detach"
]:
self
.
_command
(
self
.
cmd_dict
[
"detach"
],
silent
=
True
)
self
.
_command
(
self
.
cmd_dict
[
"detach"
],
silent
=
True
)
self
.
_command
(
self
.
cmd_dict
[
"terminate"
],
silent
=
True
)
self
.
_command
(
self
.
cmd_dict
[
"terminate"
],
silent
=
True
)
self
.
_command
(
self
.
cmd_dict
[
"initialize"
])
ret
=
self
.
_command
(
self
.
cmd_dict
[
"initialize"
])
logging
.
info
(
f'For command:
{
ret
.
args
}
| return output:
{
ret
.
stdout
}
| Code:
{
ret
.
returncode
}
'
)
# Here each UE returns differently for the successful initialization, requires check based on UE
return
ret
.
returncode
==
0
def
terminate
(
self
):
def
terminate
(
self
):
self
.
_command
(
self
.
cmd_dict
[
"terminate"
])
self
.
_command
(
self
.
cmd_dict
[
"terminate"
])
...
@@ -122,9 +126,9 @@ class Module_UE:
...
@@ -122,9 +126,9 @@ class Module_UE:
self
.
_command
(
self
.
cmd_dict
[
"detach"
])
self
.
_command
(
self
.
cmd_dict
[
"detach"
])
time
.
sleep
(
5
)
time
.
sleep
(
5
)
if
ip
:
if
ip
:
logging
.
debug
(
f'
\u001B
[1mUE IP Address is
{
ip
}
\u001B
[0m'
)
logging
.
debug
(
f'
\u001B
[1mUE IP Address
for UE
{
self
.
module_name
}
is
{
ip
}
\u001B
[0m'
)
else
:
else
:
logging
.
debug
(
'
\u001B
[1;37;41mUE IP Address
Not Found!
\u001B
[0m'
)
logging
.
debug
(
f'
\u001B
[1;37;41mUE IP Address for UE
{
self
.
module_name
}
Not Found!
\u001B
[0m'
)
return
ip
return
ip
def
detach
(
self
):
def
detach
(
self
):
...
@@ -133,7 +137,7 @@ class Module_UE:
...
@@ -133,7 +137,7 @@ class Module_UE:
def
check
(
self
):
def
check
(
self
):
cmd
=
self
.
cmd_dict
[
"check"
]
cmd
=
self
.
cmd_dict
[
"check"
]
if
cmd
:
if
cmd
:
return
self
.
_command
(
cmd
)
return
self
.
_command
(
cmd
)
.
stdout
else
:
else
:
logging
.
warning
(
f"requested status check of UE
{
self
.
getName
()
}
, but operation is not supported"
)
logging
.
warning
(
f"requested status check of UE
{
self
.
getName
()
}
, but operation is not supported"
)
return
f"UE
{
self
.
getName
()
}
does not support status checking"
return
f"UE
{
self
.
getName
()
}
does not support status checking"
...
@@ -160,7 +164,7 @@ class Module_UE:
...
@@ -160,7 +164,7 @@ class Module_UE:
def
getIP
(
self
):
def
getIP
(
self
):
output
=
self
.
_command
(
self
.
cmd_dict
[
"getNetwork"
],
silent
=
True
)
output
=
self
.
_command
(
self
.
cmd_dict
[
"getNetwork"
],
silent
=
True
)
result
=
re
.
search
(
'inet (?P<ip>[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)'
,
output
)
result
=
re
.
search
(
'inet (?P<ip>[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)'
,
output
.
stdout
)
if
result
and
result
.
group
(
'ip'
):
if
result
and
result
.
group
(
'ip'
):
ip
=
result
.
group
(
'ip'
)
ip
=
result
.
group
(
'ip'
)
return
ip
return
ip
...
@@ -168,12 +172,12 @@ class Module_UE:
...
@@ -168,12 +172,12 @@ class Module_UE:
def
checkMTU
(
self
):
def
checkMTU
(
self
):
output
=
self
.
_command
(
self
.
cmd_dict
[
"getNetwork"
],
silent
=
True
)
output
=
self
.
_command
(
self
.
cmd_dict
[
"getNetwork"
],
silent
=
True
)
result
=
re
.
search
(
'mtu (?P<mtu>[0-9]+)'
,
output
)
result
=
re
.
search
(
'mtu (?P<mtu>[0-9]+)'
,
output
.
stdout
)
if
result
and
result
.
group
(
'mtu'
)
and
int
(
result
.
group
(
'mtu'
))
==
self
.
MTU
:
if
result
and
result
.
group
(
'mtu'
)
and
int
(
result
.
group
(
'mtu'
))
==
self
.
MTU
:
logging
.
debug
(
'
\u001B
[1mUE Module NIC MTU is '
+
str
(
self
.
MTU
)
+
'
as expected
\u001B
[0m'
)
logging
.
debug
(
f'
\u001B
[1mUE Module
{
self
.
module_name
}
NIC MTU is
{
self
.
MTU
}
as expected
\u001B
[0m'
)
return
True
return
True
else
:
else
:
logging
.
debug
(
'
\u001B
[1;37;41m Incorrect Module NIC MTU or MTU not found! Expected: '
+
str
(
self
.
MTU
)
+
'
\u001B
[0m'
)
logging
.
debug
(
f'
\u001B
[1;37;41m UE module
{
self
.
module_name
}
has incorrect Module NIC MTU or MTU not found! Expected:
{
self
.
MTU
}
\u001B
[0m'
)
return
False
return
False
def
getName
(
self
):
def
getName
(
self
):
...
...
ci-scripts/cls_oaicitest.py
View file @
d5258497
...
@@ -295,10 +295,13 @@ class OaiCiTest():
...
@@ -295,10 +295,13 @@ 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_ue
.
Module_UE
(
n
.
strip
())
for
n
in
self
.
ue_ids
]
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
]
for
f
,
ue
in
zip
(
futures
,
ues
):
uename
=
f'UE
{
ue
.
getName
()
}
'
messages
.
append
(
f'
{
uename
}
: initialized'
if
f
.
result
()
else
f'
{
uename
}
: ERROR during Initialization'
)
[
f
.
result
()
for
f
in
futures
]
[
f
.
result
()
for
f
in
futures
]
messages
=
[
f'UE
{
ue
.
getName
()
}
: initialized'
for
ue
in
ues
]
HTML
.
CreateHtmlTestRowQueue
(
'N/A'
,
'OK'
,
messages
)
HTML
.
CreateHtmlTestRowQueue
(
'N/A'
,
'OK'
,
messages
)
...
...
ci-scripts/ran.py
View file @
d5258497
...
@@ -263,7 +263,7 @@ class RANManagement():
...
@@ -263,7 +263,7 @@ class RANManagement():
cmd
=
cls_cmd
.
getConnection
(
self
.
node
)
cmd
=
cls_cmd
.
getConnection
(
self
.
node
)
ret
=
cmd
.
run
(
self
.
command
)
ret
=
cmd
.
run
(
self
.
command
)
cmd
.
close
()
cmd
.
close
()
logging
.
debug
(
f
'CustomCommand:
{
self
.
command
}
returnCode:
{
ret
.
returncode
}
'
)
logging
.
debug
(
f
"Custum command :
{
self
.
command
}
on node :
{
self
.
node
}
returnCode :
{
ret
.
returncode
}
"
)
status
=
'OK'
status
=
'OK'
message
=
[]
message
=
[]
if
ret
.
returncode
!=
0
and
not
self
.
command_fail
:
if
ret
.
returncode
!=
0
and
not
self
.
command_fail
:
...
...
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