From 919ef9dc0a2f392868533e498897b12fe0faa321 Mon Sep 17 00:00:00 2001 From: sebdet Date: Mon, 8 Apr 2019 18:32:26 +0200 Subject: Create submit route Create required components for Submit route in camel + unit tests + Policy payload generation + emulator feature for new policy api Issue-ID: CLAMP-303 Change-Id: If9033cfa3f4e346e2cbd7f891baff1f2c04a40a2 Signed-off-by: sebdet --- .../resources/clds/camel/routes/flexible-flow.xml | 149 +++++++++++++++++++-- 1 file changed, 137 insertions(+), 12 deletions(-) (limited to 'src/main/resources/clds/camel/routes/flexible-flow.xml') diff --git a/src/main/resources/clds/camel/routes/flexible-flow.xml b/src/main/resources/clds/camel/routes/flexible-flow.xml index b8244990b..15a247b5d 100644 --- a/src/main/resources/clds/camel/routes/flexible-flow.xml +++ b/src/main/resources/clds/camel/routes/flexible-flow.xml @@ -75,43 +75,168 @@ - - + + + + + + + + ${header.LoopObject} == null + + 404 + + + + + + + + + + + + ${header.microServicePolicy.createPolicyPayload()} + + - DELETE + POST + + + application/json - {{clamp.config.policy.url}}/policyTypes/${body.getModelType()}/versions/1.0.0/policies/${body.getName()} + {{clamp.config.policy.url}}/policyTypes/${header.microServicePolicy.getModelType()}/versions/1.0.0/policies + + + + + + null - + + DELETE + + + {{clamp.config.policy.url}}/policyTypes/${header.microServicePolicy.getModelType()}/versions/1.0.0/policies/${header.microServicePolicy.getName()} + + + uri="http4://policyhost:8085?throwExceptionOnFailure=${header.HttpQueryExceptionFlag}&deleteWithBody=false&mapHttpMessageBody=false&mapHttpMessageFormUrlEncodedBody=false" /> + + + + + + + ${header.operationalPolicy.createPolicyPayload()} + + + + POST + + + application/json + + + {{clamp.config.policy.url}}/policyTypes/onap.policies.controloop.operational/versions/1.0.0/policies + + + + + + + + + + null + + + DELETE + + + {{clamp.config.policy.url}}/policyTypes/onap.policies.controloop.operational/versions/1.0.0/policies/${header.operationalPolicy.getName()} + + + + - - + + + + + ${header.guardPolicy.getValue()} + + POST + + application/json + - {{clamp.config.policy.url}}/policyTypes/${body.getModelType()}/versions/1.0.0/policies + {{clamp.config.policy.url}}/policyTypes/onap.policies.controlloop.Guard/versions/1.0.0/policies - + message="Policy Endpoint for operational ${header.CamelHttpMethod} ${header.CamelHttpUri}"> + + + + + + + null + + + DELETE + + + {{clamp.config.policy.url}}/policyTypes/onap.policies.controlloop.Guard/versions/1.0.0/policies/${header.guardPolicy.getKey()} + + + + uri="http4://policyhost:8085?throwExceptionOnFailure=${header.HttpQueryExceptionFlag}&deleteWithBody=false&mapHttpMessageBody=false&mapHttpMessageFormUrlEncodedBody=false" /> \ No newline at end of file -- cgit 1.2.3-korg