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
104
Merge Requests
104
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
92ee4f4b
Commit
92ee4f4b
authored
Jan 02, 2024
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
770dc0f7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
16 deletions
+26
-16
software/ors-amarisoft/test/test.py
software/ors-amarisoft/test/test.py
+26
-16
No files found.
software/ors-amarisoft/test/test.py
View file @
92ee4f4b
...
...
@@ -89,17 +89,17 @@ _ = {
}
PEER
=
{
PEER
4
=
{
'peer_type'
:
'lte'
,
'x2_addr'
:
'44.1.1.1'
,
}
PEER
=
{
PEER
4
=
{
'peer_type'
:
'nr'
,
'xn_addr'
:
'55.1.1.1'
,
}
PEERCELL
=
{
PEERCELL
4
=
{
'cell_type'
:
'lte'
,
'cell_kind'
:
'enb_peer'
,
'e_cell_id'
:
'0x12345'
,
...
...
@@ -110,7 +110,7 @@ PEERCELL = {
}
PEERCELL
=
{
PEERCELL
5
=
{
'cell_type'
:
'nr'
,
'cell_kind'
:
'enb_peer'
,
'nr_cell_id'
:
'0x77712'
,
...
...
@@ -132,12 +132,32 @@ class ENBTestCase(AmariTestCase):
def
getInstanceSoftwareType
(
cls
):
return
"enb"
# ref returns full reference of shared instance with given subreference.
#
# for example if refrence of main isntance is 'MAIN-INSTANCE'
#
# ref('RU') = 'MAIN-INSTANCE.RU'
@
classmethod
def
ref
(
cls
,
subref
):
return
'%s.%s'
%
(
cls
.
default_partition_reference
,
subref
)
@
classmethod
def
requestDefaultInstance
(
cls
,
state
=
'started'
):
inst
=
super
().
requestDefaultInstance
(
state
=
state
)
cls
.
request
Shared
(
inst
)
cls
.
add
Shared
(
inst
)
return
inst
# addShared adds all shared instances of the testcase over imain.
@
classmethod
def
addShared
(
cls
,
imain
):
def
_
(
subref
,
ctx
):
return
cls
.
requestShared
(
imain
,
subref
,
ctx
)
_
(
'PEER4'
,
PEER4
)
_
(
'PEER5'
,
PEER4
)
_
(
'PEERCELL4'
,
PEERCELL4
)
_
(
'PEERCELL5'
,
PEERCELL5
)
# requestShared requests shared instance over imain with specified subreference and parameters.
@
classmethod
def
requestShared
(
cls
,
imain
,
subref
,
ctx
):
...
...
@@ -147,17 +167,7 @@ class ENBTestCase(AmariTestCase):
partition_reference
=
cls
.
ref
(
subref
),
filter_kw
=
{
'instance_guid'
:
imain
.
getInstanceGuid
()},
partition_parameter_kw
=
{
'_'
:
json
.
dumps
(
ctx
)}
shared
=
True
,
# ref returns full reference of shared instance with given subreference.
#
# for example if refrence of main isntance is 'MAIN-INSTANCE'
#
# ref('RU') = 'MAIN-INSTANCE.RU'
@
classmethod
def
ref
(
cls
,
subref
):
return
'%s.%s'
%
(
cls
.
default_partition_reference
,
subref
)
shared
=
True
)
...
...
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