...
GET /v2/loop/{loopName}
org.onap.policy.clamp.loop.LoopController.getLoop(${header.loopName})
return: org.onap.policy.clamp.loop.Loop
POST /v2/loop/updateGlobalProperties/{loopName}
<to uri="direct:load-loop"/>org.onap.policy.clamp.loop.LoopService.getLoop(loopName)
org.onap.policy.clamp.loop.LoopController.updateGlobalPropertiesJson(${header.loopName},${header.GlobalPropertiesJson})
return: org.onap.policy.clamp.loop.Loop
POST /v2/loop/updateOperationalPolicies/{loopName}
<to uri="direct:load-loop"/>org.onap.policy.clamp.loop.LoopService.getLoop(loopName)
org.onap.policy.clamp.loop.LoopController.updateOperationalPolicies(${header.loopName},${header.OperationalPoliciesArray})
return: org.onap.policy.clamp.loop.Loop
POST /v2/loop/updateMicroservicePolicy/{loopName}
<to uri="direct:load-loop"/>org.onap.policy.clamp.loop.LoopService.getLoop(loopName)
org.onap.policy.clamp.loop.LoopController.updateMicroservicePolicy(${header.loopName},${exchangeProperty[MicroServicePolicyObject]})
return: org.onap.policy.clamp.policy.microservice.MicroServicePolicy
PUT /v2/loop/deploy/{loopName}
<to uri="direct:load-loop"/>org.onap.policy.clamp.loop.LoopService.getLoop(loopName)
<to uri="direct:deploy-loop"/>
return: org.onap.policy.clamp.loop.Loop
PUT /v2/loop/refreshMicroServicePolicyJsonSchema/{loopName}/{microServicePolicyName}
<to uri="direct:load-loop"/>org.onap.policy.clamp.loop.LoopService.getLoop(loopName)
org.onap.policy.clamp.loop.cds.CdsDataInstaller.updateCdsServiceProperties(${exchangeProperty[loopObject].getModelService()})
org.onap.policy.clamp.loop.LoopController.refreshMicroServicePolicyJsonRepresentation(${exchangeProperty[loopObject]},${header.microServicePolicyName})
return: org.onap.policy.clamp.loop.Loop
PUT /v2/loop/refreshOperationalPolicyJsonSchema/{loopName}/{operationalPolicyName}
<to uri="direct:load-loop"/>org.onap.policy.clamp.loop.LoopService.getLoop(loopName)
org.onap.policy.clamp.loop.cds.CdsDataInstaller.updateCdsServiceProperties(${exchangeProperty[loopObject].getModelService()})
org.onap.policy.clamp.loop.LoopController.refreshOperationalPolicyJsonRepresentation(${exchangeProperty[loopObject]},${header.operationalPolicyName})
return: org.onap.policy.clamp.loop.Loop
PUT /v2/loop/undeploy/{loopName}
org.onap.policy.clamp.loop.LoopService.getLoop(loopName)
<to uri="direct:loadundeploy-loop"/>
<to uri="direct:undeploy-loop
return: org.onap.policy.clamp.loop.Loop
PUT /v2/loop/stop/{loopName}
<to uri="direct:load-loop"/>org.onap.policy.clamp.loop.LoopService.getLoop(loopName)
<to uri="direct:remove-all-policy-from-active-pdp-group"/>
return: org.onap.policy.clamp.loop.Loop
PUT /v2/loop/restart/{loopName}
<to uri="direct:load-loop"/>org.onap.policy.clamp.loop.LoopService.getLoop(loopName)
<to uri="direct:add-policies-from-loop-to-pdp-group"/>
return: org.onap.policy.clamp.loop.Loop
PUT /v2/loop/submit/{loopName}
<to uri="direct:load-loop"/>org.onap.policy.clamp.loop.LoopService.getLoop(loopName)
<to uri="direct:remove-all-policy-from-active-pdp-group"/>
<to uri="direct:delete-policy-from-loop-object"/>
<to uri="direct:create-policy-from-loop-object"/>
<to uri="direct:delete-policy-from-loop-object"/>
<to uri="direct:create-policy-from-loop-object"/>
<to uri="direct:add-policies-from-loop-to-pdp-group"/>
return: org.onap.policy.clamp.loop.Loop
PUT /v2/loop/delete/{loopName}
<to uri="direct:load-loop"/>org.onap.policy.clamp.loop.LoopService.getLoop(loopName)
<to uri="direct:undeploy-loop"/>
<to uri="direct:remove-all-policy-from-active-pdp-group"/>
<to uri="direct:delete-policy-from-loop-object"/>
<to uri="direct:delete-policy-from-loop-object"/>
org.onap.policy.clamp.loop.LoopController.deleteLoop(${header.loopName})
GET /v2/loop/getstatus/{loopName}
<to uri="direct:load-loop"/>org.onap.policy.clamp.loop.LoopService.getLoop(loopName)
<to uri="direct:update-policy-status-for-loop"/>
<to uri="direct:update-dcae-status-for-loop"/>
<to uri="direct:update-loop-state"/>
return: org.onap.policy.clamp.loop.Loop
PUT /v2/loop/addOperationaPolicy/{loopName}/policyModel/{policyType}/{policyVersion}
<to uri="direct:load-loop"/>org.onap.policy.clamp.loop.LoopService.getLoop(loopName)
org.onap.policy.clamp.loop.LoopController.addOperationalPolicy(${header.loopName},${header.policyType},${header.policyVersion})
return: org.onap.policy.clamp.loop.Loop
PUT /v2/loop/removeOperationaPolicy/{loopName}/policyModel/{policyType}/{policyVersion}/{policyName}
<to uri="direct:load-loop"/>org.onap.policy.clamp.loop.LoopService.getLoop(loopName)
<to uri="direct:remove-one-policy-from-active-pdp-group"/>
<to uri="direct:delete-policy-from-loop-object"/>
org.onap.policy.clamp.loop.LoopController.removeOperationalPolicy(${header.loopName},${header.policyType},${header.policyVersion})
return: org.onap.policy.clamp.loop.Loop
...
Clamp is also used as router, several end points are just redirection to Api and Pap and could be removed. Policy-guy could use an external router/gateway or direct call. Anyway clamp is still need to call Api and Pap.
Logging
- clamp runtime: for each end point clamp calls a Java method to log description of the endpoint (e.g. "Create Loop" and "Successful" when finished) and to insert into MDC "X-ONAP-RequestID", "X-ONAP-InvocationID" and "X-ONAP-PartnerName"
- clamp runtime acm: using RequestResponseLoggingFilter filter class we can log the url (e.g. "POST /v2/loop/create/{loopName}?templateName={templateName}" and "Successful" when finished) and insert into MDC "X-ONAP-RequestID", "X-ONAP-InvocationID" and "X-ONAP-PartnerName"
...