From 897a3e004a858ef68d989dad15dde91a69e151a5 Mon Sep 17 00:00:00 2001 From: sebdet Date: Fri, 28 Feb 2020 06:03:51 -0800 Subject: Change json representation in op policy Change the json generation for an operational policy instance and update all emulator response for all policy types Issue-ID: CLAMP-653 Change-Id: I68525be3d5bfbf5dd7a4bcf6d59853df07fd4dd9 Signed-off-by: sebdet --- .../resources/clds/camel/rest/clamp-api-v2.xml | 55 +++++++------ .../resources/clds/camel/routes/policy-flows.xml | 96 ++++++++++++++++++++++ 2 files changed, 126 insertions(+), 25 deletions(-) (limited to 'src/main/resources/clds') diff --git a/src/main/resources/clds/camel/rest/clamp-api-v2.xml b/src/main/resources/clds/camel/rest/clamp-api-v2.xml index 3ed272e7c..fbf90712a 100644 --- a/src/main/resources/clds/camel/rest/clamp-api-v2.xml +++ b/src/main/resources/clds/camel/rest/clamp-api-v2.xml @@ -377,51 +377,56 @@ ${exchangeProperty[loopObject].getMicroServicePolicies()} - + ${body} + message="Processing Micro Service Policy: ${exchangeProperty[policy].getName()}" /> false - - + + ${exchangeProperty[loopObject].getOperationalPolicies()} - + ${body} + message="Processing Operational Policy: ${exchangeProperty[policy].getName()}" /> false - - - - - - ${exchangeProperty[operationalPolicy].createGuardPolicyPayloads().entrySet()} - - - ${body} - - + + + + + ${exchangeProperty['policy'].isLegacy()} == true + + + + ${exchangeProperty[operationalPolicy].createGuardPolicyPayloads().entrySet()} + + + ${body} + + - - false - - - - + + false + + + + + + diff --git a/src/main/resources/clds/camel/routes/policy-flows.xml b/src/main/resources/clds/camel/routes/policy-flows.xml index afc5f952a..48e518da9 100644 --- a/src/main/resources/clds/camel/routes/policy-flows.xml +++ b/src/main/resources/clds/camel/routes/policy-flows.xml @@ -183,6 +183,102 @@ + + + + + + + ${exchangeProperty[policy].createPolicyPayload()} + + + + POST + + + application/json + + + ${exchangeProperty[X-ONAP-RequestID]} + + + + ${exchangeProperty[X-ONAP-InvocationID]} + + + + ${exchangeProperty[X-ONAP-PartnerName]} + + + + + + + + + ${exchangeProperty[policy].getName()} creation + status + + + + POLICY + + + + + + + + + + + + + null + + + DELETE + + + ${exchangeProperty[X-ONAP-RequestID]} + + + + ${exchangeProperty[X-ONAP-InvocationID]} + + + + ${exchangeProperty[X-ONAP-PartnerName]} + + + + + + + + + + ${exchangeProperty[policy].getName()} removal + status + + + + POLICY + + + + + -- cgit 1.2.3-korg