...
Create customer(5GCustomer) and service-subscription(5G) in AAI.
OOF Configuration
...
1) In OOF charts- oom/kubernetes/oof/resources/config/common-config.yaml, the following changes has to be made before deploying oof.
- oof/resources/config/common-config.yml has to be updated to use local policies instead of remote policies. change "global_disabled" from True to False
...
3) Local policies (vnf, subscriber & threshold policy) should be copied to the osdf pod (/opt/osdf/test/policy-local-policies/ )
(i) Execute the below script in the test environment by passing nst name, nsst name, model invariant id of NSST & model version id (aka) model uuid of NSST (in the same order as mentioned here)
./policy.sh <NST name> <NSST name> <model-invariant-id of NSST> <model-version-id of NSST>
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
#./policy.sh EmbbNst EmbbCn 5t636c4d-5e76-427e-bfd6-241a947224b0 1a636c4d-5e76-427e-bfd6-241a947224b0 |
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
mkdir test
cd test
mkdir policy-local-files
cd policy-local-files
cat <<EOF >vnfPolicy_URLLC_Core_1.json
{
"OSDF_FRANKFURT.vnfPolicy_URLLC_Core_1": {
"type": "onap.policies.optimization.resource.VnfPolicy",
"version": "1.0.0",
"type_version": "1.0.0",
"metadata": {
"policy-id": "OSDF_FRANKFURT.vnfPolicy_URLLC_Core_1",
"policy-version": 1
},
"properties": {
"scope": [
"OSDF_FRANKFURT",
"$1",
"$2"
],
"resources": [
"$2"
],
"services": [
"$1"
],
"identity": "vnf_URLLC_Core_1",
"applicableResources": "any",
"vnfProperties": [
{
"inventoryProvider": "aai",
"inventoryType": "nssi",
"region": "RegionOne",
"attributes": {
"orchestrationStatus": "active",
"service-role": "nssi",
"modelInvariantId":"$3",
"modelVersionId":"$4"
}
}
]
}
}
}
EOF
cat <<EOF >thresholdPolicy_URLLC_Core_1.json
{
"OSDF_FRANKFURT.Threshold_URLLC_Core_1":{
"type":"onap.policies.optimization.resource.ThresholdPolicy",
"version":"1.0.0",
"type_version":"1.0.0",
"metadata":{
"policy-id":"OSDF_FRANKFURT.Threshold_URLLC_Core_1",
"policy-version":1
},
"properties":{
"scope":[
"OSDF_FRANKFURT",
"$1",
"$2"
],
"resources":[
"$2"
],
"services":[
"$1"
],
"geography": [],
"identity":"Threshold_URLLC_Core_1",
"thresholdProperties":[
{
"attribute":"latency",
"operator":"lte",
"threshold":5,
"unit":"ms"
}
]
}
}
}
EOF
cat <<EOF >subscriber_policy_URLLC_1.json
{
"OSDF_FRANKFURT.SubscriberPolicy_URLLC_1": {
"type": "onap.policies.optimization.service.SubscriberPolicy",
"version": "1.0.0",
"type_version": "1.0.0",
"metadata": {
"policy-id": "OSDF_FRANKFURT.SubscriberPolicy_URLLC_1",
"policy-version": 1
},
"properties": {
"scope": [
"OSDF_FRANKFURT",
"$1"
],
"services": [
"$1"
],
"identity": "subscriber_URLLC_1",
"properties": {
"subscriberName": [
"$2"
]
}
}
}
}
EOF |
(ii) after the script gets executed, directory named "test" gets created. Copy the test directory inside the Pod
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
# kubectl cp -n onap <path to the test folder> <osdf-pod name>:/opt/osdf/ |
...
Example of these three policies can be found in this link https://wiki.onap.org/display/DW/Policy+Models+and+Sample+policies+-+NSI+selection
...