diff options
author | sebdet <sebastien.determe@intl.att.com> | 2021-02-26 19:14:03 +0100 |
---|---|---|
committer | S�bastien Determe <sebastien.determe@intl.att.com> | 2021-03-11 15:55:31 +0000 |
commit | 1e2760ea1ee4baa9db0e921907f3491fda795136 (patch) | |
tree | 5f2e508e3c26fb1ba06b3db019c2257c69392367 /src/main/resources/clds/camel/rest/clamp-api-v2.xml | |
parent | ea2969fd3bbfe52cbe4f41546dd40d68321c233b (diff) |
Introduce a new json editor component
Add this a new react component so that the json editor can be called within the policies table
+ Add the tosca tab
+ Fix for Submit operation in clamp-api-v2.xml
Issue-ID: POLICY-3106
Issue-ID: POLICY-3124
Signed-off-by: sebdet <sebastien.determe@intl.att.com>
Change-Id: I18ab3a6034cac719525774f11b2c17f0a14bc2aa
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 | 25 |
1 files changed, 14 insertions, 11 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 01ad8a8a3..7de2de1c9 100644 --- a/src/main/resources/clds/camel/rest/clamp-api-v2.xml +++ b/src/main/resources/clds/camel/rest/clamp-api-v2.xml @@ -500,7 +500,7 @@ <simple resultType="java.lang.Boolean">false</simple> </setProperty> <to uri="direct:delete-policy-from-loop-object"/> - <to uri="direct:create-policy"/> + <to uri="direct:create-policy-from-loop-object"/> </split> <log loggingLevel="INFO" message="Processing all OPERATIONAL policies defined in loop ${exchangeProperty[loopObject].getName()}"/> @@ -517,7 +517,7 @@ </setProperty> <to uri="direct:delete-policy-from-loop-object"/> - <to uri="direct:create-policy"/> + <to uri="direct:create-policy-from-loop-object"/> </split> <delay> @@ -1363,32 +1363,35 @@ </get> <!-- Create a new policy --> - <post uri="/v2/policies/{policyModelName}/{policyModelVersion}" + <post uri="/v2/policies/{policyModelType}/{policyModelVersion}/{policyName}/{policyVersion}" type="com.google.gson.JsonElement" consumes="application/json" outType="com.google.gson.JsonObject" produces="application/json"> <route> <removeHeaders pattern="*" - excludePattern="policyModelName|policyModelVersion"/> + excludePattern="policyModelType|policyModelVersion|policyName|policyVersion"/> <doTry> <to uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'CREATE a new Policy ')"/> <to uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'policies','','update')"/> - <setProperty propertyName="policyModelName"> - <simple>${header.policyModelName}</simple> + <setProperty propertyName="policyModelType"> + <simple>${header.policyModelType}</simple> </setProperty> <setProperty propertyName="policyModelVersion"> <simple>${header.policyModelVersion}</simple> </setProperty> + <setProperty propertyName="policyProperties"> + <simple>${body}</simple> + </setProperty> + <to + uri="bean:org.onap.policy.clamp.loop.template.PolicyModelsService?method=getPolicyModelTosca(${header.policyModelType},${header.policyModelVersion})"/> <setBody> - <method ref="org.onap.policy.clamp.policy.pdpgroup.PoliciesPdpMerger" - method="removePdpStatesOnePolicy(${body})"/> + <method ref="org.onap.policy.clamp.policy.PolicyPayload" + method="createPolicyPayload(${header.policyModelType}, ${header.policyModelVersion}, + ${header.policyName}, ${header.policyVersion}, ${exchangeProperty[policyProperties]}, ${body})"/> </setBody> - <setBody> - <simple>${body.toString()}</simple> - </setBody> <to uri="direct:create-policy"/> <to uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()"/> |