Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Current »

The document describes the steps that can be used to create and onboard optimization policies for the Network Slice and Subnet models onto the Policy module in ONAP. These policies will be used by OOF during the optimization(NSI and NSSI selection).

Prerequisites

Make sure that the policy and OOF modules are deployed and all the pods are up and running. You can check the pod status using the following command

Deployment status
kubectl get pods -n onap | grep policy
kubectl get pods -n onap | grep oof


Download the policies.zip file (The archive contains all the required policy templates and a script which helps in creating the policies). Extract it and copy the contents into the one of the onap pods(The script in the zip uses dns name of the policy-api, so that it is essential to run the script from within a pod in the kubernetes environment). The below example uses the OOF pod, since it has python3 and necessary libraries already installed.

Copy the policy files
unzip policies.zip
kubectl cp policies -n onap <oof-pod-name>:/opt/osdf
kubectl exec -ti -n onap <oof-pod-name> bash
cd policies

Policy contents

The contents of the archive are as follows

  • policy_types (dir) - The directory contains the addtional policy types that needs to be created for the Network slicing use case.
  • nst_policies (dir) -  The directory contains the policies required for NST selection.
  • nsi_polices (dir) - The directory contains the policy templates required for NSI selection.
  • nssi_policies (dir) - The directory contains the policy templates required for NSSI selection.
  • policy_utils.py - The python script which can be used to generate, create and delete policies

The directories mainly have the policies created for testing purposes. If you would like, you can modify the templates to suit your optimization needs.

Policy type creation

The policy types must be created before creating and pushing the policies

Generate policies
python3 policy_utils.py create_policy_types policy_types

Policy generation

For every network slice template, set of policies have to be created. They can be generated using the following the commands

Generate policies
# for NST selection, we need not generate any policies, since it will same for all the requests

# for nsi policies
python3 policy_utils.py generate_nsi_policies <service_name(nst)>

# for nssi policies
python3 policy_utils.py generate_nssi_policies <service_name(nsst)> minimize latency

Note: generate_nssi_policies have addtional fields that can be used to specify the optmization goals say, minimize latency or maximize throughput

The above commands will create directories named gen_nsi_policies and gen_nssi_policies

Policy Creation

The following commands can be used to create and push policies to policy module

Generate policies
# for nst policies
python3 policy_utils.py create_and_push_policies nst_policies

# for nsi policies
python3 policy_utils.py create_and_push_policies gen_nsi_policies

# for nssi policies
python3 policy_utils.py create_and_push_policies gen_nssi_policies


Policy Deletion

The following commands can be used to delete policies in the policy module

Generate policies
# for nst policies
python3 policy_utils.py delete_policies nst_policies

# for nsi policies
python3 policy_utils.py delete_policies gen_nsi_policies

# for nssi policies
python3 policy_utils.py delete_policies gen_nssi_policies

Attribute Mapping of slice/service profile

maxBandwidth: max_bandwidth
jitter: jitter
sST: sst
latency: latency
resourceSharingLevel: resource_sharing_level
uEMobilityLevel: ue_mobility_level
maxNumberOfUEs: max_number_of_ues
dLThptPerUE: dl_thpt_per_ue
uLThptPerUE: ul_thpt_per_ue
sNSSAI: s_nssai
pLMNIdList: plmn_id_list
activityFactor: activity_factor
coverageAreaTAList: coverage_area_ta_List
availability: availability
cSAvailabilityTarget: cs_availability_target
reliability: reliability
cSReliabilityMeanTime: cs_reliability_mean_time
dLThptPerSlice: dl_thpt_per_slice
expDataRateDL: exp_data_rate_dl
uLThptPerSlice: ul_thpt_per_slice
expDataRateUL: exp_data_rate_ul
MaxPktSize: max_pkt_size
msgSizeByte: msg_size_byte
maxNumberOfConns: max_number_of_conns
maxNumberOfPDUSessions: max_number_of_pdu_sessions
terminalDensity: terminal_density
survivalTime: survival_time
areaTrafficCapDL: area_traffic_cap_dl
areaTrafficCapUL: area_traffic_cap_ul
overallUserDensity: overall_user_density
transferIntervalTarget: transfer_interval_target
expDataRate: exp_data_rate
security: security
maxThroughput: max_throughput

  • No labels