Update QoS tests for netcfg-based logic
Slices are pre-provisioned via netcfg. Creating/removing them via REST
APIs is no longer supported, so the checks for the corresponding flow
insertions have been removed.
Also, to improve debugging, we make assertions more granular and logging
more detailed, e.g., we now check failures for individual flow
insertions and print the flow name.
Also 2, we rename all relevant instances of qfi to tc to avoid confusion.
UP4 now exposes only TCs. The mapping between QFI and TC is up to
PFCP-Agent.
Change-Id: If1dc65680bf3ad3bcc0091c1435c2553198c8ba6
diff --git a/TestON/tests/USECASE/SegmentRouting/dependencies/up4.py b/TestON/tests/USECASE/SegmentRouting/dependencies/up4.py
index fe5ddf9..2951158 100644
--- a/TestON/tests/USECASE/SegmentRouting/dependencies/up4.py
+++ b/TestON/tests/USECASE/SegmentRouting/dependencies/up4.py
@@ -50,8 +50,8 @@
<teid>200</teid>
<up_id>20</up_id>
<down_id>21</down_id>
- <!-- QFI == TC, QFI = 0 means BEST EFFORT -->
- <qfi>2</qfi>
+ <!-- TC 0 means BEST EFFORT -->
+ <tc>2</tc>
<five_g>False</five_g>
</ue2>
</ues>
@@ -401,21 +401,21 @@
ue_address, tunn_peer_id)
def upTerminationOnosString(self, ue_address, up_id=None, ctr_id_up=None,
- qfi=None, **kwargs):
+ tc=None, **kwargs):
if up_id is not None:
ctr_id_up = up_id
return "TerminationUL{{Match(ue_addr={})->(CTR_ID={}, TC={})}}".format(
- ue_address, ctr_id_up, qfi) # TC == QFI
+ ue_address, ctr_id_up, tc)
def downTerminationOnosString(self, ue_address, teid=None, down_id=None,
- ctr_id_down=None, teid_down=None, qfi=None,
+ ctr_id_down=None, teid_down=None, tc=None,
**kwargs):
if down_id is not None:
ctr_id_down = down_id
if teid is not None:
teid_down = teid
return "TerminationDL{{Match(ue_addr={})->(TEID={}, CTR_ID={}, QFI={}, TC={})}}".format(
- ue_address, teid_down, ctr_id_down, qfi, qfi) # TC == QFI
+ ue_address, teid_down, ctr_id_down, tc, tc)
def gtpTunnelPeerOnosString(self, ue_name, down_id=None, tunn_peer_id=None,
**kwargs):
@@ -429,8 +429,8 @@
def __sanitizeUeData(ue):
if "five_g" in ue and type(ue["five_g"]) != bool:
ue["five_g"] = bool(strtobool(ue["five_g"]))
- if "qfi" in ue and ue["qfi"] == "":
- ue["qfi"] = 0
+ if "tc" in ue and ue["tc"] == "":
+ ue["tc"] = 0
return ue
def attachUe(self, ue_name, ue_address,
@@ -438,34 +438,34 @@
teid_up=None, teid_down=None,
ctr_id_up=None, ctr_id_down=None,
tunn_peer_id=None,
- qfi=None, five_g=False):
+ tc=None, five_g=False):
self.__programUp4Rules(ue_name,
ue_address,
teid, up_id, down_id,
teid_up, teid_down,
ctr_id_up, ctr_id_down,
tunn_peer_id,
- qfi, five_g, action="program")
+ tc, five_g, action="program")
def detachUe(self, ue_name, ue_address,
teid=None, up_id=None, down_id=None,
teid_up=None, teid_down=None,
ctr_id_up=None, ctr_id_down=None,
tunn_peer_id=None,
- qfi=None, five_g=False):
+ tc=None, five_g=False):
self.__programUp4Rules(ue_name,
ue_address,
teid, up_id, down_id,
teid_up, teid_down,
ctr_id_up, ctr_id_down,
tunn_peer_id,
- qfi, five_g, action="clear")
+ tc, five_g, action="clear")
def __programUp4Rules(self, ue_name, ue_address,
teid=None, up_id=None, down_id=None,
teid_up=None, teid_down=None, ctr_id_up=None,
ctr_id_down=None, tunn_peer_id=None,
- qfi=0, five_g=False, app_id=DEFAULT_APP_ID,
+ tc=0, five_g=False, app_id=DEFAULT_APP_ID,
action="program"):
if up_id is not None:
ctr_id_up = up_id
@@ -528,8 +528,7 @@
matchFields['app_id'] = str(app_id)
# Action params
actionParams['ctr_idx'] = str(ctr_id_up)
- # 1-1 mapping between QFI and TC
- actionParams['tc'] = str(qfi)
+ actionParams['tc'] = str(tc)
if not self.__add_entry(tableName, actionName, matchFields,
actionParams, entries, action):
return False
@@ -547,8 +546,8 @@
actionParams['teid'] = str(teid_down)
actionParams['ctr_idx'] = str(ctr_id_down)
# 1-1 mapping between QFI and TC
- actionParams['tc'] = str(qfi)
- actionParams['qfi'] = str(qfi)
+ actionParams['tc'] = str(tc)
+ actionParams['qfi'] = str(tc)
if not self.__add_entry(tableName, actionName, matchFields,
actionParams, entries, action):
return False