diff options
author | sebdet <sebastien.determe@intl.att.com> | 2020-02-28 06:03:51 -0800 |
---|---|---|
committer | sebdet <sebastien.determe@intl.att.com> | 2020-03-04 12:45:52 -0800 |
commit | 897a3e004a858ef68d989dad15dde91a69e151a5 (patch) | |
tree | f341b17cbc3a234b4b011bcf7cb7cc11ba99b0ea /src/main/resources/clds/camel/rest/clamp-api-v2.xml | |
parent | f0e00e7c9ea8dd15a4aacdd880aa648539caf087 (diff) |
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 <sebastien.determe@intl.att.com>
Diffstat (limited to 'src/main/resources/clds/camel/rest/clamp-api-v2.xml')
-rw-r--r-- | src/main/resources/clds/camel/rest/clamp-api-v2.xml | 55 |
1 files changed, 30 insertions, 25 deletions
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 3ed272e7..fbf90712 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 @@ <split> <simple>${exchangeProperty[loopObject].getMicroServicePolicies()} </simple> - <setProperty propertyName="microServicePolicy"> + <setProperty propertyName="policy"> <simple>${body}</simple> </setProperty> <log loggingLevel="INFO" - message="Processing Micro Service Policy: ${exchangeProperty[microServicePolicy].getName()}" /> + message="Processing Micro Service Policy: ${exchangeProperty[policy].getName()}" /> <setProperty propertyName="raiseHttpExceptionFlag"> <simple resultType="java.lang.Boolean">false</simple> </setProperty> - <to uri="direct:delete-micro-service-policy" /> - <to uri="direct:create-micro-service-policy" /> + <to uri="direct:delete-policy" /> + <to uri="direct:create-policy" /> </split> <log loggingLevel="INFO" message="Processing all OPERATIONAL policies defined in loop ${exchangeProperty[loopObject].getName()}" /> <split> <simple>${exchangeProperty[loopObject].getOperationalPolicies()} </simple> - <setProperty propertyName="operationalPolicy"> + <setProperty propertyName="policy"> <simple>${body}</simple> </setProperty> <log loggingLevel="INFO" - message="Processing Operational Policy: ${exchangeProperty[operationalPolicy].getName()}" /> + message="Processing Operational Policy: ${exchangeProperty[policy].getName()}" /> <setProperty propertyName="raiseHttpExceptionFlag"> <simple resultType="java.lang.Boolean">false</simple> </setProperty> - <to uri="direct:delete-operational-policy" /> - <to uri="direct:create-operational-policy" /> - - <log loggingLevel="INFO" - message="Processing all GUARD policies defined in loop ${exchangeProperty[loopObject].getName()}" /> - <split> - <simple>${exchangeProperty[operationalPolicy].createGuardPolicyPayloads().entrySet()} - </simple> - <setProperty propertyName="guardPolicy"> - <simple>${body}</simple> - </setProperty> - <log loggingLevel="INFO" - message="Processing Guard Policy: ${exchangeProperty[guardPolicy].getKey()}" /> + <to uri="direct:delete-policy" /> + <to uri="direct:create-policy" /> + <choice> + <when> + <simple>${exchangeProperty['policy'].isLegacy()} == true + </simple> + <log loggingLevel="INFO" + message="Processing all GUARD policies (LEGACY) defined in loop ${exchangeProperty[loopObject].getName()}" /> + <split> + <simple>${exchangeProperty[operationalPolicy].createGuardPolicyPayloads().entrySet()} + </simple> + <setProperty propertyName="guardPolicy"> + <simple>${body}</simple> + </setProperty> + <log loggingLevel="INFO" + message="Processing Guard Policy: ${exchangeProperty[guardPolicy].getKey()}" /> - <setProperty propertyName="raiseHttpExceptionFlag"> - <simple resultType="java.lang.Boolean">false</simple> - </setProperty> - <to uri="direct:delete-guard-policy" /> - <to uri="direct:create-guard-policy" /> - </split> + <setProperty propertyName="raiseHttpExceptionFlag"> + <simple resultType="java.lang.Boolean">false</simple> + </setProperty> + <to uri="direct:delete-guard-policy" /> + <to uri="direct:create-guard-policy" /> + </split> + </when> + </choice> </split> <delay> |