...
Code Block |
---|
ACCEPT response { "Status": { "Value": "ACCEPTED", "Code": "100" }, "Payload": { "pg-streams": "{\\\"pg-streams\\\": {\\\"pg-stream\\\":[{\\\"id\\\":\\\"fw_udp1\\\", \\\"is-enabled\\\":\\\"true\\\"},{\\\"id\\\":\\\"fw_udp2\\\", \\\"is-enabled\\\":\\\"true\\\"},{\\\"id\\\":\\\"fw_udp3\\\", \\\"is-enabled\\\":\\\"true\\\"},{\\\"id\\\":\\\"fw_udp4\\\", \\\"is-enabled\\\":\\\"true\\\"},{\\\"id\\\":\\\"fw_udp5\\\", \\\"is-enabled\\\":\\\"true\\\"}]}}", "generic-vnf.vnf-id": "fw0001vm001fw001" }, "CommonHeader": { "TimeStamp": "1493841850199", "APIver": "1.01", "RequestID": "664be3d2-6c12-4f4b-a3e7-c349acced200", "SubrequestID": null, "OriginatorID": null } } SUCCESS response { "Status": { "Value": "SUCCESS", "Code": "400" }, "Payload": { "pg-streams": "{\\\"pg-streams\\\": {\\\"pg-stream\\\":[{\\\"id\\\":\\\"fw_udp1\\\", \\\"is-enabled\\\":\\\"true\\\"},{\\\"id\\\":\\\"fw_udp2\\\", \\\"is-enabled\\\":\\\"true\\\"},{\\\"id\\\":\\\"fw_udp3\\\", \\\"is-enabled\\\":\\\"true\\\"},{\\\"id\\\":\\\"fw_udp4\\\", \\\"is-enabled\\\":\\\"true\\\"},{\\\"id\\\":\\\"fw_udp5\\\", \\\"is-enabled\\\":\\\"true\\\"}]}}", "generic-vnf.vnf-id": "fw0001vm001fw001" }, "CommonHeader": { "TimeStamp": "1493841850199", "APIver": "1.01", "RequestID": "664be3d2-6c12-4f4b-a3e7-c349acced200", "SubrequestID": null, "OriginatorID": null } } TODO FAILED response |
vCPE
Policy Creation
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
tca_policy: "{
"domain": "measurementsForVfScaling",
"metricsPerEventName": [{
"eventName": "Measurement_vGMUX",
"controlLoopSchemaType": "VNF",
"policyScope": "DCAE",
"policyName": "DCAE.Config_tca-hi-lo",
"policyVersion": "v0.0.1",
"thresholds": [{
"closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
"version": "1.0.2",
"fieldPath": "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value",
"thresholdValue": 0,
"direction": "EQUAL",
"severity": "MAJOR",
"closedLoopEventStatus": "ABATED"
}, {
"closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
"version": "1.0.2",
"fieldPath": "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value",
"thresholdValue": 0,
"direction": "GREATER",
"severity": "CRITICAL",
"closedLoopEventStatus": "ONSET"
}]
}]
}" |
Code Block |
---|
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
controlLoop:
version: 2.0.0
controlLoopName: ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e
trigger_policy: unique-policy-id-1-restart
timeout: 3600
abatement: true
policies:
- id: unique-policy-id-1-restart
name: Restart the VM
description:
actor: APPC
recipe: Restart
target:
type: VM
retry: 3
timeout: 1200
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 |
DCAE Events and A&AI Enrichment (if necessary)
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
{
"closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
"version": "1.0.2",
"requestID": "0abc0000-b032-4e4b-bd30-88260f444888",
"closedLoopAlarmStart": 1478189220547,
"closedLoopEventClient": "DCAE_INSTANCE_ID.dcae-tca",
"target_type": "VNF",
"target": "generic-vnf.vnf-name",
"AAI": {
"generic-vnf.vnf-name" : "vCPE_Infrastructure_vGMUX_demo_app"
},
"from": "DCAE",
"policyScope": "DCAE",
"policyName": "DCAE.Config_tca-hi-lo",
"policyVersion": "v0.0.1",
"closedLoopEventStatus": "ONSET"
} |
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
{
"closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
"version": "1.0.2",
"requestID": "0abc0000-b032-4e4b-bd30-88260f444888",
"closedLoopAlarmStart": 1478189220547,
"closedLoopAlarmEnd": 1478589220547,
"closedLoopEventClient": "DCAE_INSTANCE_ID.dcae-tca",
"target_type": "VNF",
"target": "generic-vnf.vnf-name",
"AAI": {
"generic-vnf.vnf-name" : "vCPE_Infrastructure_vGMUX_demo_app"
},
"from": "DCAE",
"policyScope": "DCAE",
"policyName": "DCAE.Config_tca-hi-lo",
"policyVersion": "v0.0.1",
"closedLoopEventStatus": "ABATED"
}
|
APPC API Interaction
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
{
"body": {
"input": {
"common-header": {
"timestamp": "2017-08-25T21:06:23.037Z",
"api-ver": "2.00",
"originator-id": "a20e2073-30b1-4357-893b-f5ed57b66ef0",
"request-id": "a20e2073-30b1-4357-893b-f5ed57b66ef0",
"sub-request-id": "1",
"flags": {}
},
"action": "Restart",
"action-identifiers": {
"vnf-id": "vCPE_Infrastructure_vGMUX_demo_app"
}
}
},
"version": "2.0",
"rpc-name": "restart",
"correlation-id": "a20e2073-30b1-4357-893b-f5ed57b66ef0-1",
"type": "request"
} |
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
{
"body": {
"output": {
"common-header": {
"timestamp": "2017-08-25T21:06:23.037Z",
"api-ver": "2.00",
"originator-id": "a20e2073-30b1-4357-893b-f5ed57b66ef0",
"request-id": "a20e2073-30b1-4357-893b-f5ed57b66ef0",
"sub-request-id": "1",
"flags": {}
},
"status": {
"code": 400,
"message": "Restart Successful"
}
}
},
"version": "2.00",
"rpc-name": "restart",
"correlation-id": "a20e2073-30b1-4357-893b-f5ed57b66ef0-1",
"type": "response"
} |