Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

This document is related to the Jira task "POLICY-3470".

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


Flow GET restservices/clds/v2/policies

clamp-api-v2.xml:

  • calls "direct:get-all-policies" in policy-flows.xml that calls "/policy/api/v1/policies"
  • calls "direct:get-all-pdp-groups" in policy-flows.xml that calls "/policy/pap/v1/pdps"
  • merges result

Flow POST restservices/clds/v2/policies/{policyModelType}/{policyModelVersion}/{policyName}/{policyVersion}

clamp-api-v2.xml:

  • 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 "/policy/api/v1/policytypes/{policyModelType}/versions/{policyModelVersion}/policies"

Flow DELETE restservices/clds/v2/policies/{policyModelType}/{policyModelVersion}/{policyName}/{policyVersion}

clamp-api-v2.xml:

  • calls "direct:undeploy-one-policy-from-pap" in policy-flows.xml that calls "/policy/pap/v1/pdps/policies/{policyName}/versions/{policyVersion}"
  • calls "direct:delete-policy" in policy-flows.xml that calls "/policy/api/v1/policytypes/{policyModelType}/versions/{policyModelVersion}/policies/{policyName}/versions/{policyVersion}"



  • No labels