This document is related to the Jira task "POLICY-3470".
clamp GUI - PolicyService.js
GET restservices/clds/v2/policies
POST restservices/clds/v2/policies/{policyModelType}/{policyModelVersion}/{policyName}/{policyVersion}
DELETE restservices/clds/v2/policies/{policyModelType}/{policyModelVersion}/{policyName}/{policyVersion}
PUT restservices/clds/v2/policies/pdpDeployment
POST restservices/clds/v2/policies/policytype
...
- calls "direct:get-all-policies" in policy-flows.xml that calls GET "/policy/api/v1/policies"
- calls "direct:get-all-pdp-groups" in policy-flows.xml that calls GET "/policy/pap/v1/pdps"
- merges result
...
- calls PolicyModelsService.getPolicyModelTosca: policyModelsRepository.findById (Retrieves the Tosca model Yaml string)
- calls PolicyPayload.createPolicyPayload to create a Json body
- calls "direct:create-policy" in policy-flows.xml that calls POST "/policy/api/v1/policytypes/{policyModelType}/versions/{policyModelVersion}/policies"
...
- calls "direct:undeploy-one-policy-from-pap" in policy-flows.xml that calls DELETE "/policy/pap/v1/pdps/policies/{policyName}/versions/{policyVersion}"
- calls "direct:delete-policy" in policy-flows.xml that calls DELETE "/policy/api/v1/policytypes/{policyModelType}/versions/{policyModelVersion}/policies/{policyName}/versions/{policyVersion}"
Flow PUT restservices/clds/v2/policies/pdpDeployment
clamp-api-v2.xml:
- calls PdpGroupPayload.generatePdpGroupPayloadFromList to create a Json body
- calls "direct:add-multiple-policies-to-pdp-group" in policy-flows.xml that calls POST "/policy/pap/v1/pdps/deployments/batch"
Flow POST restservices/clds/v2/policies/policytype
clamp-api-v2.xml:
- call "direct:create-policy-type" in policy-flows.xml that calls POST "/policy/api/v1/policytypes"
- call PolicyEngineController.synchronizeAllPolicies() that download All PolicyModels