Control Slice Customized SM
Overview
A slice control xApp, utilizing the custom service model SLICE SM, is developed to manage and control slices within E2-Nodes. It offers support for three distinct action types: 1) adding/modifying slices, 2) associating UE's slice, and 3) deleting slices. This enables the creation of tailored slice control messages by populating various parameters with the appropriate slicing algorithm.
It includes the following stages:
- Init: initializes xApp based on configuration to set up the E42 connection with NearRT-RIC
- xApp Logic: creates customized control message
- Control Service: sends control request to each E2-Node
- Exit: terminates xApp
Sequence Diagram
Detail
source code: xapp_slice_ctrl.py
Init - Step 2 to 5
- Used Functions
xApp Logic - Step 6
Develop your xApp logic to generate the customized control message based on the given action type.
For example, utilize the function fill_slice_ctrl_msg()
below to generate a customized control message,
filling the necessary parameters according to the slice_ctrl_msg_t
structure.
fill_slice_ctrl_msg()
-
Input
Parameter Type in Python Comment act_type
string
Action types of slice (e.g., ADDMOD
,ASSOC_UE_SLICE
, andDEL
)param
json
Required parameters to create customized control message
Note: Different action types require specific input parameters. For instance,
ADDMOD
uses theslice_conf_t
structure,ASSOC_UE_SLICE
utilizes theue_slice_conf_t
structure, andDEL
is based on thedel_slice_conf_t
structure.
-
Output
Parameter Type in Python Type in Swig Wrapper C++ Comment msg
xapp_sdk.slice_ctrl_msg_t
slice_ctrl_msg_t
Control message using SLICE SM -
Example - Add/Modify Slice
# Define action type
act_type = "ADDMOD"
# Define required parameters based on slice_conf_t
add_slice_parameters_json = {
"num_slices" : 2,
"slice_sched_algo" : "NVS",
"slices" : [
{
"id" : 0,
"label" : "s1",
"ue_sched_algo" : "PF",
"type" : "SLICE_SM_NVS_V0_CAPACITY",
"slice_algo_params" : {"pct_rsvd" : 0.7},
},
{
"id" : 2,
"label" : "s2",
"ue_sched_algo" : "PF",
"type" : "SLICE_SM_NVS_V0_CAPACITY",
"slice_algo_params" : {"pct_rsvd" : 0.3},
}
]
}
# Generate control message
msg = fill_slice_ctrl_msg(act_type, add_slice_parameters_json)
- Example - Associate UE's Slice
# Define action type
act_type = "ASSPC_UE_SLICE"
# Define required parameters based on ue_slice_conf_t
assoc_slice_parameter_json = {
"num_ues" : 1,
"ues" : [
{
"rnti" : 0x1234,
"assoc_dl_slice_id" : 2
}
]
}
# Generate control message
msg = fill_slice_ctrl_msg(act_type, assoc_slice_parameter_json)
- Example - Delete Slice
# Define action type
act_type = "DEL"
# Define required parameters based on del_slice_conf_t
delete_slice_parameter_json = {
"num_dl_slices" : 1,
"delete_dl_slice_id" : [2]
}
# Generate control message
msg = fill_slice_ctrl_msg(act_type, delete_slice_parameter_json)
Control Service - Step 7 to 11
- Used function
Exit - Step 12
- Used function