...
where modifynssi.json is,
{
"tosca_definitions_version" : "tosca_simple_yaml_1_1_0" ,
"topology_template" : {
"policies" : [
{
"operational.modifynssi" : {
"type" : "onap.policies.controlloop.operational.common.Drools" ,
"type_version" : "1.0.0" ,
"version" : "1.0.0" ,
"name" : "operational.modifynssi" ,
"metadata" : {
"policy-id" : "operational.modifynssi"
},
"properties" : {
"id" : "ControlLoop-Slicing-116d7b00-dbeb-4d03-8719-d0a658fa735b" ,
"timeout" : 1200 ,
"abatement" : false ,
"trigger" : "unique-policy-id-1-modify-nssi" ,
"operations" : [
{
"id" : "unique-policy-id-1-modify-nssi" ,
"description" : "Modify resource allocation for a slice subnet instance" ,
"operation" : {
"actor" : "SO" ,
"operation" : "Modify NSSI" ,
"target" : {
"targetType" : "VNF"
}
},
"timeout" : 1200 ,
"retries" : 0 ,
"success" : "final_success" ,
"failure" : "final_failure" ,
"failure_timeout" : "final_failure_timeout" ,
"failure_retries" : "final_failure_retries" ,
"failure_exception" : "final_failure_exception" ,
"failure_guard" : "final_failure_guard"
}
],
"controllerName" : "usecases"
}
}
}
]
}
}
|
To push the policy:
curl --silent -k --user 'policyadmin:zb!XztG34' -X POST "https://policy-pap:6969/policy/pap/v1/pdps/policies" -H "Accept: application/json" -H "Content-Type: application/json" -d @push_modifynssi.json
where push_modifynssi.json is,
{
"policies" : [
{
"policy-id" : "operational.modifynssi" ,
"policy-version" : 1
}
]
}
|
Deployment Prerequisite/dependencies
...
- git clone "https://gerrit.onap.org/r/dcaegen2/services"(use patchset ml-prediction-ms if code not merged)
- cd services/components/ml-prediction-ms
- Update Ransim, Dmaap and ConfigDB IPAddress/Port details in ml-prediction-ms.config
- Build docker image using: 'docker build -t ml-prediction-ms:latest .'
- Run the ml-prediction-ms container.
- docker run -d --name ml-prediction-ms -p "5000:5000" ml-prediction-ms:latest
- To view the logs:
- docker exec -ti ml-prediction-ms bash
- tail -f IntelligentSliceMl.log
...