...
1.1.2 Create Configuration Policy
...
Create configuration policy with the parameters :
cllId: The id of the CLL service which to monitor
closedLoopStatus: monitor the service or not, off: don't monitor , on: monitor
originalBw: The original intent bandwidth,this is used to reverse the bandwidth if the sporadic high-flow is passed.
Code Block |
---|
Method: POST
URL: https://policyhost:port/policy/api/v1/policytypes/onap.policies.monitoring.docker.slicems.app/versions/1.0.0/policies
Body:
{
"tosca_definitions_version":"tosca_simple_yaml_1_1_0",
"topology_template":{
"policies":[
{
"onap.dcae.slicems.config":{
"type":"onap.policies.monitoring.docker.slicems.app",
"type_version":"1.0.0",
"version":"1.0.0",
"metadata":{
"policy-id":"onap.dcae.slicems.config",
"policy-version":1
},
"properties":{
"cllId":"cll-01",
"closedLoopStatus":"on",
"originalBw":"1000"
}
}
}
]
}
} |
...
Code Block |
---|
Method: POST URL: https://policyhost:port/policy/api/v1/policytypes/onap.policies.monitoring.docker.slicems.app/versions/1.0.0/policies Body: { "tosca_definitions_version": "tosca_simple_yaml_1_1_0", "topology_template": { "inputs": {}, "policies": [ { "operational.modifycll": { "type": "onap.policies.controlloop.operational.common.Drools", "type_version": "1.0.0", "properties": { "operations": [ { "id": "unique-policy-id-1-modify-cll", "description": "Modify resource allocation for a slice subnet instance", "operation": { "actor": "SO", "operation": "ModifyCloudLeasedLine", "target": { "targetType": "VNF" } }, "timeout": 1200, "retries": 0, "success": "final_success", "failure": "final_failure", "failure_timeout": "final_failure_timeout", "failure_retries": "final_failure_retires", "failure_exception": "final_failure_exception", "failure_guard": "final_failure_guard" } ], "controllerName": "usecases", "id": "ControlLoop-CCVPN-CLL-227e8b00-dbeb-4d03-8719-d0a658fb846c", "trigger": "unique-policy-id-1-modify-cll", "id": "ControlLoop-CCVPN-CLL-227e8b00-dbeb-4d03-8719-d0a658fb846c", "trigger": "unique-policy-id-1-modify-cll", "abatement": false, "timeout": 1200 }, "name": "operational.modifycll", "version": "1.0.0", "metadata": { "policy-id": "operational.modifycll", "policy-version": "1.0.0", "policy_id": "operational.modifycll" } } } ] }, "name": "ToscaServiceTemplateSimple", "version": "1.0.0" } |
1.2.2 Deploy the drools policy
Code Block |
---|
Method: POST
URL: https://policypaphost:port/policy/pap/v1/pdps/policies
Body:
{
"policies": [
{
"policy-id": "operational.modifycll",
"policy-version": 1
}
]
}
|
2. Remove the sporadic high-flow transfer support intent
2.1 Update(delete and create) Configuration Policy
Note: Update policy is not supported by Policy module now ,so delete and create is used for update.
2.1.1 Undeploy Configuration Policy
Code Block |
---|
Method: DELETE
URL: https://policypaphost:port/policy/pap/v1/pdps/policies/onap.dcae.slicems.config |
2.1.2 Delete Configuration Policy
Code Block |
---|
Method: DELETE
URL: https://policyhost:port/policy/api/v1/policies/onap.dcae.slicems.config/versions/1.0.0 |
2.1.3 Create Configuration Policy
Recreate the configuration policy with the closedLoopStatus as "off" to remove the monitoring CLL bandwith.
Code Block |
---|
Method: POST URL: https://policyhost:port/policy/api/v1/policytypes/onap.policies.monitoring.docker.slicems.app/versions/1.0.0/policies Body: { "tosca_definitions_version":"tosca_simple_yaml_1_1_0", "topology_template":{ "policies":[ "abatement": false, { "timeoutonap.dcae.slicems.config":{ 1200 }"type":"onap.policies.monitoring.docker.slicems.app", "nametype_version": "operational1.0.modifycll0", "version": "1.0.0", "metadata": { "policy-id": "operational.modifycllonap.dcae.slicems.config", "policy-version": "1.0.0",1 }, "policy_id": "operational.modifycll"properties":{ }"cllId":"cll-01", } "closedLoopStatus":"off", } ] }, "nameoriginalBw": "ToscaServiceTemplateSimple",1000" "version": "1.0.0" } |
1.2.2 Deploy the drools policy
Code Block |
---|
Method: POST} URL: https://policypaphost:port/policy/pap/v1/pdps/policies Body: { "policies": [ { } "policy-id": "operational.modifycll", "policy-version": 1} } ] } |
2. Remove the sporadic high-flow transfer support intent
2.1 Update(delete and create) Configuration Policy
...
}
}
|
2.1.
...
4 Deploy configuration policy
Code Block |
---|
Method: POST URL: https://policypaphost:port/policy/pap/v1/pdps/policies Body: { "policies": [ { "policy-id": "onap.dcae.slicems.config", "policy-version": 1 } ] } |