summaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
authorsebdet <sebastien.determe@intl.att.com>2021-01-24 16:40:18 +0100
committerS�bastien Determe <sebastien.determe@intl.att.com>2021-02-08 14:41:24 +0000
commit9d04a9cc8c6f4b12ae60cc0d4d42f71085f72328 (patch)
treea6767d8304537ea649b75e4bf90987369ae2de6d /src/main
parentd2178bc9f7d6c06f60a3a8afecd83e428d84cd78 (diff)
Add new Camel route
Add the new rest endpoint in camel + add new permission type + add robot test for that route + small refactoring of trst files Issue-ID: POLICY-2924 Signed-off-by: sebdet <sebastien.determe@intl.att.com> Change-Id: I623cc8ec1724513cdb92eeea000adca5c2433bae
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/org/onap/policy/clamp/clds/ClampServlet.java13
-rw-r--r--src/main/resources/META-INF/resources/swagger.html269
-rw-r--r--src/main/resources/application-noaaf.properties3
-rw-r--r--src/main/resources/application.properties3
-rw-r--r--src/main/resources/clds/camel/rest/clamp-api-v2.xml2592
-rw-r--r--src/main/resources/clds/clds-users.json63
6 files changed, 1521 insertions, 1422 deletions
diff --git a/src/main/java/org/onap/policy/clamp/clds/ClampServlet.java b/src/main/java/org/onap/policy/clamp/clds/ClampServlet.java
index 801f59c31..5149dd3b7 100644
--- a/src/main/java/org/onap/policy/clamp/clds/ClampServlet.java
+++ b/src/main/java/org/onap/policy/clamp/clds/ClampServlet.java
@@ -2,7 +2,7 @@
* ============LICENSE_START=======================================================
* ONAP CLAMP
* ================================================================================
- * Copyright (C) 2018 AT&T Intellectual Property. All rights
+ * Copyright (C) 2018, 2021 AT&T Intellectual Property. All rights
* reserved.
* ================================================================================
* Modifications Copyright (c) 2019 Samsung
@@ -62,6 +62,7 @@ public class ClampServlet extends CamelHttpTransportServlet {
private static final String PERM_VF = "clamp.config.security.permission.type.filter.vf";
private static final String PERM_MANAGE = "clamp.config.security.permission.type.cl.manage";
private static final String PERM_TOSCA = "clamp.config.security.permission.type.tosca";
+ private static final String PERM_POLICIES = "clamp.config.security.permission.type.policies";
private static final String AUTHENTICATION_CLASS = "clamp.config.security.authentication.class";
private static final String READ = "read";
private static final String UPDATE = "update";
@@ -95,8 +96,14 @@ public class ClampServlet extends CamelHttpTransportServlet {
permissionList.add(SecureServicePermission
.create(applicationContext.getEnvironment().getProperty(PERM_TOSCA), cldsPermissionInstance, READ));
permissionList.add(SecureServicePermission
- .create(applicationContext.getEnvironment().getProperty(PERM_TOSCA),
- cldsPermissionInstance, UPDATE));
+ .create(applicationContext.getEnvironment().getProperty(PERM_TOSCA), cldsPermissionInstance,
+ UPDATE));
+ permissionList.add(SecureServicePermission
+ .create(applicationContext.getEnvironment().getProperty(PERM_POLICIES), cldsPermissionInstance,
+ READ));
+ permissionList.add(SecureServicePermission
+ .create(applicationContext.getEnvironment().getProperty(PERM_POLICIES), cldsPermissionInstance,
+ UPDATE));
}
return permissionList;
}
diff --git a/src/main/resources/META-INF/resources/swagger.html b/src/main/resources/META-INF/resources/swagger.html
index ab1d4fa1a..6712ab096 100644
--- a/src/main/resources/META-INF/resources/swagger.html
+++ b/src/main/resources/META-INF/resources/swagger.html
@@ -444,31 +444,31 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
</li>
<li><a href="#_paths">2. Paths</a>
<ul class="sectlevel2">
-<li><a href="#_route107">2.1. GET /v1/healthcheck</a>
+<li><a href="#_route184">2.1. GET /v1/healthcheck</a>
<ul class="sectlevel3">
<li><a href="#_responses">2.1.1. Responses</a></li>
<li><a href="#_produces">2.1.2. Produces</a></li>
</ul>
</li>
-<li><a href="#_route108">2.2. GET /v1/user/getUser</a>
+<li><a href="#_route185">2.2. GET /v1/user/getUser</a>
<ul class="sectlevel3">
<li><a href="#_responses_2">2.2.1. Responses</a></li>
<li><a href="#_produces_2">2.2.2. Produces</a></li>
</ul>
</li>
-<li><a href="#_route106">2.3. GET /v2/clampInformation</a>
+<li><a href="#_route183">2.3. GET /v2/clampInformation</a>
<ul class="sectlevel3">
<li><a href="#_responses_3">2.3.1. Responses</a></li>
<li><a href="#_produces_3">2.3.2. Produces</a></li>
</ul>
</li>
-<li><a href="#_route91">2.4. GET /v2/dictionary</a>
+<li><a href="#_route167">2.4. GET /v2/dictionary</a>
<ul class="sectlevel3">
<li><a href="#_responses_4">2.4.1. Responses</a></li>
<li><a href="#_produces_4">2.4.2. Produces</a></li>
</ul>
</li>
-<li><a href="#_route94">2.5. PUT /v2/dictionary</a>
+<li><a href="#_route170">2.5. PUT /v2/dictionary</a>
<ul class="sectlevel3">
<li><a href="#_parameters">2.5.1. Parameters</a></li>
<li><a href="#_responses_5">2.5.2. Responses</a></li>
@@ -476,20 +476,20 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
<li><a href="#_produces_5">2.5.4. Produces</a></li>
</ul>
</li>
-<li><a href="#_route92">2.6. GET /v2/dictionary/secondary/names</a>
+<li><a href="#_route168">2.6. GET /v2/dictionary/secondary/names</a>
<ul class="sectlevel3">
<li><a href="#_responses_6">2.6.1. Responses</a></li>
<li><a href="#_produces_6">2.6.2. Produces</a></li>
</ul>
</li>
-<li><a href="#_route93">2.7. GET /v2/dictionary/{dictionaryName}</a>
+<li><a href="#_route169">2.7. GET /v2/dictionary/{dictionaryName}</a>
<ul class="sectlevel3">
<li><a href="#_parameters_2">2.7.1. Parameters</a></li>
<li><a href="#_responses_7">2.7.2. Responses</a></li>
<li><a href="#_produces_7">2.7.3. Produces</a></li>
</ul>
</li>
-<li><a href="#_route95">2.8. PUT /v2/dictionary/{name}</a>
+<li><a href="#_route171">2.8. PUT /v2/dictionary/{name}</a>
<ul class="sectlevel3">
<li><a href="#_parameters_3">2.8.1. Parameters</a></li>
<li><a href="#_responses_8">2.8.2. Responses</a></li>
@@ -497,28 +497,28 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
<li><a href="#_produces_8">2.8.4. Produces</a></li>
</ul>
</li>
-<li><a href="#_route96">2.9. DELETE /v2/dictionary/{name}</a>
+<li><a href="#_route172">2.9. DELETE /v2/dictionary/{name}</a>
<ul class="sectlevel3">
<li><a href="#_parameters_4">2.9.1. Parameters</a></li>
<li><a href="#_responses_9">2.9.2. Responses</a></li>
<li><a href="#_produces_9">2.9.3. Produces</a></li>
</ul>
</li>
-<li><a href="#_route97">2.10. DELETE /v2/dictionary/{name}/elements/{shortName}</a>
+<li><a href="#_route173">2.10. DELETE /v2/dictionary/{name}/elements/{shortName}</a>
<ul class="sectlevel3">
<li><a href="#_parameters_5">2.10.1. Parameters</a></li>
<li><a href="#_responses_10">2.10.2. Responses</a></li>
<li><a href="#_produces_10">2.10.3. Produces</a></li>
</ul>
</li>
-<li><a href="#_route88">2.11. PUT /v2/loop/addOperationaPolicy/{loopName}/policyModel/{policyType}/{policyVersion}</a>
+<li><a href="#_route164">2.11. PUT /v2/loop/addOperationaPolicy/{loopName}/policyModel/{policyType}/{policyVersion}</a>
<ul class="sectlevel3">
<li><a href="#_parameters_6">2.11.1. Parameters</a></li>
<li><a href="#_responses_11">2.11.2. Responses</a></li>
<li><a href="#_produces_11">2.11.3. Produces</a></li>
</ul>
</li>
-<li><a href="#_route90">2.12. POST /v2/loop/create/{loopName}?templateName={templateName}</a>
+<li><a href="#_route166">2.12. POST /v2/loop/create/{loopName}?templateName={templateName}</a>
<ul class="sectlevel3">
<li><a href="#_parameters_7">2.12.1. Parameters</a></li>
<li><a href="#_responses_12">2.12.2. Responses</a></li>
@@ -526,82 +526,82 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
<li><a href="#_produces_12">2.12.4. Produces</a></li>
</ul>
</li>
-<li><a href="#_route86">2.13. PUT /v2/loop/delete/{loopName}</a>
+<li><a href="#_route162">2.13. PUT /v2/loop/delete/{loopName}</a>
<ul class="sectlevel3">
<li><a href="#_parameters_8">2.13.1. Parameters</a></li>
<li><a href="#_responses_13">2.13.2. Responses</a></li>
</ul>
</li>
-<li><a href="#_route79">2.14. PUT /v2/loop/deploy/{loopName}</a>
+<li><a href="#_route155">2.14. PUT /v2/loop/deploy/{loopName}</a>
<ul class="sectlevel3">
<li><a href="#_parameters_9">2.14.1. Parameters</a></li>
<li><a href="#_responses_14">2.14.2. Responses</a></li>
<li><a href="#_produces_13">2.14.3. Produces</a></li>
</ul>
</li>
-<li><a href="#_route74">2.15. GET /v2/loop/getAllNames</a>
+<li><a href="#_route150">2.15. GET /v2/loop/getAllNames</a>
<ul class="sectlevel3">
<li><a href="#_responses_15">2.15.1. Responses</a></li>
<li><a href="#_produces_14">2.15.2. Produces</a></li>
</ul>
</li>
-<li><a href="#_route87">2.16. GET /v2/loop/getstatus/{loopName}</a>
+<li><a href="#_route163">2.16. GET /v2/loop/getstatus/{loopName}</a>
<ul class="sectlevel3">
<li><a href="#_parameters_10">2.16.1. Parameters</a></li>
<li><a href="#_responses_16">2.16.2. Responses</a></li>
<li><a href="#_produces_15">2.16.3. Produces</a></li>
</ul>
</li>
-<li><a href="#_route80">2.17. PUT /v2/loop/refreshMicroServicePolicyJsonSchema/{loopName}/{microServicePolicyName}</a>
+<li><a href="#_route156">2.17. PUT /v2/loop/refreshMicroServicePolicyJsonSchema/{loopName}/{microServicePolicyName}</a>
<ul class="sectlevel3">
<li><a href="#_parameters_11">2.17.1. Parameters</a></li>
<li><a href="#_responses_17">2.17.2. Responses</a></li>
<li><a href="#_produces_16">2.17.3. Produces</a></li>
</ul>
</li>
-<li><a href="#_route81">2.18. PUT /v2/loop/refreshOperationalPolicyJsonSchema/{loopName}/{operationalPolicyName}</a>
+<li><a href="#_route157">2.18. PUT /v2/loop/refreshOperationalPolicyJsonSchema/{loopName}/{operationalPolicyName}</a>
<ul class="sectlevel3">
<li><a href="#_parameters_12">2.18.1. Parameters</a></li>
<li><a href="#_responses_18">2.18.2. Responses</a></li>
<li><a href="#_produces_17">2.18.3. Produces</a></li>
</ul>
</li>
-<li><a href="#_route89">2.19. PUT /v2/loop/removeOperationaPolicy/{loopName}/policyModel/{policyType}/{policyVersion}/{policyName}</a>
+<li><a href="#_route165">2.19. PUT /v2/loop/removeOperationaPolicy/{loopName}/policyModel/{policyType}/{policyVersion}/{policyName}</a>
<ul class="sectlevel3">
<li><a href="#_parameters_13">2.19.1. Parameters</a></li>
<li><a href="#_responses_19">2.19.2. Responses</a></li>
<li><a href="#_produces_18">2.19.3. Produces</a></li>
</ul>
</li>
-<li><a href="#_route84">2.20. PUT /v2/loop/restart/{loopName}</a>
+<li><a href="#_route160">2.20. PUT /v2/loop/restart/{loopName}</a>
<ul class="sectlevel3">
<li><a href="#_parameters_14">2.20.1. Parameters</a></li>
<li><a href="#_responses_20">2.20.2. Responses</a></li>
<li><a href="#_produces_19">2.20.3. Produces</a></li>
</ul>
</li>
-<li><a href="#_route83">2.21. PUT /v2/loop/stop/{loopName}</a>
+<li><a href="#_route159">2.21. PUT /v2/loop/stop/{loopName}</a>
<ul class="sectlevel3">
<li><a href="#_parameters_15">2.21.1. Parameters</a></li>
<li><a href="#_responses_21">2.21.2. Responses</a></li>
<li><a href="#_produces_20">2.21.3. Produces</a></li>
</ul>
</li>
-<li><a href="#_route85">2.22. PUT /v2/loop/submit/{loopName}</a>
+<li><a href="#_route161">2.22. PUT /v2/loop/submit/{loopName}</a>
<ul class="sectlevel3">
<li><a href="#_parameters_16">2.22.1. Parameters</a></li>
<li><a href="#_responses_22">2.22.2. Responses</a></li>
<li><a href="#_produces_21">2.22.3. Produces</a></li>
</ul>
</li>
-<li><a href="#_route82">2.23. PUT /v2/loop/undeploy/{loopName}</a>
+<li><a href="#_route158">2.23. PUT /v2/loop/undeploy/{loopName}</a>
<ul class="sectlevel3">
<li><a href="#_parameters_17">2.23.1. Parameters</a></li>
<li><a href="#_responses_23">2.23.2. Responses</a></li>
<li><a href="#_produces_22">2.23.3. Produces</a></li>
</ul>
</li>
-<li><a href="#_route76">2.24. POST /v2/loop/updateGlobalProperties/{loopName}</a>
+<li><a href="#_route152">2.24. POST /v2/loop/updateGlobalProperties/{loopName}</a>
<ul class="sectlevel3">
<li><a href="#_parameters_18">2.24.1. Parameters</a></li>
<li><a href="#_responses_24">2.24.2. Responses</a></li>
@@ -609,7 +609,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
<li><a href="#_produces_23">2.24.4. Produces</a></li>
</ul>
</li>
-<li><a href="#_route78">2.25. POST /v2/loop/updateMicroservicePolicy/{loopName}</a>
+<li><a href="#_route154">2.25. POST /v2/loop/updateMicroservicePolicy/{loopName}</a>
<ul class="sectlevel3">
<li><a href="#_parameters_19">2.25.1. Parameters</a></li>
<li><a href="#_responses_25">2.25.2. Responses</a></li>
@@ -617,7 +617,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
<li><a href="#_produces_24">2.25.4. Produces</a></li>
</ul>
</li>
-<li><a href="#_route77">2.26. POST /v2/loop/updateOperationalPolicies/{loopName}</a>
+<li><a href="#_route153">2.26. POST /v2/loop/updateOperationalPolicies/{loopName}</a>
<ul class="sectlevel3">
<li><a href="#_parameters_20">2.26.1. Parameters</a></li>
<li><a href="#_responses_26">2.26.2. Responses</a></li>
@@ -625,66 +625,72 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
<li><a href="#_produces_25">2.26.4. Produces</a></li>
</ul>
</li>
-<li><a href="#_route75">2.27. GET /v2/loop/{loopName}</a>
+<li><a href="#_route151">2.27. GET /v2/loop/{loopName}</a>
<ul class="sectlevel3">
<li><a href="#_parameters_21">2.27.1. Parameters</a></li>
<li><a href="#_responses_27">2.27.2. Responses</a></li>
<li><a href="#_produces_26">2.27.3. Produces</a></li>
</ul>
</li>
-<li><a href="#_route101">2.28. POST /v2/policyToscaModels</a>
+<li><a href="#_route182">2.28. GET /v2/policies/list</a>
<ul class="sectlevel3">
-<li><a href="#_parameters_22">2.28.1. Parameters</a></li>
-<li><a href="#_responses_28">2.28.2. Responses</a></li>
-<li><a href="#_consumes_7">2.28.3. Consumes</a></li>
-<li><a href="#_produces_27">2.28.4. Produces</a></li>
+<li><a href="#_responses_28">2.28.1. Responses</a></li>
+<li><a href="#_produces_27">2.28.2. Produces</a></li>
</ul>
</li>
-<li><a href="#_route98">2.29. GET /v2/policyToscaModels</a>
+<li><a href="#_route177">2.29. POST /v2/policyToscaModels</a>
<ul class="sectlevel3">
-<li><a href="#_responses_29">2.29.1. Responses</a></li>
-<li><a href="#_produces_28">2.29.2. Produces</a></li>
+<li><a href="#_parameters_22">2.29.1. Parameters</a></li>
+<li><a href="#_responses_29">2.29.2. Responses</a></li>
+<li><a href="#_consumes_7">2.29.3. Consumes</a></li>
+<li><a href="#_produces_28">2.29.4. Produces</a></li>
</ul>
</li>
-<li><a href="#_route100">2.30. GET /v2/policyToscaModels/yaml/{policyModelType}/{policyModelVersion}</a>
+<li><a href="#_route174">2.30. GET /v2/policyToscaModels</a>
<ul class="sectlevel3">
-<li><a href="#_parameters_23">2.30.1. Parameters</a></li>
-<li><a href="#_responses_30">2.30.2. Responses</a></li>
-<li><a href="#_produces_29">2.30.3. Produces</a></li>
+<li><a href="#_responses_30">2.30.1. Responses</a></li>
+<li><a href="#_produces_29">2.30.2. Produces</a></li>
</ul>
</li>
-<li><a href="#_route99">2.31. GET /v2/policyToscaModels/{policyModelType}/{policyModelVersion}</a>
+<li><a href="#_route176">2.31. GET /v2/policyToscaModels/yaml/{policyModelType}/{policyModelVersion}</a>
<ul class="sectlevel3">
-<li><a href="#_parameters_24">2.31.1. Parameters</a></li>
+<li><a href="#_parameters_23">2.31.1. Parameters</a></li>
<li><a href="#_responses_31">2.31.2. Responses</a></li>
<li><a href="#_produces_30">2.31.3. Produces</a></li>
</ul>
</li>
-<li><a href="#_route102">2.32. PUT /v2/policyToscaModels/{policyModelType}/{policyModelVersion}</a>
+<li><a href="#_route175">2.32. GET /v2/policyToscaModels/{policyModelType}/{policyModelVersion}</a>
<ul class="sectlevel3">
-<li><a href="#_parameters_25">2.32.1. Parameters</a></li>
+<li><a href="#_parameters_24">2.32.1. Parameters</a></li>
<li><a href="#_responses_32">2.32.2. Responses</a></li>
-<li><a href="#_consumes_8">2.32.3. Consumes</a></li>
-<li><a href="#_produces_31">2.32.4. Produces</a></li>
+<li><a href="#_produces_31">2.32.3. Produces</a></li>
</ul>
</li>
-<li><a href="#_route103">2.33. GET /v2/templates</a>
+<li><a href="#_route178">2.33. PUT /v2/policyToscaModels/{policyModelType}/{policyModelVersion}</a>
<ul class="sectlevel3">
-<li><a href="#_responses_33">2.33.1. Responses</a></li>
-<li><a href="#_produces_32">2.33.2. Produces</a></li>
+<li><a href="#_parameters_25">2.33.1. Parameters</a></li>
+<li><a href="#_responses_33">2.33.2. Responses</a></li>
+<li><a href="#_consumes_8">2.33.3. Consumes</a></li>
+<li><a href="#_produces_32">2.33.4. Produces</a></li>
</ul>
</li>
-<li><a href="#_route105">2.34. GET /v2/templates/names</a>
+<li><a href="#_route179">2.34. GET /v2/templates</a>
<ul class="sectlevel3">
<li><a href="#_responses_34">2.34.1. Responses</a></li>
<li><a href="#_produces_33">2.34.2. Produces</a></li>
</ul>
</li>
-<li><a href="#_route104">2.35. GET /v2/templates/{templateName}</a>
+<li><a href="#_route181">2.35. GET /v2/templates/names</a>
<ul class="sectlevel3">
-<li><a href="#_parameters_26">2.35.1. Parameters</a></li>
-<li><a href="#_responses_35">2.35.2. Responses</a></li>
-<li><a href="#_produces_34">2.35.3. Produces</a></li>
+<li><a href="#_responses_35">2.35.1. Responses</a></li>
+<li><a href="#_produces_34">2.35.2. Produces</a></li>
+</ul>
+</li>
+<li><a href="#_route180">2.36. GET /v2/templates/{templateName}</a>
+<ul class="sectlevel3">
+<li><a href="#_parameters_26">2.36.1. Parameters</a></li>
+<li><a href="#_responses_36">2.36.2. Responses</a></li>
+<li><a href="#_produces_35">2.36.3. Produces</a></li>
</ul>
</li>
</ul>
@@ -723,13 +729,13 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
<div class="sect2">
<h3 id="_version_information"><a class="anchor" href="#_version_information"></a><a class="link" href="#_version_information">1.1. Version information</a></h3>
<div class="paragraph">
-<p><em>Version</em> : 5.1.5-SNAPSHOT</p>
+<p><em>Version</em> : 6.0.0-SNAPSHOT</p>
</div>
</div>
<div class="sect2">
<h3 id="_uri_scheme"><a class="anchor" href="#_uri_scheme"></a><a class="link" href="#_uri_scheme">1.2. URI scheme</a></h3>
<div class="paragraph">
-<p><em>Host</em> : localhost:38837<br>
+<p><em>Host</em> : localhost:40283<br>
<em>BasePath</em> : /restservices/clds/<br>
<em>Schemes</em> : HTTP</p>
</div>
@@ -740,7 +746,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
<h2 id="_paths"><a class="anchor" href="#_paths"></a><a class="link" href="#_paths">2. Paths</a></h2>
<div class="sectionbody">
<div class="sect2">
-<h3 id="_route107"><a class="anchor" href="#_route107"></a><a class="link" href="#_route107">2.1. GET /v1/healthcheck</a></h3>
+<h3 id="_route184"><a class="anchor" href="#_route184"></a><a class="link" href="#_route184">2.1. GET /v1/healthcheck</a></h3>
<div class="sect3">
<h4 id="_responses"><a class="anchor" href="#_responses"></a><a class="link" href="#_responses">2.1.1. Responses</a></h4>
<table class="tableblock frame-all grid-all stretch">
@@ -777,7 +783,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
</div>
</div>
<div class="sect2">
-<h3 id="_route108"><a class="anchor" href="#_route108"></a><a class="link" href="#_route108">2.2. GET /v1/user/getUser</a></h3>
+<h3 id="_route185"><a class="anchor" href="#_route185"></a><a class="link" href="#_route185">2.2. GET /v1/user/getUser</a></h3>
<div class="sect3">
<h4 id="_responses_2"><a class="anchor" href="#_responses_2"></a><a class="link" href="#_responses_2">2.2.1. Responses</a></h4>
<table class="tableblock frame-all grid-all stretch">
@@ -811,7 +817,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
</div>
</div>
<div class="sect2">
-<h3 id="_route106"><a class="anchor" href="#_route106"></a><a class="link" href="#_route106">2.3. GET /v2/clampInformation</a></h3>
+<h3 id="_route183"><a class="anchor" href="#_route183"></a><a class="link" href="#_route183">2.3. GET /v2/clampInformation</a></h3>
<div class="sect3">
<h4 id="_responses_3"><a class="anchor" href="#_responses_3"></a><a class="link" href="#_responses_3">2.3.1. Responses</a></h4>
<table class="tableblock frame-all grid-all stretch">
@@ -848,7 +854,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
</div>
</div>
<div class="sect2">
-<h3 id="_route91"><a class="anchor" href="#_route91"></a><a class="link" href="#_route91">2.4. GET /v2/dictionary</a></h3>
+<h3 id="_route167"><a class="anchor" href="#_route167"></a><a class="link" href="#_route167">2.4. GET /v2/dictionary</a></h3>
<div class="sect3">
<h4 id="_responses_4"><a class="anchor" href="#_responses_4"></a><a class="link" href="#_responses_4">2.4.1. Responses</a></h4>
<table class="tableblock frame-all grid-all stretch">
@@ -885,7 +891,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
</div>
</div>
<div class="sect2">
-<h3 id="_route94"><a class="anchor" href="#_route94"></a><a class="link" href="#_route94">2.5. PUT /v2/dictionary</a></h3>
+<h3 id="_route170"><a class="anchor" href="#_route170"></a><a class="link" href="#_route170">2.5. PUT /v2/dictionary</a></h3>
<div class="sect3">
<h4 id="_parameters"><a class="anchor" href="#_parameters"></a><a class="link" href="#_parameters">2.5.1. Parameters</a></h4>
<table class="tableblock frame-all grid-all stretch">
@@ -957,7 +963,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
</div>
</div>
<div class="sect2">
-<h3 id="_route92"><a class="anchor" href="#_route92"></a><a class="link" href="#_route92">2.6. GET /v2/dictionary/secondary/names</a></h3>
+<h3 id="_route168"><a class="anchor" href="#_route168"></a><a class="link" href="#_route168">2.6. GET /v2/dictionary/secondary/names</a></h3>
<div class="sect3">
<h4 id="_responses_6"><a class="anchor" href="#_responses_6"></a><a class="link" href="#_responses_6">2.6.1. Responses</a></h4>
<table class="tableblock frame-all grid-all stretch">
@@ -994,7 +1000,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
</div>
</div>
<div class="sect2">
-<h3 id="_route93"><a class="anchor" href="#_route93"></a><a class="link" href="#_route93">2.7. GET /v2/dictionary/{dictionaryName}</a></h3>
+<h3 id="_route169"><a class="anchor" href="#_route169"></a><a class="link" href="#_route169">2.7. GET /v2/dictionary/{dictionaryName}</a></h3>
<div class="sect3">
<h4 id="_parameters_2"><a class="anchor" href="#_parameters_2"></a><a class="link" href="#_parameters_2">2.7.1. Parameters</a></h4>
<table class="tableblock frame-all grid-all stretch">
@@ -1056,7 +1062,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
</div>
</div>
<div class="sect2">
-<h3 id="_route95"><a class="anchor" href="#_route95"></a><a class="link" href="#_route95">2.8. PUT /v2/dictionary/{name}</a></h3>
+<h3 id="_route171"><a class="anchor" href="#_route171"></a><a class="link" href="#_route171">2.8. PUT /v2/dictionary/{name}</a></h3>
<div class="sect3">
<h4 id="_parameters_3"><a class="anchor" href="#_parameters_3"></a><a class="link" href="#_parameters_3">2.8.1. Parameters</a></h4>
<table class="tableblock frame-all grid-all stretch">
@@ -1134,7 +1140,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
</div>
</div>
<div class="sect2">
-<h3 id="_route96"><a class="anchor" href="#_route96"></a><a class="link" href="#_route96">2.9. DELETE /v2/dictionary/{name}</a></h3>
+<h3 id="_route172"><a class="anchor" href="#_route172"></a><a class="link" href="#_route172">2.9. DELETE /v2/dictionary/{name}</a></h3>
<div class="sect3">
<h4 id="_parameters_4"><a class="anchor" href="#_parameters_4"></a><a class="link" href="#_parameters_4">2.9.1. Parameters</a></h4>
<table class="tableblock frame-all grid-all stretch">
@@ -1193,7 +1199,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
</div>
</div>
<div class="sect2">
-<h3 id="_route97"><a class="anchor" href="#_route97"></a><a class="link" href="#_route97">2.10. DELETE /v2/dictionary/{name}/elements/{shortName}</a></h3>
+<h3 id="_route173"><a class="anchor" href="#_route173"></a><a class="link" href="#_route173">2.10. DELETE /v2/dictionary/{name}/elements/{shortName}</a></h3>
<div class="sect3">
<h4 id="_parameters_5"><a class="anchor" href="#_parameters_5"></a><a class="link" href="#_parameters_5">2.10.1. Parameters</a></h4>
<table class="tableblock frame-all grid-all stretch">
@@ -1258,7 +1264,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
</div>
</div>
<div class="sect2">
-<h3 id="_route88"><a class="anchor" href="#_route88"></a><a class="link" href="#_route88">2.11. PUT /v2/loop/addOperationaPolicy/{loopName}/policyModel/{policyType}/{policyVersion}</a></h3>
+<h3 id="_route164"><a class="anchor" href="#_route164"></a><a class="link" href="#_route164">2.11. PUT /v2/loop/addOperationaPolicy/{loopName}/policyModel/{policyType}/{policyVersion}</a></h3>
<div class="sect3">
<h4 id="_parameters_6"><a class="anchor" href="#_parameters_6"></a><a class="link" href="#_parameters_6">2.11.1. Parameters</a></h4>
<table class="tableblock frame-all grid-all stretch">
@@ -1332,7 +1338,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
</div>
</div>
<div class="sect2">
-<h3 id="_route90"><a class="anchor" href="#_route90"></a><a class="link" href="#_route90">2.12. POST /v2/loop/create/{loopName}?templateName={templateName}</a></h3>
+<h3 id="_route166"><a class="anchor" href="#_route166"></a><a class="link" href="#_route166">2.12. POST /v2/loop/create/{loopName}?templateName={templateName}</a></h3>
<div class="sect3">
<h4 id="_parameters_7"><a class="anchor" href="#_parameters_7"></a><a class="link" href="#_parameters_7">2.12.1. Parameters</a></h4>
<table class="tableblock frame-all grid-all stretch">
@@ -1404,7 +1410,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
</div>
</div>
<div class="sect2">
-<h3 id="_route86"><a class="anchor" href="#_route86"></a><a class="link" href="#_route86">2.13. PUT /v2/loop/delete/{loopName}</a></h3>
+<h3 id="_route162"><a class="anchor" href="#_route162"></a><a class="link" href="#_route162">2.13. PUT /v2/loop/delete/{loopName}</a></h3>
<div class="sect3">
<h4 id="_parameters_8"><a class="anchor" href="#_parameters_8"></a><a class="link" href="#_parameters_8">2.13.1. Parameters</a></h4>
<table class="tableblock frame-all grid-all stretch">
@@ -1453,7 +1459,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
</div>
</div>
<div class="sect2">
-<h3 id="_route79"><a class="anchor" href="#_route79"></a><a class="link" href="#_route79">2.14. PUT /v2/loop/deploy/{loopName}</a></h3>
+<h3 id="_route155"><a class="anchor" href="#_route155"></a><a class="link" href="#_route155">2.14. PUT /v2/loop/deploy/{loopName}</a></h3>
<div class="sect3">
<h4 id="_parameters_9"><a class="anchor" href="#_parameters_9"></a><a class="link" href="#_parameters_9">2.14.1. Parameters</a></h4>
<table class="tableblock frame-all grid-all stretch">
@@ -1515,7 +1521,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
</div>
</div>
<div class="sect2">
-<h3 id="_route74"><a class="anchor" href="#_route74"></a><a class="link" href="#_route74">2.15. GET /v2/loop/getAllNames</a></h3>
+<h3 id="_route150"><a class="anchor" href="#_route150"></a><a class="link" href="#_route150">2.15. GET /v2/loop/getAllNames</a></h3>
<div class="sect3">
<h4 id="_responses_15"><a class="anchor" href="#_responses_15"></a><a class="link" href="#_responses_15">2.15.1. Responses</a></h4>
<table class="tableblock frame-all grid-all stretch">
@@ -1552,7 +1558,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
</div>
</div>
<div class="sect2">
-<h3 id="_route87"><a class="anchor" href="#_route87"></a><a class="link" href="#_route87">2.16. GET /v2/loop/getstatus/{loopName}</a></h3>
+<h3 id="_route163"><a class="anchor" href="#_route163"></a><a class="link" href="#_route163">2.16. GET /v2/loop/getstatus/{loopName}</a></h3>
<div class="sect3">
<h4 id="_parameters_10"><a class="anchor" href="#_parameters_10"></a><a class="link" href="#_parameters_10">2.16.1. Parameters</a></h4>
<table class="tableblock frame-all grid-all stretch">
@@ -1614,7 +1620,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
</div>
</div>
<div class="sect2">
-<h3 id="_route80"><a class="anchor" href="#_route80"></a><a class="link" href="#_route80">2.17. PUT /v2/loop/refreshMicroServicePolicyJsonSchema/{loopName}/{microServicePolicyName}</a></h3>
+<h3 id="_route156"><a class="anchor" href="#_route156"></a><a class="link" href="#_route156">2.17. PUT /v2/loop/refreshMicroServicePolicyJsonSchema/{loopName}/{microServicePolicyName}</a></h3>
<div class="sect3">
<h4 id="_parameters_11"><a class="anchor" href="#_parameters_11"></a><a class="link" href="#_parameters_11">2.17.1. Parameters</a></h4>
<table class="tableblock frame-all grid-all stretch">
@@ -1682,7 +1688,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
</div>
</div>
<div class="sect2">
-<h3 id="_route81"><a class="anchor" href="#_route81"></a><a class="link" href="#_route81">2.18. PUT /v2/loop/refreshOperationalPolicyJsonSchema/{loopName}/{operationalPolicyName}</a></h3>
+<h3 id="_route157"><a class="anchor" href="#_route157"></a><a class="link" href="#_route157">2.18. PUT /v2/loop/refreshOperationalPolicyJsonSchema/{loopName}/{operationalPolicyName}</a></h3>
<div class="sect3">
<h4 id="_parameters_12"><a class="anchor" href="#_parameters_12"></a><a class="link" href="#_parameters_12">2.18.1. Parameters</a></h4>
<table class="tableblock frame-all grid-all stretch">
@@ -1750,7 +1756,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
</div>
</div>
<div class="sect2">
-<h3 id="_route89"><a class="anchor" href="#_route89"></a><a class="link" href="#_route89">2.19. PUT /v2/loop/removeOperationaPolicy/{loopName}/policyModel/{policyType}/{policyVersion}/{policyName}</a></h3>
+<h3 id="_route165"><a class="anchor" href="#_route165"></a><a class="link" href="#_route165">2.19. PUT /v2/loop/removeOperationaPolicy/{loopName}/policyModel/{policyType}/{policyVersion}/{policyName}</a></h3>
<div class="sect3">
<h4 id="_parameters_13"><a class="anchor" href="#_parameters_13"></a><a class="link" href="#_parameters_13">2.19.1. Parameters</a></h4>
<table class="tableblock frame-all grid-all stretch">
@@ -1830,7 +1836,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
</div>
</div>
<div class="sect2">
-<h3 id="_route84"><a class="anchor" href="#_route84"></a><a class="link" href="#_route84">2.20. PUT /v2/loop/restart/{loopName}</a></h3>
+<h3 id="_route160"><a class="anchor" href="#_route160"></a><a class="link" href="#_route160">2.20. PUT /v2/loop/restart/{loopName}</a></h3>
<div class="sect3">
<h4 id="_parameters_14"><a class="anchor" href="#_parameters_14"></a><a class="link" href="#_parameters_14">2.20.1. Parameters</a></h4>
<table class="tableblock frame-all grid-all stretch">
@@ -1892,7 +1898,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
</div>
</div>
<div class="sect2">
-<h3 id="_route83"><a class="anchor" href="#_route83"></a><a class="link" href="#_route83">2.21. PUT /v2/loop/stop/{loopName}</a></h3>
+<h3 id="_route159"><a class="anchor" href="#_route159"></a><a class="link" href="#_route159">2.21. PUT /v2/loop/stop/{loopName}</a></h3>
<div class="sect3">
<h4 id="_parameters_15"><a class="anchor" href="#_parameters_15"></a><a class="link" href="#_parameters_15">2.21.1. Parameters</a></h4>
<table class="tableblock frame-all grid-all stretch">
@@ -1954,7 +1960,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
</div>
</div>
<div class="sect2">
-<h3 id="_route85"><a class="anchor" href="#_route85"></a><a class="link" href="#_route85">2.22. PUT /v2/loop/submit/{loopName}</a></h3>
+<h3 id="_route161"><a class="anchor" href="#_route161"></a><a class="link" href="#_route161">2.22. PUT /v2/loop/submit/{loopName}</a></h3>
<div class="sect3">
<h4 id="_parameters_16"><a class="anchor" href="#_parameters_16"></a><a class="link" href="#_parameters_16">2.22.1. Parameters</a></h4>
<table class="tableblock frame-all grid-all stretch">
@@ -2016,7 +2022,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
</div>
</div>
<div class="sect2">
-<h3 id="_route82"><a class="anchor" href="#_route82"></a><a class="link" href="#_route82">2.23. PUT /v2/loop/undeploy/{loopName}</a></h3>
+<h3 id="_route158"><a class="anchor" href="#_route158"></a><a class="link" href="#_route158">2.23. PUT /v2/loop/undeploy/{loopName}</a></h3>
<div class="sect3">
<h4 id="_parameters_17"><a class="anchor" href="#_parameters_17"></a><a class="link" href="#_parameters_17">2.23.1. Parameters</a></h4>
<table class="tableblock frame-all grid-all stretch">
@@ -2078,7 +2084,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
</div>
</div>
<div class="sect2">
-<h3 id="_route76"><a class="anchor" href="#_route76"></a><a class="link" href="#_route76">2.24. POST /v2/loop/updateGlobalProperties/{loopName}</a></h3>
+<h3 id="_route152"><a class="anchor" href="#_route152"></a><a class="link" href="#_route152">2.24. POST /v2/loop/updateGlobalProperties/{loopName}</a></h3>
<div class="sect3">
<h4 id="_parameters_18"><a class="anchor" href="#_parameters_18"></a><a class="link" href="#_parameters_18">2.24.1. Parameters</a></h4>
<table class="tableblock frame-all grid-all stretch">
@@ -2156,7 +2162,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
</div>
</div>
<div class="sect2">
-<h3 id="_route78"><a class="anchor" href="#_route78"></a><a class="link" href="#_route78">2.25. POST /v2/loop/updateMicroservicePolicy/{loopName}</a></h3>
+<h3 id="_route154"><a class="anchor" href="#_route154"></a><a class="link" href="#_route154">2.25. POST /v2/loop/updateMicroservicePolicy/{loopName}</a></h3>
<div class="sect3">
<h4 id="_parameters_19"><a class="anchor" href="#_parameters_19"></a><a class="link" href="#_parameters_19">2.25.1. Parameters</a></h4>
<table class="tableblock frame-all grid-all stretch">
@@ -2234,7 +2240,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
</div>
</div>
<div class="sect2">
-<h3 id="_route77"><a class="anchor" href="#_route77"></a><a class="link" href="#_route77">2.26. POST /v2/loop/updateOperationalPolicies/{loopName}</a></h3>
+<h3 id="_route153"><a class="anchor" href="#_route153"></a><a class="link" href="#_route153">2.26. POST /v2/loop/updateOperationalPolicies/{loopName}</a></h3>
<div class="sect3">
<h4 id="_parameters_20"><a class="anchor" href="#_parameters_20"></a><a class="link" href="#_parameters_20">2.26.1. Parameters</a></h4>
<table class="tableblock frame-all grid-all stretch">
@@ -2312,7 +2318,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
</div>
</div>
<div class="sect2">
-<h3 id="_route75"><a class="anchor" href="#_route75"></a><a class="link" href="#_route75">2.27. GET /v2/loop/{loopName}</a></h3>
+<h3 id="_route151"><a class="anchor" href="#_route151"></a><a class="link" href="#_route151">2.27. GET /v2/loop/{loopName}</a></h3>
<div class="sect3">
<h4 id="_parameters_21"><a class="anchor" href="#_parameters_21"></a><a class="link" href="#_parameters_21">2.27.1. Parameters</a></h4>
<table class="tableblock frame-all grid-all stretch">
@@ -2374,9 +2380,46 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
</div>
</div>
<div class="sect2">
-<h3 id="_route101"><a class="anchor" href="#_route101"></a><a class="link" href="#_route101">2.28. POST /v2/policyToscaModels</a></h3>
+<h3 id="_route182"><a class="anchor" href="#_route182"></a><a class="link" href="#_route182">2.28. GET /v2/policies/list</a></h3>
<div class="sect3">
-<h4 id="_parameters_22"><a class="anchor" href="#_parameters_22"></a><a class="link" href="#_parameters_22">2.28.1. Parameters</a></h4>
+<h4 id="_responses_28"><a class="anchor" href="#_responses_28"></a><a class="link" href="#_responses_28">2.28.1. Responses</a></h4>
+<table class="tableblock frame-all grid-all stretch">
+<colgroup>
+<col style="width: 10%;">
+<col style="width: 70%;">
+<col style="width: 20%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-middle">HTTP Code</th>
+<th class="tableblock halign-left valign-middle">Description</th>
+<th class="tableblock halign-left valign-middle">Schema</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-middle"><p class="tableblock"><strong>200</strong></p></td>
+<td class="tableblock halign-left valign-middle"><p class="tableblock">Output type</p></td>
+<td class="tableblock halign-left valign-middle"><p class="tableblock">string</p></td>
+</tr>
+</tbody>
+</table>
+</div>
+<div class="sect3">
+<h4 id="_produces_27"><a class="anchor" href="#_produces_27"></a><a class="link" href="#_produces_27">2.28.2. Produces</a></h4>
+<div class="ulist">
+<ul>
+<li>
+<p><code>application/json</code></p>
+</li>
+</ul>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="_route177"><a class="anchor" href="#_route177"></a><a class="link" href="#_route177">2.29. POST /v2/policyToscaModels</a></h3>
+<div class="sect3">
+<h4 id="_parameters_22"><a class="anchor" href="#_parameters_22"></a><a class="link" href="#_parameters_22">2.29.1. Parameters</a></h4>
<table class="tableblock frame-all grid-all stretch">
<colgroup>
<col style="width: 22.2222%;">
@@ -2401,7 +2444,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
</table>
</div>
<div class="sect3">
-<h4 id="_responses_28"><a class="anchor" href="#_responses_28"></a><a class="link" href="#_responses_28">2.28.2. Responses</a></h4>
+<h4 id="_responses_29"><a class="anchor" href="#_responses_29"></a><a class="link" href="#_responses_29">2.29.2. Responses</a></h4>
<table class="tableblock frame-all grid-all stretch">
<colgroup>
<col style="width: 10%;">
@@ -2425,7 +2468,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
</table>
</div>
<div class="sect3">
-<h4 id="_consumes_7"><a class="anchor" href="#_consumes_7"></a><a class="link" href="#_consumes_7">2.28.3. Consumes</a></h4>
+<h4 id="_consumes_7"><a class="anchor" href="#_consumes_7"></a><a class="link" href="#_consumes_7">2.29.3. Consumes</a></h4>
<div class="ulist">
<ul>
<li>
@@ -2435,7 +2478,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
</div>
</div>
<div class="sect3">
-<h4 id="_produces_27"><a class="anchor" href="#_produces_27"></a><a class="link" href="#_produces_27">2.28.4. Produces</a></h4>
+<h4 id="_produces_28"><a class="anchor" href="#_produces_28"></a><a class="link" href="#_produces_28">2.29.4. Produces</a></h4>
<div class="ulist">
<ul>
<li>
@@ -2446,9 +2489,9 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
</div>
</div>
<div class="sect2">
-<h3 id="_route98"><a class="anchor" href="#_route98"></a><a class="link" href="#_route98">2.29. GET /v2/policyToscaModels</a></h3>
+<h3 id="_route174"><a class="anchor" href="#_route174"></a><a class="link" href="#_route174">2.30. GET /v2/policyToscaModels</a></h3>
<div class="sect3">
-<h4 id="_responses_29"><a class="anchor" href="#_responses_29"></a><a class="link" href="#_responses_29">2.29.1. Responses</a></h4>
+<h4 id="_responses_30"><a class="anchor" href="#_responses_30"></a><a class="link" href="#_responses_30">2.30.1. Responses</a></h4>
<table class="tableblock frame-all grid-all stretch">
<colgroup>
<col style="width: 10%;">
@@ -2472,7 +2515,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
</table>
</div>
<div class="sect3">
-<h4 id="_produces_28"><a class="anchor" href="#_produces_28"></a><a class="link" href="#_produces_28">2.29.2. Produces</a></h4>
+<h4 id="_produces_29"><a class="anchor" href="#_produces_29"></a><a class="link" href="#_produces_29">2.30.2. Produces</a></h4>
<div class="ulist">
<ul>
<li>
@@ -2483,9 +2526,9 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
</div>
</div>
<div class="sect2">
-<h3 id="_route100"><a class="anchor" href="#_route100"></a><a class="link" href="#_route100">2.30. GET /v2/policyToscaModels/yaml/{policyModelType}/{policyModelVersion}</a></h3>
+<h3 id="_route176"><a class="anchor" href="#_route176"></a><a class="link" href="#_route176">2.31. GET /v2/policyToscaModels/yaml/{policyModelType}/{policyModelVersion}</a></h3>
<div class="sect3">
-<h4 id="_parameters_23"><a class="anchor" href="#_parameters_23"></a><a class="link" href="#_parameters_23">2.30.1. Parameters</a></h4>
+<h4 id="_parameters_23"><a class="anchor" href="#_parameters_23"></a><a class="link" href="#_parameters_23">2.31.1. Parameters</a></h4>
<table class="tableblock frame-all grid-all stretch">
<colgroup>
<col style="width: 22.2222%;">
@@ -2516,7 +2559,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
</table>
</div>
<div class="sect3">
-<h4 id="_responses_30"><a class="anchor" href="#_responses_30"></a><a class="link" href="#_responses_30">2.30.2. Responses</a></h4>
+<h4 id="_responses_31"><a class="anchor" href="#_responses_31"></a><a class="link" href="#_responses_31">2.31.2. Responses</a></h4>
<table class="tableblock frame-all grid-all stretch">
<colgroup>
<col style="width: 10%;">
@@ -2540,7 +2583,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
</table>
</div>
<div class="sect3">
-<h4 id="_produces_29"><a class="anchor" href="#_produces_29"></a><a class="link" href="#_produces_29">2.30.3. Produces</a></h4>
+<h4 id="_produces_30"><a class="anchor" href="#_produces_30"></a><a class="link" href="#_produces_30">2.31.3. Produces</a></h4>
<div class="ulist">
<ul>
<li>
@@ -2551,9 +2594,9 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
</div>
</div>
<div class="sect2">
-<h3 id="_route99"><a class="anchor" href="#_route99"></a><a class="link" href="#_route99">2.31. GET /v2/policyToscaModels/{policyModelType}/{policyModelVersion}</a></h3>
+<h3 id="_route175"><a class="anchor" href="#_route175"></a><a class="link" href="#_route175">2.32. GET /v2/policyToscaModels/{policyModelType}/{policyModelVersion}</a></h3>
<div class="sect3">
-<h4 id="_parameters_24"><a class="anchor" href="#_parameters_24"></a><a class="link" href="#_parameters_24">2.31.1. Parameters</a></h4>
+<h4 id="_parameters_24"><a class="anchor" href="#_parameters_24"></a><a class="link" href="#_parameters_24">2.32.1. Parameters</a></h4>
<table class="tableblock frame-all grid-all stretch">
<colgroup>
<col style="width: 22.2222%;">
@@ -2584,7 +2627,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
</table>
</div>
<div class="sect3">
-<h4 id="_responses_31"><a class="anchor" href="#_responses_31"></a><a class="link" href="#_responses_31">2.31.2. Responses</a></h4>
+<h4 id="_responses_32"><a class="anchor" href="#_responses_32"></a><a class="link" href="#_responses_32">2.32.2. Responses</a></h4>
<table class="tableblock frame-all grid-all stretch">
<colgroup>
<col style="width: 10%;">
@@ -2608,7 +2651,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
</table>
</div>
<div class="sect3">
-<h4 id="_produces_30"><a class="anchor" href="#_produces_30"></a><a class="link" href="#_produces_30">2.31.3. Produces</a></h4>
+<h4 id="_produces_31"><a class="anchor" href="#_produces_31"></a><a class="link" href="#_produces_31">2.32.3. Produces</a></h4>
<div class="ulist">
<ul>
<li>
@@ -2619,9 +2662,9 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
</div>
</div>
<div class="sect2">
-<h3 id="_route102"><a class="anchor" href="#_route102"></a><a class="link" href="#_route102">2.32. PUT /v2/policyToscaModels/{policyModelType}/{policyModelVersion}</a></h3>
+<h3 id="_route178"><a class="anchor" href="#_route178"></a><a class="link" href="#_route178">2.33. PUT /v2/policyToscaModels/{policyModelType}/{policyModelVersion}</a></h3>
<div class="sect3">
-<h4 id="_parameters_25"><a class="anchor" href="#_parameters_25"></a><a class="link" href="#_parameters_25">2.32.1. Parameters</a></h4>
+<h4 id="_parameters_25"><a class="anchor" href="#_parameters_25"></a><a class="link" href="#_parameters_25">2.33.1. Parameters</a></h4>
<table class="tableblock frame-all grid-all stretch">
<colgroup>
<col style="width: 22.2222%;">
@@ -2658,7 +2701,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
</table>
</div>
<div class="sect3">
-<h4 id="_responses_32"><a class="anchor" href="#_responses_32"></a><a class="link" href="#_responses_32">2.32.2. Responses</a></h4>
+<h4 id="_responses_33"><a class="anchor" href="#_responses_33"></a><a class="link" href="#_responses_33">2.33.2. Responses</a></h4>
<table class="tableblock frame-all grid-all stretch">
<colgroup>
<col style="width: 10%;">
@@ -2682,7 +2725,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
</table>
</div>
<div class="sect3">
-<h4 id="_consumes_8"><a class="anchor" href="#_consumes_8"></a><a class="link" href="#_consumes_8">2.32.3. Consumes</a></h4>
+<h4 id="_consumes_8"><a class="anchor" href="#_consumes_8"></a><a class="link" href="#_consumes_8">2.33.3. Consumes</a></h4>
<div class="ulist">
<ul>
<li>
@@ -2692,7 +2735,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
</div>
</div>
<div class="sect3">
-<h4 id="_produces_31"><a class="anchor" href="#_produces_31"></a><a class="link" href="#_produces_31">2.32.4. Produces</a></h4>
+<h4 id="_produces_32"><a class="anchor" href="#_produces_32"></a><a class="link" href="#_produces_32">2.33.4. Produces</a></h4>
<div class="ulist">
<ul>
<li>
@@ -2703,9 +2746,9 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
</div>
</div>
<div class="sect2">
-<h3 id="_route103"><a class="anchor" href="#_route103"></a><a class="link" href="#_route103">2.33. GET /v2/templates</a></h3>
+<h3 id="_route179"><a class="anchor" href="#_route179"></a><a class="link" href="#_route179">2.34. GET /v2/templates</a></h3>
<div class="sect3">
-<h4 id="_responses_33"><a class="anchor" href="#_responses_33"></a><a class="link" href="#_responses_33">2.33.1. Responses</a></h4>
+<h4 id="_responses_34"><a class="anchor" href="#_responses_34"></a><a class="link" href="#_responses_34">2.34.1. Responses</a></h4>
<table class="tableblock frame-all grid-all stretch">
<colgroup>
<col style="width: 10%;">
@@ -2729,7 +2772,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
</table>
</div>
<div class="sect3">
-<h4 id="_produces_32"><a class="anchor" href="#_produces_32"></a><a class="link" href="#_produces_32">2.33.2. Produces</a></h4>
+<h4 id="_produces_33"><a class="anchor" href="#_produces_33"></a><a class="link" href="#_produces_33">2.34.2. Produces</a></h4>
<div class="ulist">
<ul>
<li>
@@ -2740,9 +2783,9 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
</div>
</div>
<div class="sect2">
-<h3 id="_route105"><a class="anchor" href="#_route105"></a><a class="link" href="#_route105">2.34. GET /v2/templates/names</a></h3>
+<h3 id="_route181"><a class="anchor" href="#_route181"></a><a class="link" href="#_route181">2.35. GET /v2/templates/names</a></h3>
<div class="sect3">
-<h4 id="_responses_34"><a class="anchor" href="#_responses_34"></a><a class="link" href="#_responses_34">2.34.1. Responses</a></h4>
+<h4 id="_responses_35"><a class="anchor" href="#_responses_35"></a><a class="link" href="#_responses_35">2.35.1. Responses</a></h4>
<table class="tableblock frame-all grid-all stretch">
<colgroup>
<col style="width: 10%;">
@@ -2766,7 +2809,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
</table>
</div>
<div class="sect3">
-<h4 id="_produces_33"><a class="anchor" href="#_produces_33"></a><a class="link" href="#_produces_33">2.34.2. Produces</a></h4>
+<h4 id="_produces_34"><a class="anchor" href="#_produces_34"></a><a class="link" href="#_produces_34">2.35.2. Produces</a></h4>
<div class="ulist">
<ul>
<li>
@@ -2777,9 +2820,9 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
</div>
</div>
<div class="sect2">
-<h3 id="_route104"><a class="anchor" href="#_route104"></a><a class="link" href="#_route104">2.35. GET /v2/templates/{templateName}</a></h3>
+<h3 id="_route180"><a class="anchor" href="#_route180"></a><a class="link" href="#_route180">2.36. GET /v2/templates/{templateName}</a></h3>
<div class="sect3">
-<h4 id="_parameters_26"><a class="anchor" href="#_parameters_26"></a><a class="link" href="#_parameters_26">2.35.1. Parameters</a></h4>
+<h4 id="_parameters_26"><a class="anchor" href="#_parameters_26"></a><a class="link" href="#_parameters_26">2.36.1. Parameters</a></h4>
<table class="tableblock frame-all grid-all stretch">
<colgroup>
<col style="width: 22.2222%;">
@@ -2804,7 +2847,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
</table>
</div>
<div class="sect3">
-<h4 id="_responses_35"><a class="anchor" href="#_responses_35"></a><a class="link" href="#_responses_35">2.35.2. Responses</a></h4>
+<h4 id="_responses_36"><a class="anchor" href="#_responses_36"></a><a class="link" href="#_responses_36">2.36.2. Responses</a></h4>
<table class="tableblock frame-all grid-all stretch">
<colgroup>
<col style="width: 10%;">
@@ -2828,7 +2871,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
</table>
</div>
<div class="sect3">
-<h4 id="_produces_34"><a class="anchor" href="#_produces_34"></a><a class="link" href="#_produces_34">2.35.3. Produces</a></h4>
+<h4 id="_produces_35"><a class="anchor" href="#_produces_35"></a><a class="link" href="#_produces_35">2.36.3. Produces</a></h4>
<div class="ulist">
<ul>
<li>
diff --git a/src/main/resources/application-noaaf.properties b/src/main/resources/application-noaaf.properties
index ba838adb8..f398f8d98 100644
--- a/src/main/resources/application-noaaf.properties
+++ b/src/main/resources/application-noaaf.properties
@@ -2,7 +2,7 @@
# ============LICENSE_START=======================================================
# ONAP CLAMP
# ================================================================================
-# Copyright (C) 2017-2019 AT&T Intellectual Property. All rights
+# Copyright (C) 2017-2019,2021 AT&T Intellectual Property. All rights
# reserved.
# ================================================================================
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -171,6 +171,7 @@ clamp.config.security.permission.type.cl.event=org.onap.clamp.clds.cl.event
clamp.config.security.permission.type.filter.vf=org.onap.clamp.clds.filter.vf
clamp.config.security.permission.type.template=org.onap.clamp.clds.template
clamp.config.security.permission.type.tosca=org.onap.clamp.clds.tosca
+clamp.config.security.permission.type.policies=org.onap.clamp.clds.policies
#This one indicates the type of instances (dev|prod|perf...), this must be set accordingly in clds-users.properties
clamp.config.security.permission.instance=dev
clamp.config.security.authentication.class=org.onap.aaf.cadi.principal.X509Principal, org.onap.aaf.cadi.principal.CachedBasicPrincipal
diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties
index 7d2d4ef1b..97870d2b6 100644
--- a/src/main/resources/application.properties
+++ b/src/main/resources/application.properties
@@ -2,7 +2,7 @@
# ============LICENSE_START=======================================================
# ONAP CLAMP
# ================================================================================
-# Copyright (C) 2017-2019 AT&T Intellectual Property. All rights
+# Copyright (C) 2017-2019, 2021 AT&T Intellectual Property. All rights
# reserved.
# ================================================================================
# Modifications copyright (c) 2019 Nokia
@@ -174,6 +174,7 @@ clamp.config.security.permission.type.cl.event=org.onap.clamp.clds.cl.event
clamp.config.security.permission.type.filter.vf=org.onap.clamp.clds.filter.vf
clamp.config.security.permission.type.template=org.onap.clamp.clds.template
clamp.config.security.permission.type.tosca=org.onap.clamp.clds.tosca
+clamp.config.security.permission.type.policies=org.onap.clamp.clds.policies
#This one indicates the type of instances (dev|prod|perf...), this must be set accordingly in clds-users.properties
clamp.config.security.permission.instance=dev
clamp.config.security.authentication.class=org.onap.aaf.cadi.principal.X509Principal, org.onap.aaf.cadi.principal.CachedBasicPrincipal
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 c43f3297d..011c24a9d 100644
--- a/src/main/resources/clds/camel/rest/clamp-api-v2.xml
+++ b/src/main/resources/clds/camel/rest/clamp-api-v2.xml
@@ -1,1322 +1,1368 @@
<rests xmlns="http://camel.apache.org/schema/spring">
- <rest>
- <get uri="/v2/loop/getAllNames" outType="java.lang.String[]"
- produces="application/json">
- <route>
- <removeHeaders pattern="*" />
- <doTry>
- <to
- uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'GET ALL Loop')" />
- <to
- uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','read')" />
- <to
- uri="bean:org.onap.policy.clamp.loop.LoopController?method=getLoopNames()" />
- <to
- uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()" />
- <doCatch>
- <exception>java.lang.Exception</exception>
- <handled>
- <constant>true</constant>
- </handled>
- <to
- uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()" />
- <log loggingLevel="ERROR"
- message="GET All Loop names FAILED: ${exception.stacktrace}" />
+ <rest>
+ <get uri="/v2/loop/getAllNames" outType="java.lang.String[]"
+ produces="application/json">
+ <route>
+ <removeHeaders pattern="*"/>
+ <doTry>
+ <to
+ uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'GET ALL Loop')"/>
+ <to
+ uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','read')"/>
+ <to
+ uri="bean:org.onap.policy.clamp.loop.LoopController?method=getLoopNames()"/>
+ <to
+ uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()"/>
+ <doCatch>
+ <exception>java.lang.Exception</exception>
+ <handled>
+ <constant>true</constant>
+ </handled>
+ <to
+ uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()"/>
+ <log loggingLevel="ERROR"
+ message="GET All Loop names FAILED: ${exception.stacktrace}"/>
- <setHeader headerName="CamelHttpResponseCode">
- <constant>500</constant>
- </setHeader>
- <setBody>
- <simple>GET All Loop names FAILED</simple>
- </setBody>
- </doCatch>
- </doTry>
- </route>
- </get>
- <get uri="/v2/loop/{loopName}" outType="org.onap.policy.clamp.loop.Loop"
- produces="application/json">
- <route>
- <removeHeaders pattern="*" excludePattern="loopName" />
- <doTry>
- <to
- uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'GET Loop')" />
- <to
- uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','read')" />
- <to
- uri="bean:org.onap.policy.clamp.loop.LoopController?method=getLoop(${header.loopName})" />
- <to
- uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()" />
- <doCatch>
- <exception>java.lang.Exception</exception>
- <handled>
- <constant>true</constant>
- </handled>
- <to
- uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()" />
- <log loggingLevel="ERROR"
- message="GET Loop request failed for loop: ${header.loopName}, ${exception.stacktrace}" />
+ <setHeader headerName="CamelHttpResponseCode">
+ <constant>500</constant>
+ </setHeader>
+ <setBody>
+ <simple>GET All Loop names FAILED</simple>
+ </setBody>
+ </doCatch>
+ </doTry>
+ </route>
+ </get>
+ <get uri="/v2/loop/{loopName}" outType="org.onap.policy.clamp.loop.Loop"
+ produces="application/json">
+ <route>
+ <removeHeaders pattern="*" excludePattern="loopName"/>
+ <doTry>
+ <to
+ uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'GET Loop')"/>
+ <to
+ uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','read')"/>
+ <to
+ uri="bean:org.onap.policy.clamp.loop.LoopController?method=getLoop(${header.loopName})"/>
+ <to
+ uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()"/>
+ <doCatch>
+ <exception>java.lang.Exception</exception>
+ <handled>
+ <constant>true</constant>
+ </handled>
+ <to
+ uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()"/>
+ <log loggingLevel="ERROR"
+ message="GET Loop request failed for loop: ${header.loopName}, ${exception.stacktrace}"/>
- <setHeader headerName="CamelHttpResponseCode">
- <constant>500</constant>
- </setHeader>
- <setBody>
- <simple>GET Loop FAILED</simple>
- </setBody>
- </doCatch>
- </doTry>
- </route>
- </get>
+ <setHeader headerName="CamelHttpResponseCode">
+ <constant>500</constant>
+ </setHeader>
+ <setBody>
+ <simple>GET Loop FAILED</simple>
+ </setBody>
+ </doCatch>
+ </doTry>
+ </route>
+ </get>
- <post uri="/v2/loop/updateGlobalProperties/{loopName}"
+ <post uri="/v2/loop/updateGlobalProperties/{loopName}"
type="com.google.gson.JsonObject" consumes="application/json"
outType="org.onap.policy.clamp.loop.Loop" produces="application/json">
- <route>
- <removeHeaders pattern="*" excludePattern="loopName" />
- <doTry>
- <to
- uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Update the global properties')" />
- <to
- uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" />
- <setHeader headerName="GlobalPropertiesJson">
- <simple>${body}</simple>
- </setHeader>
- <to uri="direct:load-loop" />
- <to
- uri="bean:org.onap.policy.clamp.loop.LoopController?method=updateGlobalPropertiesJson(${header.loopName},${header.GlobalPropertiesJson})" />
- <to
- uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('Global Properties UPDATED','INFO',${exchangeProperty[loopObject]})" />
- <to
- uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()" />
- <doCatch>
- <exception>java.lang.Exception</exception>
- <handled>
- <constant>true</constant>
- </handled>
- <to
- uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()" />
- <log loggingLevel="ERROR"
- message="UPDATE Global properties FAILED for loop: ${header.loopName}, ${exception.stacktrace}" />
+ <route>
+ <removeHeaders pattern="*" excludePattern="loopName"/>
+ <doTry>
+ <to
+ uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Update the global properties')"/>
+ <to
+ uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')"/>
+ <setHeader headerName="GlobalPropertiesJson">
+ <simple>${body}</simple>
+ </setHeader>
+ <to uri="direct:load-loop"/>
+ <to
+ uri="bean:org.onap.policy.clamp.loop.LoopController?method=updateGlobalPropertiesJson(${header.loopName},${header.GlobalPropertiesJson})"/>
+ <to
+ uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('Global Properties UPDATED','INFO',${exchangeProperty[loopObject]})"/>
+ <to
+ uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()"/>
+ <doCatch>
+ <exception>java.lang.Exception</exception>
+ <handled>
+ <constant>true</constant>
+ </handled>
+ <to
+ uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()"/>
+ <log loggingLevel="ERROR"
+ message="UPDATE Global properties FAILED for loop: ${header.loopName}, ${exception.stacktrace}"/>
- <setHeader headerName="CamelHttpResponseCode">
- <constant>500</constant>
- </setHeader>
- <setBody>
- <simple>UPDATE Global properties FAILED </simple>
- </setBody>
- </doCatch>
- </doTry>
- </route>
- </post>
- <post uri="/v2/loop/updateOperationalPolicies/{loopName}"
+ <setHeader headerName="CamelHttpResponseCode">
+ <constant>500</constant>
+ </setHeader>
+ <setBody>
+ <simple>UPDATE Global properties FAILED</simple>
+ </setBody>
+ </doCatch>
+ </doTry>
+ </route>
+ </post>
+ <post uri="/v2/loop/updateOperationalPolicies/{loopName}"
type="com.google.gson.JsonArray" consumes="application/json"
outType="org.onap.policy.clamp.loop.Loop" produces="application/json">
- <route>
- <removeHeaders pattern="*" excludePattern="loopName" />
- <doTry>
- <to
- uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Update operational policies')" />
- <to
- uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" />
- <setHeader headerName="OperationalPoliciesArray">
- <simple>${body}</simple>
- </setHeader>
- <to uri="direct:load-loop" />
- <to
- uri="bean:org.onap.policy.clamp.loop.LoopController?method=updateOperationalPolicies(${header.loopName},${header.OperationalPoliciesArray})" />
- <to
- uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('Operational policies UPDATED','INFO',${exchangeProperty[loopObject]})" />
- <to
- uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()" />
- <doCatch>
- <exception>java.lang.Exception</exception>
- <handled>
- <constant>true</constant>
- </handled>
- <to
- uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()" />
- <log loggingLevel="ERROR"
- message="UPDATE Operational policies FAILED for loop: ${header.loopName}, ${exception.stacktrace}" />
- <to
- uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('UPDATE Operational policies request FAILED, Error reported: ${exception.message}','ERROR',${exchangeProperty[loopObject]})" />
+ <route>
+ <removeHeaders pattern="*" excludePattern="loopName"/>
+ <doTry>
+ <to
+ uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Update operational policies')"/>
+ <to
+ uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')"/>
+ <setHeader headerName="OperationalPoliciesArray">
+ <simple>${body}</simple>
+ </setHeader>
+ <to uri="direct:load-loop"/>
+ <to
+ uri="bean:org.onap.policy.clamp.loop.LoopController?method=updateOperationalPolicies(${header.loopName},${header.OperationalPoliciesArray})"/>
+ <to
+ uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('Operational policies UPDATED','INFO',${exchangeProperty[loopObject]})"/>
+ <to
+ uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()"/>
+ <doCatch>
+ <exception>java.lang.Exception</exception>
+ <handled>
+ <constant>true</constant>
+ </handled>
+ <to
+ uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()"/>
+ <log loggingLevel="ERROR"
+ message="UPDATE Operational policies FAILED for loop: ${header.loopName}, ${exception.stacktrace}"/>
+ <to
+ uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('UPDATE Operational policies request FAILED, Error reported: ${exception.message}','ERROR',${exchangeProperty[loopObject]})"/>
- <setHeader headerName="CamelHttpResponseCode">
- <constant>500</constant>
- </setHeader>
- <setBody>
- <simple>UPDATE Operational policies FAILED</simple>
- </setBody>
- </doCatch>
- </doTry>
- </route>
- </post>
- <post uri="/v2/loop/updateMicroservicePolicy/{loopName}"
- type="org.onap.policy.clamp.policy.microservice.MicroServicePolicy"
- consumes="application/json"
- outType="org.onap.policy.clamp.policy.microservice.MicroServicePolicy"
- produces="application/json">
- <route>
- <removeHeaders pattern="*" excludePattern="loopName" />
- <doTry>
- <to
- uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Update Microservice policies')" />
- <to
- uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" />
- <setProperty propertyName="MicroServicePolicyObject">
- <simple>${body}</simple>
- </setProperty>
+ <setHeader headerName="CamelHttpResponseCode">
+ <constant>500</constant>
+ </setHeader>
+ <setBody>
+ <simple>UPDATE Operational policies FAILED</simple>
+ </setBody>
+ </doCatch>
+ </doTry>
+ </route>
+ </post>
+ <post uri="/v2/loop/updateMicroservicePolicy/{loopName}"
+ type="org.onap.policy.clamp.policy.microservice.MicroServicePolicy"
+ consumes="application/json"
+ outType="org.onap.policy.clamp.policy.microservice.MicroServicePolicy"
+ produces="application/json">
+ <route>
+ <removeHeaders pattern="*" excludePattern="loopName"/>
+ <doTry>
+ <to
+ uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Update Microservice policies')"/>
+ <to
+ uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')"/>
+ <setProperty propertyName="MicroServicePolicyObject">
+ <simple>${body}</simple>
+ </setProperty>
- <to uri="direct:load-loop" />
- <to
- uri="bean:org.onap.policy.clamp.loop.LoopController?method=updateMicroservicePolicy(${header.loopName},${exchangeProperty[MicroServicePolicyObject]})" />
- <to
- uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('Micro Service policies UPDATED','INFO',${exchangeProperty[loopObject]})" />
- <to
- uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()" />
- <doCatch>
- <exception>java.lang.Exception</exception>
- <handled>
- <constant>true</constant>
- </handled>
- <to
- uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()" />
- <log loggingLevel="ERROR"
- message="UPDATE MicroService policy FAILED for loop: ${header.loopName}, ${exception.stacktrace}" />
- <to
- uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('UPDATE MicroService policy request FAILED, Error reported: ${exception.message}','ERROR',${exchangeProperty[loopObject]})" />
- <setHeader headerName="CamelHttpResponseCode">
- <constant>500</constant>
- </setHeader>
- <setBody>
- <simple>UPDATE MicroService policy FAILED</simple>
- </setBody>
- </doCatch>
- </doTry>
- </route>
- </post>
- <put uri="/v2/loop/deploy/{loopName}"
+ <to uri="direct:load-loop"/>
+ <to
+ uri="bean:org.onap.policy.clamp.loop.LoopController?method=updateMicroservicePolicy(${header.loopName},${exchangeProperty[MicroServicePolicyObject]})"/>
+ <to
+ uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('Micro Service policies UPDATED','INFO',${exchangeProperty[loopObject]})"/>
+ <to
+ uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()"/>
+ <doCatch>
+ <exception>java.lang.Exception</exception>
+ <handled>
+ <constant>true</constant>
+ </handled>
+ <to
+ uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()"/>
+ <log loggingLevel="ERROR"
+ message="UPDATE MicroService policy FAILED for loop: ${header.loopName}, ${exception.stacktrace}"/>
+ <to
+ uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('UPDATE MicroService policy request FAILED, Error reported: ${exception.message}','ERROR',${exchangeProperty[loopObject]})"/>
+ <setHeader headerName="CamelHttpResponseCode">
+ <constant>500</constant>
+ </setHeader>
+ <setBody>
+ <simple>UPDATE MicroService policy FAILED</simple>
+ </setBody>
+ </doCatch>
+ </doTry>
+ </route>
+ </post>
+ <put uri="/v2/loop/deploy/{loopName}"
outType="org.onap.policy.clamp.loop.Loop" produces="application/json">
- <route>
- <removeHeaders pattern="*" excludePattern="loopName" />
- <doTry>
- <log loggingLevel="INFO"
- message="DCAE DEPLOY request for loop: ${header.loopName}" />
- <setProperty propertyName="raiseHttpExceptionFlag">
- <simple resultType="java.lang.Boolean">true</simple>
- </setProperty>
- <to
- uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'DCAE DEPLOY request')" />
- <to
- uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" />
- <to uri="direct:load-loop" />
- <to
- uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('DCAE DEPLOY request','INFO',${exchangeProperty[loopObject]})" />
+ <route>
+ <removeHeaders pattern="*" excludePattern="loopName"/>
+ <doTry>
+ <log loggingLevel="INFO"
+ message="DCAE DEPLOY request for loop: ${header.loopName}"/>
+ <setProperty propertyName="raiseHttpExceptionFlag">
+ <simple resultType="java.lang.Boolean">true</simple>
+ </setProperty>
+ <to
+ uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'DCAE DEPLOY request')"/>
+ <to
+ uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')"/>
+ <to uri="direct:load-loop"/>
+ <to
+ uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('DCAE DEPLOY request','INFO',${exchangeProperty[loopObject]})"/>
- <to uri="direct:deploy-loop" />
+ <to uri="direct:deploy-loop"/>
- <log loggingLevel="INFO"
- message="DEPLOY request successfully executed for loop: ${header.loopName}" />
- <to
- uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('DEPLOY request successfully executed','INFO',${exchangeProperty[loopObject]})" />
- <to
- uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()" />
- <doCatch>
- <exception>java.lang.Exception</exception>
- <handled>
- <constant>true</constant>
- </handled>
- <to
- uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()" />
- <log loggingLevel="ERROR"
- message="DEPLOY request FAILED for loop: ${header.loopName}, ${exception.stacktrace}" />
- <to
- uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('DEPLOY request failed, Error reported: ${exception} - Body: ${exception.responseBody}','ERROR',${exchangeProperty[loopObject]})" />
- <setHeader headerName="CamelHttpResponseCode">
- <constant>500</constant>
- </setHeader>
- <setBody>
- <simple>DEPLOY request FAILED</simple>
- </setBody>
- </doCatch>
- </doTry>
- </route>
- </put>
- <put uri="/v2/loop/refreshMicroServicePolicyJsonSchema/{loopName}/{microServicePolicyName}"
+ <log loggingLevel="INFO"
+ message="DEPLOY request successfully executed for loop: ${header.loopName}"/>
+ <to
+ uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('DEPLOY request successfully executed','INFO',${exchangeProperty[loopObject]})"/>
+ <to
+ uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()"/>
+ <doCatch>
+ <exception>java.lang.Exception</exception>
+ <handled>
+ <constant>true</constant>
+ </handled>
+ <to
+ uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()"/>
+ <log loggingLevel="ERROR"
+ message="DEPLOY request FAILED for loop: ${header.loopName}, ${exception.stacktrace}"/>
+ <to
+ uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('DEPLOY request failed, Error reported: ${exception} - Body: ${exception.responseBody}','ERROR',${exchangeProperty[loopObject]})"/>
+ <setHeader headerName="CamelHttpResponseCode">
+ <constant>500</constant>
+ </setHeader>
+ <setBody>
+ <simple>DEPLOY request FAILED</simple>
+ </setBody>
+ </doCatch>
+ </doTry>
+ </route>
+ </put>
+ <put uri="/v2/loop/refreshMicroServicePolicyJsonSchema/{loopName}/{microServicePolicyName}"
outType="org.onap.policy.clamp.loop.Loop" produces="application/json">
- <route>
- <removeHeaders pattern="*" excludePattern="loopName|microServicePolicyName" />
- <doTry>
- <log loggingLevel="INFO"
- message="Refresh Micro Service Policy UI for loop: ${header.loopName} and ${header.microServicePolicyName}" />
- <to
- uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'REFRESH Micro Service Policy UI request')" />
- <to
- uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" />
- <to uri="direct:load-loop" />
- <to
- uri="bean:org.onap.policy.clamp.loop.cds.CdsDataInstaller?method=updateCdsServiceProperties(${exchangeProperty[loopObject].getModelService()})" />
- <to
- uri="bean:org.onap.policy.clamp.loop.LoopController?method=refreshMicroServicePolicyJsonRepresentation(${exchangeProperty[loopObject]},${header.microServicePolicyName})" />
- <log loggingLevel="INFO"
- message="REFRESH Micro Service policy request successfully executed for loop: ${header.loopName}" />
- <to
- uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('REFRESH Micro Service policy request successfully executed','INFO',${exchangeProperty[loopObject]})" />
- <to
- uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()" />
- <doCatch>
- <exception>java.lang.Exception</exception>
- <handled>
- <constant>true</constant>
- </handled>
- <to
- uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()" />
- <log loggingLevel="ERROR"
- message="REFRESH json schema request FAILED for loop: ${header.loopName}, ${exception.stacktrace}" />
- <to
- uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('REFRESH Json schema request failed, Error reported: ${exception} - Body: ${exception.responseBody}','ERROR',${exchangeProperty[loopObject]})" />
- <setHeader headerName="CamelHttpResponseCode">
- <constant>500</constant>
- </setHeader>
- <setBody>
- <simple>REFRESH json schema request FAILED</simple>
- </setBody>
- </doCatch>
- </doTry>
- </route>
- </put>
- <put uri="/v2/loop/refreshOperationalPolicyJsonSchema/{loopName}/{operationalPolicyName}"
+ <route>
+ <removeHeaders pattern="*" excludePattern="loopName|microServicePolicyName"/>
+ <doTry>
+ <log loggingLevel="INFO"
+ message="Refresh Micro Service Policy UI for loop: ${header.loopName} and ${header.microServicePolicyName}"/>
+ <to
+ uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'REFRESH Micro Service Policy UI request')"/>
+ <to
+ uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')"/>
+ <to uri="direct:load-loop"/>
+ <to
+ uri="bean:org.onap.policy.clamp.loop.cds.CdsDataInstaller?method=updateCdsServiceProperties(${exchangeProperty[loopObject].getModelService()})"/>
+ <to
+ uri="bean:org.onap.policy.clamp.loop.LoopController?method=refreshMicroServicePolicyJsonRepresentation(${exchangeProperty[loopObject]},${header.microServicePolicyName})"/>
+ <log loggingLevel="INFO"
+ message="REFRESH Micro Service policy request successfully executed for loop: ${header.loopName}"/>
+ <to
+ uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('REFRESH Micro Service policy request successfully executed','INFO',${exchangeProperty[loopObject]})"/>
+ <to
+ uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()"/>
+ <doCatch>
+ <exception>java.lang.Exception</exception>
+ <handled>
+ <constant>true</constant>
+ </handled>
+ <to
+ uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()"/>
+ <log loggingLevel="ERROR"
+ message="REFRESH json schema request FAILED for loop: ${header.loopName}, ${exception.stacktrace}"/>
+ <to
+ uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('REFRESH Json schema request failed, Error reported: ${exception} - Body: ${exception.responseBody}','ERROR',${exchangeProperty[loopObject]})"/>
+ <setHeader headerName="CamelHttpResponseCode">
+ <constant>500</constant>
+ </setHeader>
+ <setBody>
+ <simple>REFRESH json schema request FAILED</simple>
+ </setBody>
+ </doCatch>
+ </doTry>
+ </route>
+ </put>
+ <put uri="/v2/loop/refreshOperationalPolicyJsonSchema/{loopName}/{operationalPolicyName}"
outType="org.onap.policy.clamp.loop.Loop" produces="application/json">
- <route>
- <removeHeaders pattern="*" excludePattern="loopName|operationalPolicyName" />
- <doTry>
- <log loggingLevel="INFO"
- message="Refresh Operational Policy UI for loop: ${header.loopName} and ${header.operationalPolicyName}" />
- <to
- uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'REFRESH Operational Policy UI request')" />
- <to
- uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" />
- <to uri="direct:load-loop" />
- <to
- uri="bean:org.onap.policy.clamp.loop.cds.CdsDataInstaller?method=updateCdsServiceProperties(${exchangeProperty[loopObject].getModelService()})" />
- <to
- uri="bean:org.onap.policy.clamp.loop.LoopController?method=refreshOperationalPolicyJsonRepresentation(${exchangeProperty[loopObject]},${header.operationalPolicyName})" />
- <log loggingLevel="INFO"
- message="REFRESH operational policy request successfully executed for loop: ${header.loopName}" />
- <to
- uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('REFRESH operational policy request successfully executed','INFO',${exchangeProperty[loopObject]})" />
- <to
- uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()" />
- <doCatch>
- <exception>java.lang.Exception</exception>
- <handled>
- <constant>true</constant>
- </handled>
- <to
- uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()" />
- <log loggingLevel="ERROR"
- message="REFRESH json schema request FAILED for loop: ${header.loopName}, ${exception.stacktrace}" />
- <to
- uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('REFRESH Json schema request failed, Error reported: ${exception} - Body: ${exception.responseBody}','ERROR',${exchangeProperty[loopObject]})" />
- <setHeader headerName="CamelHttpResponseCode">
- <constant>500</constant>
- </setHeader>
- <setBody>
- <simple>REFRESH json schema request FAILED</simple>
- </setBody>
- </doCatch>
- </doTry>
- </route>
- </put>
- <put uri="/v2/loop/undeploy/{loopName}"
+ <route>
+ <removeHeaders pattern="*" excludePattern="loopName|operationalPolicyName"/>
+ <doTry>
+ <log loggingLevel="INFO"
+ message="Refresh Operational Policy UI for loop: ${header.loopName} and ${header.operationalPolicyName}"/>
+ <to
+ uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'REFRESH Operational Policy UI request')"/>
+ <to
+ uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')"/>
+ <to uri="direct:load-loop"/>
+ <to
+ uri="bean:org.onap.policy.clamp.loop.cds.CdsDataInstaller?method=updateCdsServiceProperties(${exchangeProperty[loopObject].getModelService()})"/>
+ <to
+ uri="bean:org.onap.policy.clamp.loop.LoopController?method=refreshOperationalPolicyJsonRepresentation(${exchangeProperty[loopObject]},${header.operationalPolicyName})"/>
+ <log loggingLevel="INFO"
+ message="REFRESH operational policy request successfully executed for loop: ${header.loopName}"/>
+ <to
+ uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('REFRESH operational policy request successfully executed','INFO',${exchangeProperty[loopObject]})"/>
+ <to
+ uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()"/>
+ <doCatch>
+ <exception>java.lang.Exception</exception>
+ <handled>
+ <constant>true</constant>
+ </handled>
+ <to
+ uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()"/>
+ <log loggingLevel="ERROR"
+ message="REFRESH json schema request FAILED for loop: ${header.loopName}, ${exception.stacktrace}"/>
+ <to
+ uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('REFRESH Json schema request failed, Error reported: ${exception} - Body: ${exception.responseBody}','ERROR',${exchangeProperty[loopObject]})"/>
+ <setHeader headerName="CamelHttpResponseCode">
+ <constant>500</constant>
+ </setHeader>
+ <setBody>
+ <simple>REFRESH json schema request FAILED</simple>
+ </setBody>
+ </doCatch>
+ </doTry>
+ </route>
+ </put>
+ <put uri="/v2/loop/undeploy/{loopName}"
outType="org.onap.policy.clamp.loop.Loop" produces="application/json">
- <route>
- <removeHeaders pattern="*" excludePattern="loopName" />
- <doTry>
- <log loggingLevel="INFO"
- message="DCAE UNDEPLOY request for loop: ${header.loopName}" />
- <setProperty propertyName="raiseHttpExceptionFlag">
- <simple resultType="java.lang.Boolean">true</simple>
- </setProperty>
- <to
- uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'DCAE UNDEPLOY request')" />
- <to
- uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" />
- <to uri="direct:load-loop" />
- <to
- uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('DCAE UNDEPLOY request','INFO',${exchangeProperty[loopObject]})" />
- <to uri="direct:undeploy-loop" />
+ <route>
+ <removeHeaders pattern="*" excludePattern="loopName"/>
+ <doTry>
+ <log loggingLevel="INFO"
+ message="DCAE UNDEPLOY request for loop: ${header.loopName}"/>
+ <setProperty propertyName="raiseHttpExceptionFlag">
+ <simple resultType="java.lang.Boolean">true</simple>
+ </setProperty>
+ <to
+ uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'DCAE UNDEPLOY request')"/>
+ <to
+ uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')"/>
+ <to uri="direct:load-loop"/>
+ <to
+ uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('DCAE UNDEPLOY request','INFO',${exchangeProperty[loopObject]})"/>
+ <to uri="direct:undeploy-loop"/>
- <log loggingLevel="INFO"
- message="UNDEPLOY request successfully executed for loop: ${header.loopName}" />
- <to
- uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('UNDEPLOY request successfully executed','INFO',${exchangeProperty[loopObject]})" />
- <to
- uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()" />
- <doCatch>
- <exception>java.lang.Exception</exception>
- <handled>
- <constant>true</constant>
- </handled>
- <to
- uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()" />
- <log loggingLevel="ERROR"
- message="UNDEPLOY request FAILED for loop: ${header.loopName}, ${exception.stacktrace}" />
- <to
- uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('UNDEPLOY request failed, Error reported: ${exception} - Body: ${exception.responseBody}','ERROR',${exchangeProperty[loopObject]})" />
- <setHeader headerName="CamelHttpResponseCode">
- <constant>500</constant>
- </setHeader>
- <setBody>
- <simple>UNDEPLOY request FAILED</simple>
- </setBody>
- </doCatch>
- </doTry>
- </route>
- </put>
- <put uri="/v2/loop/stop/{loopName}"
+ <log loggingLevel="INFO"
+ message="UNDEPLOY request successfully executed for loop: ${header.loopName}"/>
+ <to
+ uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('UNDEPLOY request successfully executed','INFO',${exchangeProperty[loopObject]})"/>
+ <to
+ uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()"/>
+ <doCatch>
+ <exception>java.lang.Exception</exception>
+ <handled>
+ <constant>true</constant>
+ </handled>
+ <to
+ uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()"/>
+ <log loggingLevel="ERROR"
+ message="UNDEPLOY request FAILED for loop: ${header.loopName}, ${exception.stacktrace}"/>
+ <to
+ uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('UNDEPLOY request failed, Error reported: ${exception} - Body: ${exception.responseBody}','ERROR',${exchangeProperty[loopObject]})"/>
+ <setHeader headerName="CamelHttpResponseCode">
+ <constant>500</constant>
+ </setHeader>
+ <setBody>
+ <simple>UNDEPLOY request FAILED</simple>
+ </setBody>
+ </doCatch>
+ </doTry>
+ </route>
+ </put>
+ <put uri="/v2/loop/stop/{loopName}"
outType="org.onap.policy.clamp.loop.Loop" produces="application/json">
- <route>
- <removeHeaders pattern="*" excludePattern="loopName" />
- <doTry>
- <log loggingLevel="INFO"
- message="STOP request for loop: ${header.loopName}" />
- <setProperty propertyName="raiseHttpExceptionFlag">
- <simple resultType="java.lang.Boolean">true</simple>
- </setProperty>
- <to
- uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*,'STOP request')" />
- <to
- uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" />
- <to uri="direct:load-loop" />
- <to
- uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('STOP request','INFO',${exchangeProperty[loopObject]})" />
+ <route>
+ <removeHeaders pattern="*" excludePattern="loopName"/>
+ <doTry>
+ <log loggingLevel="INFO"
+ message="STOP request for loop: ${header.loopName}"/>
+ <setProperty propertyName="raiseHttpExceptionFlag">
+ <simple resultType="java.lang.Boolean">true</simple>
+ </setProperty>
+ <to
+ uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*,'STOP request')"/>
+ <to
+ uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')"/>
+ <to uri="direct:load-loop"/>
+ <to
+ uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('STOP request','INFO',${exchangeProperty[loopObject]})"/>
- <to uri="direct:remove-all-policy-from-active-pdp-group" />
- <log loggingLevel="INFO"
- message="STOP request successfully executed for loop: ${header.loopName}" />
- <to
- uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('STOP request successfully executed','INFO',${exchangeProperty[loopObject]})" />
- <to
- uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()" />
- <doCatch>
- <exception>java.lang.Exception</exception>
- <handled>
- <constant>true</constant>
- </handled>
- <to
- uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()" />
- <log loggingLevel="ERROR"
- message="STOP request FAILED for loop: ${header.loopName}, ${exception.stacktrace}" />
- <to
- uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('STOP request failed, Error reported: ${exception} - Body: ${exception.responseBody}','ERROR',${exchangeProperty[loopObject]})" />
- <setHeader headerName="CamelHttpResponseCode">
- <constant>500</constant>
- </setHeader>
- <setBody>
- <simple>STOP request FAILED</simple>
- </setBody>
- </doCatch>
- </doTry>
- </route>
- </put>
- <put uri="/v2/loop/restart/{loopName}"
+ <to uri="direct:remove-all-policy-from-active-pdp-group"/>
+ <log loggingLevel="INFO"
+ message="STOP request successfully executed for loop: ${header.loopName}"/>
+ <to
+ uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('STOP request successfully executed','INFO',${exchangeProperty[loopObject]})"/>
+ <to
+ uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()"/>
+ <doCatch>
+ <exception>java.lang.Exception</exception>
+ <handled>
+ <constant>true</constant>
+ </handled>
+ <to
+ uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()"/>
+ <log loggingLevel="ERROR"
+ message="STOP request FAILED for loop: ${header.loopName}, ${exception.stacktrace}"/>
+ <to
+ uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('STOP request failed, Error reported: ${exception} - Body: ${exception.responseBody}','ERROR',${exchangeProperty[loopObject]})"/>
+ <setHeader headerName="CamelHttpResponseCode">
+ <constant>500</constant>
+ </setHeader>
+ <setBody>
+ <simple>STOP request FAILED</simple>
+ </setBody>
+ </doCatch>
+ </doTry>
+ </route>
+ </put>
+ <put uri="/v2/loop/restart/{loopName}"
outType="org.onap.policy.clamp.loop.Loop" produces="application/json">
- <route>
- <removeHeaders pattern="*" excludePattern="loopName" />
- <doTry>
- <log loggingLevel="INFO"
- message="RESTART request for loop: ${header.loopName}" />
- <setProperty propertyName="raiseHttpExceptionFlag">
- <simple resultType="java.lang.Boolean">true</simple>
- </setProperty>
- <to
- uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*,'RESTART request')" />
- <to
- uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" />
- <to uri="direct:load-loop" />
+ <route>
+ <removeHeaders pattern="*" excludePattern="loopName"/>
+ <doTry>
+ <log loggingLevel="INFO"
+ message="RESTART request for loop: ${header.loopName}"/>
+ <setProperty propertyName="raiseHttpExceptionFlag">
+ <simple resultType="java.lang.Boolean">true</simple>
+ </setProperty>
+ <to
+ uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*,'RESTART request')"/>
+ <to
+ uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')"/>
+ <to uri="direct:load-loop"/>
- <to
- uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('RESTART request','INFO',${exchangeProperty[loopObject]})" />
+ <to
+ uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('RESTART request','INFO',${exchangeProperty[loopObject]})"/>
- <to uri="direct:add-all-to-active-pdp-group" />
- <log loggingLevel="INFO"
- message="RESTART request successfully executed for loop: ${header.loopName}" />
- <to
- uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('RESTART request successfully executed','INFO',${exchangeProperty[loopObject]})" />
- <to
- uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()" />
- <doCatch>
- <exception>java.lang.Exception</exception>
- <handled>
- <constant>true</constant>
- </handled>
- <to
- uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()" />
- <log loggingLevel="ERROR"
- message="RESTART request FAILED for loop: ${header.loopName}, ${exception.stacktrace}" />
- <to
- uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('RESTART request failed, Error reported: ${exception} - Body: ${exception.responseBody}','ERROR',${exchangeProperty[loopObject]})" />
- <setHeader headerName="CamelHttpResponseCode">
- <constant>500</constant>
- </setHeader>
- <setBody>
- <simple>RESTART request FAILED</simple>
- </setBody>
- </doCatch>
- </doTry>
- </route>
- </put>
- <put uri="/v2/loop/submit/{loopName}"
+ <to uri="direct:add-all-to-active-pdp-group"/>
+ <log loggingLevel="INFO"
+ message="RESTART request successfully executed for loop: ${header.loopName}"/>
+ <to
+ uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('RESTART request successfully executed','INFO',${exchangeProperty[loopObject]})"/>
+ <to
+ uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()"/>
+ <doCatch>
+ <exception>java.lang.Exception</exception>
+ <handled>
+ <constant>true</constant>
+ </handled>
+ <to
+ uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()"/>
+ <log loggingLevel="ERROR"
+ message="RESTART request FAILED for loop: ${header.loopName}, ${exception.stacktrace}"/>
+ <to
+ uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('RESTART request failed, Error reported: ${exception} - Body: ${exception.responseBody}','ERROR',${exchangeProperty[loopObject]})"/>
+ <setHeader headerName="CamelHttpResponseCode">
+ <constant>500</constant>
+ </setHeader>
+ <setBody>
+ <simple>RESTART request FAILED</simple>
+ </setBody>
+ </doCatch>
+ </doTry>
+ </route>
+ </put>
+ <put uri="/v2/loop/submit/{loopName}"
outType="org.onap.policy.clamp.loop.Loop" produces="application/json">
- <route>
- <removeHeaders pattern="*" excludePattern="loopName" />
- <doTry>
- <log loggingLevel="INFO"
- message="POLICY SUBMIT request for loop: ${header.loopName}" />
- <setProperty propertyName="raiseHttpExceptionFlag">
- <simple resultType="java.lang.Boolean">true</simple>
- </setProperty>
- <to
- uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'POLICY SUBMIT request')" />
- <to
- uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" />
- <to uri="direct:load-loop" />
- <to
- uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('POLICY SUBMIT request','INFO',${exchangeProperty[loopObject]})" />
- <setProperty propertyName="raiseHttpExceptionFlag">
- <simple resultType="java.lang.Boolean">false</simple>
- </setProperty>
- <to uri="direct:remove-all-policy-from-active-pdp-group" />
- <log loggingLevel="INFO"
- message="Processing all MICRO-SERVICES policies defined in loop ${exchangeProperty[loopObject].getName()}" />
- <split>
- <simple>${exchangeProperty[loopObject].getMicroServicePolicies()}
- </simple>
- <setProperty propertyName="policy">
- <simple>${body}</simple>
- </setProperty>
- <log loggingLevel="INFO"
- message="Processing Micro Service Policy: ${exchangeProperty[policy].getName()}" />
- <setProperty propertyName="raiseHttpExceptionFlag">
- <simple resultType="java.lang.Boolean">false</simple>
- </setProperty>
- <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="policy">
- <simple>${body}</simple>
- </setProperty>
- <log loggingLevel="INFO"
- message="Processing Operational Policy: ${exchangeProperty[policy].getName()}" />
- <setProperty propertyName="raiseHttpExceptionFlag">
- <simple resultType="java.lang.Boolean">false</simple>
- </setProperty>
+ <route>
+ <removeHeaders pattern="*" excludePattern="loopName"/>
+ <doTry>
+ <log loggingLevel="INFO"
+ message="POLICY SUBMIT request for loop: ${header.loopName}"/>
+ <setProperty propertyName="raiseHttpExceptionFlag">
+ <simple resultType="java.lang.Boolean">true</simple>
+ </setProperty>
+ <to
+ uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'POLICY SUBMIT request')"/>
+ <to
+ uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')"/>
+ <to uri="direct:load-loop"/>
+ <to
+ uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('POLICY SUBMIT request','INFO',${exchangeProperty[loopObject]})"/>
+ <setProperty propertyName="raiseHttpExceptionFlag">
+ <simple resultType="java.lang.Boolean">false</simple>
+ </setProperty>
+ <to uri="direct:remove-all-policy-from-active-pdp-group"/>
+ <log loggingLevel="INFO"
+ message="Processing all MICRO-SERVICES policies defined in loop ${exchangeProperty[loopObject].getName()}"/>
+ <split>
+ <simple>${exchangeProperty[loopObject].getMicroServicePolicies()}
+ </simple>
+ <setProperty propertyName="policy">
+ <simple>${body}</simple>
+ </setProperty>
+ <log loggingLevel="INFO"
+ message="Processing Micro Service Policy: ${exchangeProperty[policy].getName()}"/>
+ <setProperty propertyName="raiseHttpExceptionFlag">
+ <simple resultType="java.lang.Boolean">false</simple>
+ </setProperty>
+ <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="policy">
+ <simple>${body}</simple>
+ </setProperty>
+ <log loggingLevel="INFO"
+ message="Processing Operational Policy: ${exchangeProperty[policy].getName()}"/>
+ <setProperty propertyName="raiseHttpExceptionFlag">
+ <simple resultType="java.lang.Boolean">false</simple>
+ </setProperty>
- <to uri="direct:delete-policy" />
- <to uri="direct:create-policy" />
- </split>
+ <to uri="direct:delete-policy"/>
+ <to uri="direct:create-policy"/>
+ </split>
- <delay>
- <constant>3000</constant>
- </delay>
+ <delay>
+ <constant>3000</constant>
+ </delay>
- <to uri="direct:add-all-to-active-pdp-group" />
+ <to uri="direct:add-all-to-active-pdp-group"/>
- <log loggingLevel="INFO"
- message="SUBMIT request successfully executed for loop: ${header.loopName}" />
- <to
- uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('SUBMIT request successfully executed','INFO',${exchangeProperty[loopObject]})" />
- <to
- uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()" />
- <doCatch>
- <exception>java.lang.Exception</exception>
- <handled>
- <constant>true</constant>
- </handled>
- <to
- uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()" />
- <log loggingLevel="ERROR"
- message="SUBMIT request FAILED for loop: ${header.loopName}, ${exception.stacktrace}" />
- <to
- uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('SUBMIT request failed, Error reported: ${exception} - Body: ${exception.responseBody}','ERROR',${exchangeProperty[loopObject]})" />
- <setHeader headerName="CamelHttpResponseCode">
- <constant>500</constant>
- </setHeader>
- <setBody>
- <simple>SUBMIT request FAILED</simple>
- </setBody>
- </doCatch>
- </doTry>
- </route>
- </put>
- <put uri="/v2/loop/delete/{loopName}">
- <route>
- <removeHeaders pattern="*" excludePattern="loopName" />
- <doTry>
- <log loggingLevel="INFO"
- message="DELETE request for loop: ${header.loopName}" />
- <setProperty propertyName="raiseHttpExceptionFlag">
- <simple resultType="java.lang.Boolean">true</simple>
- </setProperty>
- <to
- uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*,'DELETE request')" />
- <to
- uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" />
- <to uri="direct:load-loop" />
- <to
- uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('DELETE request','INFO',${exchangeProperty[loopObject]})" />
- <to uri="direct:undeploy-loop" />
- <to uri="direct:remove-all-policy-from-active-pdp-group" />
- <log loggingLevel="INFO"
- message="Deleting all MICRO-SERVICES policies defined in loop ${exchangeProperty[loopObject].getName()}" />
- <split>
- <simple>${exchangeProperty[loopObject].getMicroServicePolicies()}
- </simple>
- <setProperty propertyName="policy">
- <simple>${body}</simple>
- </setProperty>
- <log loggingLevel="INFO"
- message="Deleting Micro Service Policy: ${exchangeProperty[policy].getName()}" />
- <setProperty propertyName="raiseHttpExceptionFlag">
- <simple resultType="java.lang.Boolean">false</simple>
- </setProperty>
- <to uri="direct:delete-policy" />
- </split>
- <log loggingLevel="INFO"
- message="Deleting all OPERATIONAL policies defined in loop ${exchangeProperty[loopObject].getName()}" />
- <split>
- <simple>${exchangeProperty[loopObject].getOperationalPolicies()}
- </simple>
- <setProperty propertyName="policy">
- <simple>${body}</simple>
- </setProperty>
- <log loggingLevel="INFO"
- message="Deleting Operational Policy: ${exchangeProperty[policy].getName()}" />
- <setProperty propertyName="raiseHttpExceptionFlag">
- <simple resultType="java.lang.Boolean">false</simple>
- </setProperty>
- <to uri="direct:delete-policy" />
- </split>
- <to
- uri="bean:org.onap.policy.clamp.loop.LoopController?method=deleteLoop(${header.loopName})" />
- <log loggingLevel="INFO"
- message="DELETE request successfully executed for loop: ${header.loopName}" />
- <to
- uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()" />
- <doCatch>
- <exception>java.lang.Exception</exception>
- <handled>
- <constant>true</constant>
- </handled>
- <to
- uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()" />
- <log loggingLevel="ERROR"
- message="DELETE request FAILED for loop: ${header.loopName}, ${exception.stacktrace}" />
- <to
- uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('DELETE request failed, Error reported: ${exception} - Body: ${exception.responseBody}','ERROR',${exchangeProperty[loopObject]})" />
- <setHeader headerName="CamelHttpResponseCode">
- <constant>500</constant>
- </setHeader>
- <setBody>
- <simple>DELETE request FAILED</simple>
- </setBody>
- </doCatch>
- </doTry>
- </route>
- </put>
- <get uri="/v2/loop/getstatus/{loopName}"
+ <log loggingLevel="INFO"
+ message="SUBMIT request successfully executed for loop: ${header.loopName}"/>
+ <to
+ uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('SUBMIT request successfully executed','INFO',${exchangeProperty[loopObject]})"/>
+ <to
+ uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()"/>
+ <doCatch>
+ <exception>java.lang.Exception</exception>
+ <handled>
+ <constant>true</constant>
+ </handled>
+ <to
+ uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()"/>
+ <log loggingLevel="ERROR"
+ message="SUBMIT request FAILED for loop: ${header.loopName}, ${exception.stacktrace}"/>
+ <to
+ uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('SUBMIT request failed, Error reported: ${exception} - Body: ${exception.responseBody}','ERROR',${exchangeProperty[loopObject]})"/>
+ <setHeader headerName="CamelHttpResponseCode">
+ <constant>500</constant>
+ </setHeader>
+ <setBody>
+ <simple>SUBMIT request FAILED</simple>
+ </setBody>
+ </doCatch>
+ </doTry>
+ </route>
+ </put>
+ <put uri="/v2/loop/delete/{loopName}">
+ <route>
+ <removeHeaders pattern="*" excludePattern="loopName"/>
+ <doTry>
+ <log loggingLevel="INFO"
+ message="DELETE request for loop: ${header.loopName}"/>
+ <setProperty propertyName="raiseHttpExceptionFlag">
+ <simple resultType="java.lang.Boolean">true</simple>
+ </setProperty>
+ <to
+ uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*,'DELETE request')"/>
+ <to
+ uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')"/>
+ <to uri="direct:load-loop"/>
+ <to
+ uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('DELETE request','INFO',${exchangeProperty[loopObject]})"/>
+ <to uri="direct:undeploy-loop"/>
+ <to uri="direct:remove-all-policy-from-active-pdp-group"/>
+ <log loggingLevel="INFO"
+ message="Deleting all MICRO-SERVICES policies defined in loop ${exchangeProperty[loopObject].getName()}"/>
+ <split>
+ <simple>${exchangeProperty[loopObject].getMicroServicePolicies()}
+ </simple>
+ <setProperty propertyName="policy">
+ <simple>${body}</simple>
+ </setProperty>
+ <log loggingLevel="INFO"
+ message="Deleting Micro Service Policy: ${exchangeProperty[policy].getName()}"/>
+ <setProperty propertyName="raiseHttpExceptionFlag">
+ <simple resultType="java.lang.Boolean">false</simple>
+ </setProperty>
+ <to uri="direct:delete-policy"/>
+ </split>
+ <log loggingLevel="INFO"
+ message="Deleting all OPERATIONAL policies defined in loop ${exchangeProperty[loopObject].getName()}"/>
+ <split>
+ <simple>${exchangeProperty[loopObject].getOperationalPolicies()}
+ </simple>
+ <setProperty propertyName="policy">
+ <simple>${body}</simple>
+ </setProperty>
+ <log loggingLevel="INFO"
+ message="Deleting Operational Policy: ${exchangeProperty[policy].getName()}"/>
+ <setProperty propertyName="raiseHttpExceptionFlag">
+ <simple resultType="java.lang.Boolean">false</simple>
+ </setProperty>
+ <to uri="direct:delete-policy"/>
+ </split>
+ <to
+ uri="bean:org.onap.policy.clamp.loop.LoopController?method=deleteLoop(${header.loopName})"/>
+ <log loggingLevel="INFO"
+ message="DELETE request successfully executed for loop: ${header.loopName}"/>
+ <to
+ uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()"/>
+ <doCatch>
+ <exception>java.lang.Exception</exception>
+ <handled>
+ <constant>true</constant>
+ </handled>
+ <to
+ uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()"/>
+ <log loggingLevel="ERROR"
+ message="DELETE request FAILED for loop: ${header.loopName}, ${exception.stacktrace}"/>
+ <to
+ uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('DELETE request failed, Error reported: ${exception} - Body: ${exception.responseBody}','ERROR',${exchangeProperty[loopObject]})"/>
+ <setHeader headerName="CamelHttpResponseCode">
+ <constant>500</constant>
+ </setHeader>
+ <setBody>
+ <simple>DELETE request FAILED</simple>
+ </setBody>
+ </doCatch>
+ </doTry>
+ </route>
+ </put>
+ <get uri="/v2/loop/getstatus/{loopName}"
outType="org.onap.policy.clamp.loop.Loop" produces="application/json">
- <route>
- <removeHeaders pattern="*" excludePattern="loopName" />
- <doTry>
- <log loggingLevel="INFO"
- message="GET STATUS request for loop: ${header.loopName}" />
- <to
- uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'GET STATUS request')" />
- <to
- uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','read')" />
- <to uri="direct:load-loop" />
- <to
- uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('GET STATUS request','INFO',${exchangeProperty[loopObject]})" />
- <to uri="direct:update-policy-status-for-loop" />
- <to uri="direct:update-dcae-status-for-loop" />
- <to uri="direct:update-loop-state" />
+ <route>
+ <removeHeaders pattern="*" excludePattern="loopName"/>
+ <doTry>
+ <log loggingLevel="INFO"
+ message="GET STATUS request for loop: ${header.loopName}"/>
+ <to
+ uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'GET STATUS request')"/>
+ <to
+ uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','read')"/>
+ <to uri="direct:load-loop"/>
+ <to
+ uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('GET STATUS request','INFO',${exchangeProperty[loopObject]})"/>
+ <to uri="direct:update-policy-status-for-loop"/>
+ <to uri="direct:update-dcae-status-for-loop"/>
+ <to uri="direct:update-loop-state"/>
- <to
- uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('GET STATUS request successfully executed','INFO',${exchangeProperty[loopObject]})" />
- <to
- uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()" />
- <doCatch>
- <exception>java.lang.Exception</exception>
- <handled>
- <constant>true</constant>
- </handled>
- <to
- uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()" />
- <log loggingLevel="ERROR"
- message="GET STATUS request FAILED for loop: ${header.loopName}, ${exception.stacktrace}" />
- <to
- uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('GET STATUS request failed, Error reported: ${exception} - Body: ${exception.responseBody}','ERROR',${exchangeProperty[loopObject]})" />
- </doCatch>
- <doFinally>
- <setBody>
- <simple>${exchangeProperty[loopObject]}</simple>
- </setBody>
- <setHeader headerName="CamelHttpResponseCode">
- <constant>200</constant>
- </setHeader>
- </doFinally>
- </doTry>
- </route>
- </get>
+ <to
+ uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('GET STATUS request successfully executed','INFO',${exchangeProperty[loopObject]})"/>
+ <to
+ uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()"/>
+ <doCatch>
+ <exception>java.lang.Exception</exception>
+ <handled>
+ <constant>true</constant>
+ </handled>
+ <to
+ uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()"/>
+ <log loggingLevel="ERROR"
+ message="GET STATUS request FAILED for loop: ${header.loopName}, ${exception.stacktrace}"/>
+ <to
+ uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('GET STATUS request failed, Error reported: ${exception} - Body: ${exception.responseBody}','ERROR',${exchangeProperty[loopObject]})"/>
+ </doCatch>
+ <doFinally>
+ <setBody>
+ <simple>${exchangeProperty[loopObject]}</simple>
+ </setBody>
+ <setHeader headerName="CamelHttpResponseCode">
+ <constant>200</constant>
+ </setHeader>
+ </doFinally>
+ </doTry>
+ </route>
+ </get>
+
+ <put uri="/v2/loop/addOperationaPolicy/{loopName}/policyModel/{policyType}/{policyVersion}"
+ outType="org.onap.policy.clamp.loop.Loop" produces="application/json">
+ <route>
+ <removeHeaders pattern="*" excludePattern="loopName|policyType|policyVersion"/>
+ <doTry>
+ <to
+ uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Add operational Policy')"/>
+ <to
+ uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')"/>
+ <to uri="direct:load-loop"/>
+ <to
+ uri="bean:org.onap.policy.clamp.loop.LoopController?method=addOperationalPolicy(${header.loopName},${header.policyType},${header.policyVersion})"/>
+ <to
+ uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('ADD OperationalPolicy request successfully executed','INFO',${exchangeProperty[loopObject]})"/>
+ <to
+ uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()"/>
+ <doCatch>
+ <exception>java.lang.Exception</exception>
+ <handled>
+ <constant>true</constant>
+ </handled>
+ <to
+ uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()"/>
+ <log loggingLevel="ERROR"
+ message="ADD operational policy request FAILED for loop: ${header.loopName}, ${exception.stacktrace}"/>
+ <to
+ uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('ADD OperationalPolicy request failed','ERROR',${exchangeProperty[loopObject]})"/>
+ <setHeader headerName="CamelHttpResponseCode">
+ <constant>500</constant>
+ </setHeader>
+ <setBody>
+ <simple>ADD Operational policy request FAILED for loop: ${header.loopName},
+ ${exception.message}"
+ </simple>
+ </setBody>
- <put uri="/v2/loop/addOperationaPolicy/{loopName}/policyModel/{policyType}/{policyVersion}" outType="org.onap.policy.clamp.loop.Loop" produces="application/json">
- <route>
- <removeHeaders pattern="*" excludePattern="loopName|policyType|policyVersion" />
- <doTry>
- <to
- uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Add operational Policy')" />
- <to
- uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" />
- <to uri="direct:load-loop" />
- <to
- uri="bean:org.onap.policy.clamp.loop.LoopController?method=addOperationalPolicy(${header.loopName},${header.policyType},${header.policyVersion})" />
- <to
- uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('ADD OperationalPolicy request successfully executed','INFO',${exchangeProperty[loopObject]})" />
- <to
- uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()" />
- <doCatch>
- <exception>java.lang.Exception</exception>
- <handled>
- <constant>true</constant>
- </handled>
- <to
- uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()" />
- <log loggingLevel="ERROR"
- message="ADD operational policy request FAILED for loop: ${header.loopName}, ${exception.stacktrace}" />
- <to
- uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('ADD OperationalPolicy request failed','ERROR',${exchangeProperty[loopObject]})" />
- <setHeader headerName="CamelHttpResponseCode">
- <constant>500</constant>
- </setHeader>
- <setBody>
- <simple>ADD Operational policy request FAILED for loop: ${header.loopName}, ${exception.message}"</simple>
- </setBody>
-
- </doCatch>
- </doTry>
- </route>
- </put>
- <put uri="/v2/loop/removeOperationaPolicy/{loopName}/policyModel/{policyType}/{policyVersion}/{policyName}" outType="org.onap.policy.clamp.loop.Loop" produces="application/json">
- <route>
- <removeHeaders pattern="*" excludePattern="loopName|policyType|policyVersion|policyName" />
- <doTry>
- <to
- uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'REMOVE operational Policy')" />
- <to
- uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" />
- <to uri="direct:load-loop" />
- <setProperty propertyName="policyName">
- <simple>${header.policyName}</simple>
- </setProperty>
- <setProperty propertyName="policy">
- <simple>${exchangeProperty[loopObject].getOperationalPolicy(header.policyName)}</simple>
- </setProperty>
- <setProperty propertyName="raiseHttpExceptionFlag">
- <simple resultType="java.lang.Boolean">false</simple>
- </setProperty>
- <to uri="direct:remove-one-policy-from-active-pdp-group" />
- <setProperty propertyName="raiseHttpExceptionFlag">
- <simple resultType="java.lang.Boolean">false</simple>
- </setProperty>
- <to uri="direct:delete-policy" />
- <to
- uri="bean:org.onap.policy.clamp.loop.LoopController?method=removeOperationalPolicy(${header.loopName},${header.policyType},${header.policyVersion})" />
- <to
- uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('REMOVE OperationalPolicy request successfully executed','INFO',${exchangeProperty[loopObject]})" />
- <to
- uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()" />
- <doCatch>
- <exception>java.lang.Exception</exception>
- <handled>
- <constant>true</constant>
- </handled>
- <to
- uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()" />
- <log loggingLevel="ERROR"
- message="REMOVE operational policy request FAILED for loop: ${header.loopName}, ${exception.stacktrace}" />
- <to
- uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('REMOVE OperationalPolicy request failed','ERROR',${exchangeProperty[loopObject]})" />
- <setHeader headerName="CamelHttpResponseCode">
- <constant>500</constant>
- </setHeader>
- <setBody>
- <simple>REMOVE Operational policy request FAILED</simple>
- </setBody>
- </doCatch>
- </doTry>
- </route>
- </put>
- <post
+ </doCatch>
+ </doTry>
+ </route>
+ </put>
+ <put uri="/v2/loop/removeOperationaPolicy/{loopName}/policyModel/{policyType}/{policyVersion}/{policyName}"
+ outType="org.onap.policy.clamp.loop.Loop" produces="application/json">
+ <route>
+ <removeHeaders pattern="*" excludePattern="loopName|policyType|policyVersion|policyName"/>
+ <doTry>
+ <to
+ uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'REMOVE operational Policy')"/>
+ <to
+ uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')"/>
+ <to uri="direct:load-loop"/>
+ <setProperty propertyName="policyName">
+ <simple>${header.policyName}</simple>
+ </setProperty>
+ <setProperty propertyName="policy">
+ <simple>${exchangeProperty[loopObject].getOperationalPolicy(header.policyName)}</simple>
+ </setProperty>
+ <setProperty propertyName="raiseHttpExceptionFlag">
+ <simple resultType="java.lang.Boolean">false</simple>
+ </setProperty>
+ <to uri="direct:remove-one-policy-from-active-pdp-group"/>
+ <setProperty propertyName="raiseHttpExceptionFlag">
+ <simple resultType="java.lang.Boolean">false</simple>
+ </setProperty>
+ <to uri="direct:delete-policy"/>
+ <to
+ uri="bean:org.onap.policy.clamp.loop.LoopController?method=removeOperationalPolicy(${header.loopName},${header.policyType},${header.policyVersion})"/>
+ <to
+ uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('REMOVE OperationalPolicy request successfully executed','INFO',${exchangeProperty[loopObject]})"/>
+ <to
+ uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()"/>
+ <doCatch>
+ <exception>java.lang.Exception</exception>
+ <handled>
+ <constant>true</constant>
+ </handled>
+ <to
+ uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()"/>
+ <log loggingLevel="ERROR"
+ message="REMOVE operational policy request FAILED for loop: ${header.loopName}, ${exception.stacktrace}"/>
+ <to
+ uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('REMOVE OperationalPolicy request failed','ERROR',${exchangeProperty[loopObject]})"/>
+ <setHeader headerName="CamelHttpResponseCode">
+ <constant>500</constant>
+ </setHeader>
+ <setBody>
+ <simple>REMOVE Operational policy request FAILED</simple>
+ </setBody>
+ </doCatch>
+ </doTry>
+ </route>
+ </put>
+ <post
uri="/v2/loop/create/{loopName}?templateName={templateName}"
outType="org.onap.policy.clamp.loop.Loop" consumes="application/json"
produces="application/json">
- <route>
- <removeHeaders
- pattern="*"
- excludePattern="loopName|templateName" />
- <doTry>
- <to
- uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Create Loop')" />
- <to
- uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" />
- <to
- uri="bean:org.onap.policy.clamp.loop.LoopController?method=createLoop(${header.loopName}, ${header.templateName})" />
- <to
- uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()" />
- <doCatch>
- <exception>java.lang.Exception</exception>
- <handled>
- <constant>true</constant>
- </handled>
- <to
- uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()" />
- <log loggingLevel="ERROR"
- message="CREATE Loop from Template request failed for loop: ${header.loopName}, ${exception.stacktrace}" />
- <to
- uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('CREATE Loop from template request failed','ERROR',${exchangeProperty[loopObject]})" />
- <setHeader headerName="CamelHttpResponseCode">
- <constant>500</constant>
- </setHeader>
- <setBody>
- <simple>CREATE Loop from template FAILED</simple>
- </setBody>
- </doCatch>
- </doTry>
- </route>
- </post>
- <get uri="/v2/dictionary"
+ <route>
+ <removeHeaders
+ pattern="*"
+ excludePattern="loopName|templateName"/>
+ <doTry>
+ <to
+ uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Create Loop')"/>
+ <to
+ uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')"/>
+ <to
+ uri="bean:org.onap.policy.clamp.loop.LoopController?method=createLoop(${header.loopName}, ${header.templateName})"/>
+ <to
+ uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()"/>
+ <doCatch>
+ <exception>java.lang.Exception</exception>
+ <handled>
+ <constant>true</constant>
+ </handled>
+ <to
+ uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()"/>
+ <log loggingLevel="ERROR"
+ message="CREATE Loop from Template request failed for loop: ${header.loopName}, ${exception.stacktrace}"/>
+ <to
+ uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('CREATE Loop from template request failed','ERROR',${exchangeProperty[loopObject]})"/>
+ <setHeader headerName="CamelHttpResponseCode">
+ <constant>500</constant>
+ </setHeader>
+ <setBody>
+ <simple>CREATE Loop from template FAILED</simple>
+ </setBody>
+ </doCatch>
+ </doTry>
+ </route>
+ </post>
+ <get uri="/v2/dictionary"
outType="org.onap.policy.clamp.tosca.Dictionary" produces="application/json">
- <route>
- <removeHeaders pattern="*" />
- <doTry>
- <to
- uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'GET ALL Dictionaries')" />
- <to
- uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'tosca','','read')" />
- <to
- uri="bean:org.onap.policy.clamp.tosca.DictionaryService?method=getAllDictionaries()" />
- <to
- uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()" />
- <doCatch>
- <exception>java.lang.Exception</exception>
- <handled>
- <constant>true</constant>
- </handled>
- <to
- uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()" />
- <log loggingLevel="ERROR"
- message="GET Dictionary request failed: ${exception.stacktrace}" />
- <setHeader headerName="CamelHttpResponseCode">
- <constant>500</constant>
- </setHeader>
- <setBody>
- <simple>GET Dictionary FAILED</simple>
- </setBody>
- </doCatch>
- </doTry>
- </route>
- </get>
+ <route>
+ <removeHeaders pattern="*"/>
+ <doTry>
+ <to
+ uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'GET ALL Dictionaries')"/>
+ <to
+ uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'tosca','','read')"/>
+ <to
+ uri="bean:org.onap.policy.clamp.tosca.DictionaryService?method=getAllDictionaries()"/>
+ <to
+ uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()"/>
+ <doCatch>
+ <exception>java.lang.Exception</exception>
+ <handled>
+ <constant>true</constant>
+ </handled>
+ <to
+ uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()"/>
+ <log loggingLevel="ERROR"
+ message="GET Dictionary request failed: ${exception.stacktrace}"/>
+ <setHeader headerName="CamelHttpResponseCode">
+ <constant>500</constant>
+ </setHeader>
+ <setBody>
+ <simple>GET Dictionary FAILED</simple>
+ </setBody>
+ </doCatch>
+ </doTry>
+ </route>
+ </get>
- <get uri="/v2/dictionary/secondary/names"
- outType="java.lang.String[]" produces="application/json">
- <route>
- <removeHeaders pattern="*" />
- <doTry>
- <to
- uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'GET ALL Secondary Dictionary Level Names')" />
- <to
- uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'tosca','','read')" />
- <to
- uri="bean:org.onap.policy.clamp.tosca.DictionaryService?method=getAllSecondaryLevelDictionaryNames()" />
- <to
- uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()" />
- <doCatch>
- <exception>java.lang.Exception</exception>
- <handled>
- <constant>true</constant>
- </handled>
- <to
- uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()" />
- <log loggingLevel="ERROR"
- message="GET Dictionary request failed: ${exception.stacktrace}" />
- <setHeader headerName="CamelHttpResponseCode">
- <constant>500</constant>
- </setHeader>
- <setBody>
- <simple>GET Dictionary FAILED</simple>
- </setBody>
- </doCatch>
- </doTry>
- </route>
- </get>
- <get uri="/v2/dictionary/{dictionaryName}"
+ <get uri="/v2/dictionary/secondary/names"
+ outType="java.lang.String[]" produces="application/json">
+ <route>
+ <removeHeaders pattern="*"/>
+ <doTry>
+ <to
+ uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'GET ALL Secondary Dictionary Level Names')"/>
+ <to
+ uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'tosca','','read')"/>
+ <to
+ uri="bean:org.onap.policy.clamp.tosca.DictionaryService?method=getAllSecondaryLevelDictionaryNames()"/>
+ <to
+ uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()"/>
+ <doCatch>
+ <exception>java.lang.Exception</exception>
+ <handled>
+ <constant>true</constant>
+ </handled>
+ <to
+ uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()"/>
+ <log loggingLevel="ERROR"
+ message="GET Dictionary request failed: ${exception.stacktrace}"/>
+ <setHeader headerName="CamelHttpResponseCode">
+ <constant>500</constant>
+ </setHeader>
+ <setBody>
+ <simple>GET Dictionary FAILED</simple>
+ </setBody>
+ </doCatch>
+ </doTry>
+ </route>
+ </get>
+ <get uri="/v2/dictionary/{dictionaryName}"
outType="org.onap.policy.clamp.tosca.Dictionary" produces="application/json">
- <route>
- <removeHeaders pattern="*"
- excludePattern="dictionaryName" />
- <doTry>
- <to
- uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'GET ALL Dictionary Elements for a Dictionary Name')" />
- <to
- uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'tosca','','read')" />
- <to
- uri="bean:org.onap.policy.clamp.tosca.DictionaryService?method=getDictionary(${header.dictionaryName})" />
- <to
- uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()" />
- <doCatch>
- <exception>java.lang.Exception</exception>
- <handled>
- <constant>true</constant>
- </handled>
- <to
- uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()" />
- <log loggingLevel="ERROR"
- message="GET Dictionary request failed for: ${header.dictionaryName}, ${exception.stacktrace}" />
- <setHeader headerName="CamelHttpResponseCode">
- <constant>500</constant>
- </setHeader>
- <setBody>
- <simple>GET Dictionary FAILED</simple>
- </setBody>
- </doCatch>
- </doTry>
- </route>
- </get>
- <put uri="/v2/dictionary" type="org.onap.policy.clamp.tosca.Dictionary"
+ <route>
+ <removeHeaders pattern="*"
+ excludePattern="dictionaryName"/>
+ <doTry>
+ <to
+ uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'GET ALL Dictionary Elements for a Dictionary Name')"/>
+ <to
+ uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'tosca','','read')"/>
+ <to
+ uri="bean:org.onap.policy.clamp.tosca.DictionaryService?method=getDictionary(${header.dictionaryName})"/>
+ <to
+ uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()"/>
+ <doCatch>
+ <exception>java.lang.Exception</exception>
+ <handled>
+ <constant>true</constant>
+ </handled>
+ <to
+ uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()"/>
+ <log loggingLevel="ERROR"
+ message="GET Dictionary request failed for: ${header.dictionaryName}, ${exception.stacktrace}"/>
+ <setHeader headerName="CamelHttpResponseCode">
+ <constant>500</constant>
+ </setHeader>
+ <setBody>
+ <simple>GET Dictionary FAILED</simple>
+ </setBody>
+ </doCatch>
+ </doTry>
+ </route>
+ </get>
+ <put uri="/v2/dictionary" type="org.onap.policy.clamp.tosca.Dictionary"
outType="org.onap.policy.clamp.tosca.Dictionary" consumes="application/json"
produces="application/json">
- <route>
- <doTry>
- <to
- uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Add New or Update Dictionary')" />
- <to
- uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'tosca','','update')" />
- <setProperty propertyName="DictionaryObject">
- <simple>${body}</simple>
- </setProperty>
- <to
- uri="bean:org.onap.policy.clamp.tosca.DictionaryService?method=saveOrUpdateDictionary(${exchangeProperty[DictionaryObject]})" />
- <to
- uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()" />
- <doCatch>
- <exception>java.lang.Exception</exception>
- <handled>
- <constant>true</constant>
- </handled>
- <to
- uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()" />
- <log loggingLevel="ERROR"
- message="PUT Dictionary request failed for: ${exception.stacktrace}" />
- <setHeader headerName="CamelHttpResponseCode">
- <constant>500</constant>
- </setHeader>
- <setBody>
- <simple>PUT Dictionary FAILED</simple>
- </setBody>
- </doCatch>
- </doTry>
- </route>
- </put>
+ <route>
+ <doTry>
+ <to
+ uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Add New or Update Dictionary')"/>
+ <to
+ uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'tosca','','update')"/>
+ <setProperty propertyName="DictionaryObject">
+ <simple>${body}</simple>
+ </setProperty>
+ <to
+ uri="bean:org.onap.policy.clamp.tosca.DictionaryService?method=saveOrUpdateDictionary(${exchangeProperty[DictionaryObject]})"/>
+ <to
+ uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()"/>
+ <doCatch>
+ <exception>java.lang.Exception</exception>
+ <handled>
+ <constant>true</constant>
+ </handled>
+ <to
+ uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()"/>
+ <log loggingLevel="ERROR"
+ message="PUT Dictionary request failed for: ${exception.stacktrace}"/>
+ <setHeader headerName="CamelHttpResponseCode">
+ <constant>500</constant>
+ </setHeader>
+ <setBody>
+ <simple>PUT Dictionary FAILED</simple>
+ </setBody>
+ </doCatch>
+ </doTry>
+ </route>
+ </put>
- <put uri="/v2/dictionary/{name}"
+ <put uri="/v2/dictionary/{name}"
type="org.onap.policy.clamp.tosca.Dictionary"
outType="org.onap.policy.clamp.tosca.Dictionary" consumes="application/json"
produces="application/json">
- <route>
- <removeHeaders pattern="*" excludePattern="name" />
- <doTry>
- <to
- uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Add New or Update Dictionary Element')" />
- <to
- uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'tosca','','update')" />
- <setProperty propertyName="DictionaryObject">
- <simple>${body}</simple>
- </setProperty>
- <to
- uri="bean:org.onap.policy.clamp.tosca.DictionaryService?method=saveOrUpdateDictionaryElement(${header.name}, ${exchangeProperty[DictionaryObject]})" />
- <to
- uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()" />
- <doCatch>
- <exception>java.lang.Exception</exception>
- <handled>
- <constant>true</constant>
- </handled>
- <to
- uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()" />
- <log loggingLevel="ERROR"
- message="PUT Dictionary request failed for: ${header.name}, ${exception.stacktrace}" />
- <setHeader headerName="CamelHttpResponseCode">
- <constant>500</constant>
- </setHeader>
- <setBody>
- <simple>PUT Dictionary FAILED</simple>
- </setBody>
- </doCatch>
- </doTry>
- </route>
- </put>
+ <route>
+ <removeHeaders pattern="*" excludePattern="name"/>
+ <doTry>
+ <to
+ uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Add New or Update Dictionary Element')"/>
+ <to
+ uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'tosca','','update')"/>
+ <setProperty propertyName="DictionaryObject">
+ <simple>${body}</simple>
+ </setProperty>
+ <to
+ uri="bean:org.onap.policy.clamp.tosca.DictionaryService?method=saveOrUpdateDictionaryElement(${header.name}, ${exchangeProperty[DictionaryObject]})"/>
+ <to
+ uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()"/>
+ <doCatch>
+ <exception>java.lang.Exception</exception>
+ <handled>
+ <constant>true</constant>
+ </handled>
+ <to
+ uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()"/>
+ <log loggingLevel="ERROR"
+ message="PUT Dictionary request failed for: ${header.name}, ${exception.stacktrace}"/>
+ <setHeader headerName="CamelHttpResponseCode">
+ <constant>500</constant>
+ </setHeader>
+ <setBody>
+ <simple>PUT Dictionary FAILED</simple>
+ </setBody>
+ </doCatch>
+ </doTry>
+ </route>
+ </put>
- <delete uri="/v2/dictionary/{name}" produces="application/json">
- <route>
- <removeHeaders pattern="*" excludePattern="name" />
- <doTry>
- <to
- uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Delete Dictionary')" />
- <to
- uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'tosca','','update')" />
- <to
- uri="bean:org.onap.policy.clamp.tosca.DictionaryService?method=deleteDictionary(${header.name})" />
- <to
- uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()" />
- <doCatch>
- <exception>java.lang.Exception</exception>
- <handled>
- <constant>true</constant>
- </handled>
- <to
- uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()" />
- <log loggingLevel="ERROR"
- message="DELETE Dictionary request failed for: ${header.name}, ${exception.stacktrace}" />
- <setHeader headerName="CamelHttpResponseCode">
- <constant>500</constant>
- </setHeader>
- <setBody>
- <simple>DELETE Dictionary FAILED</simple>
- </setBody>
- </doCatch>
- </doTry>
- </route>
- </delete>
+ <delete uri="/v2/dictionary/{name}" produces="application/json">
+ <route>
+ <removeHeaders pattern="*" excludePattern="name"/>
+ <doTry>
+ <to
+ uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Delete Dictionary')"/>
+ <to
+ uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'tosca','','update')"/>
+ <to
+ uri="bean:org.onap.policy.clamp.tosca.DictionaryService?method=deleteDictionary(${header.name})"/>
+ <to
+ uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()"/>
+ <doCatch>
+ <exception>java.lang.Exception</exception>
+ <handled>
+ <constant>true</constant>
+ </handled>
+ <to
+ uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()"/>
+ <log loggingLevel="ERROR"
+ message="DELETE Dictionary request failed for: ${header.name}, ${exception.stacktrace}"/>
+ <setHeader headerName="CamelHttpResponseCode">
+ <constant>500</constant>
+ </setHeader>
+ <setBody>
+ <simple>DELETE Dictionary FAILED</simple>
+ </setBody>
+ </doCatch>
+ </doTry>
+ </route>
+ </delete>
- <delete uri="/v2/dictionary/{name}/elements/{shortName}"
- produces="application/json">
- <route>
- <removeHeaders pattern="*"
- excludePattern="name|shortName" />
- <doTry>
- <to
- uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Delete Dictionary Element')" />
- <to
- uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'tosca','','update')" />
- <to
- uri="bean:org.onap.policy.clamp.tosca.DictionaryService?method=deleteDictionaryElement(${header.name}, ${header.shortName})" />
- <to
- uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()" />
- <doCatch>
- <exception>java.lang.Exception</exception>
- <handled>
- <constant>true</constant>
- </handled>
- <to
- uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()" />
- <log loggingLevel="ERROR"
- message="DELETE Dictionary element request failed for: ${header.name}, ${exception.stacktrace}" />
- <setHeader headerName="CamelHttpResponseCode">
- <constant>500</constant>
- </setHeader>
- <setBody>
- <simple>DELETE Dictionary element FAILED</simple>
- </setBody>
- </doCatch>
- </doTry>
- </route>
- </delete>
+ <delete uri="/v2/dictionary/{name}/elements/{shortName}"
+ produces="application/json">
+ <route>
+ <removeHeaders pattern="*"
+ excludePattern="name|shortName"/>
+ <doTry>
+ <to
+ uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Delete Dictionary Element')"/>
+ <to
+ uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'tosca','','update')"/>
+ <to
+ uri="bean:org.onap.policy.clamp.tosca.DictionaryService?method=deleteDictionaryElement(${header.name}, ${header.shortName})"/>
+ <to
+ uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()"/>
+ <doCatch>
+ <exception>java.lang.Exception</exception>
+ <handled>
+ <constant>true</constant>
+ </handled>
+ <to
+ uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()"/>
+ <log loggingLevel="ERROR"
+ message="DELETE Dictionary element request failed for: ${header.name}, ${exception.stacktrace}"/>
+ <setHeader headerName="CamelHttpResponseCode">
+ <constant>500</constant>
+ </setHeader>
+ <setBody>
+ <simple>DELETE Dictionary element FAILED</simple>
+ </setBody>
+ </doCatch>
+ </doTry>
+ </route>
+ </delete>
- <get uri="/v2/policyToscaModels"
- outType="org.onap.policy.clamp.loop.template.PolicyModel"
- produces="application/json">
- <route>
- <removeHeaders pattern="*" />
- <doTry>
- <to
- uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'GET ALL Tosca Policy Models')" />
- <to
- uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'tosca','','read')" />
- <to
- uri="bean:org.onap.policy.clamp.loop.template.PolicyModelsService?method=getAllPolicyModels()" />
- <to
- uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()" />
- <doCatch>
- <exception>java.lang.Exception</exception>
- <handled>
- <constant>true</constant>
- </handled>
- <to
- uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()" />
- <log loggingLevel="ERROR"
- message="GET Policy Models request failed for: ${exception.stacktrace}" />
- <setHeader headerName="CamelHttpResponseCode">
- <constant>500</constant>
- </setHeader>
- <setBody>
- <simple>GET Policy models FAILED</simple>
- </setBody>
- </doCatch>
- </doTry>
- </route>
- </get>
- <get uri="/v2/policyToscaModels/{policyModelType}/{policyModelVersion}"
- outType="org.onap.policy.clamp.loop.template.PolicyModel"
- produces="application/json">
- <route>
- <removeHeaders pattern="*"
- excludePattern="policyModelType|policyModelVersion" />
- <doTry>
- <to
- uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'GET Tosca Policy Model by Name/Version')" />
- <to
- uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'tosca','','read')" />
- <to
- uri="bean:org.onap.policy.clamp.loop.template.PolicyModelsService?method=getPolicyModelByType(${header.policyModelType},${header.policyModelVersion})" />
- <to
- uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()" />
- <doCatch>
- <exception>java.lang.Exception</exception>
- <handled>
- <constant>true</constant>
- </handled>
- <to
- uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()" />
- <log loggingLevel="ERROR"
- message="GET Policy Model request failed for type: ${header.policyModelType}, ${exception.stacktrace}" />
- <setHeader headerName="CamelHttpResponseCode">
- <constant>500</constant>
- </setHeader>
- <setBody>
- <simple>GET Policy model FAILED</simple>
- </setBody>
- </doCatch>
- </doTry>
- </route>
- </get>
- <get uri="/v2/policyToscaModels/yaml/{policyModelType}/{policyModelVersion}"
- outType="java.lang.String" produces="application/json">
- <route>
- <removeHeaders pattern="*"
- excludePattern="policyModelType|policyModelVersion" />
- <doTry>
- <to
- uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'GET Tosca Policy Model Yaml String by Name/Version')" />
- <to
- uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'tosca','','read')" />
- <to
- uri="bean:org.onap.policy.clamp.loop.template.PolicyModelsService?method=getPolicyModelTosca(${header.policyModelType},${header.policyModelVersion})" />
- <to
- uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()" />
- <doCatch>
- <exception>java.lang.Exception</exception>
- <handled>
- <constant>true</constant>
- </handled>
- <to
- uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()" />
- <log loggingLevel="ERROR"
- message="GET Policy Model YAML request failed for type: ${header.policyModelType}, ${exception.stacktrace}" />
- <setHeader headerName="CamelHttpResponseCode">
- <constant>500</constant>
- </setHeader>
- <setBody>
- <simple>GET Policy model YAML FAILED</simple>
- </setBody>
- </doCatch>
- </doTry>
- </route>
- </get>
+ <get uri="/v2/policyToscaModels"
+ outType="org.onap.policy.clamp.loop.template.PolicyModel"
+ produces="application/json">
+ <route>
+ <removeHeaders pattern="*"/>
+ <doTry>
+ <to
+ uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'GET ALL Tosca Policy Models')"/>
+ <to
+ uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'tosca','','read')"/>
+ <to
+ uri="bean:org.onap.policy.clamp.loop.template.PolicyModelsService?method=getAllPolicyModels()"/>
+ <to
+ uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()"/>
+ <doCatch>
+ <exception>java.lang.Exception</exception>
+ <handled>
+ <constant>true</constant>
+ </handled>
+ <to
+ uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()"/>
+ <log loggingLevel="ERROR"
+ message="GET Policy Models request failed for: ${exception.stacktrace}"/>
+ <setHeader headerName="CamelHttpResponseCode">
+ <constant>500</constant>
+ </setHeader>
+ <setBody>
+ <simple>GET Policy models FAILED</simple>
+ </setBody>
+ </doCatch>
+ </doTry>
+ </route>
+ </get>
+ <get uri="/v2/policyToscaModels/{policyModelType}/{policyModelVersion}"
+ outType="org.onap.policy.clamp.loop.template.PolicyModel"
+ produces="application/json">
+ <route>
+ <removeHeaders pattern="*"
+ excludePattern="policyModelType|policyModelVersion"/>
+ <doTry>
+ <to
+ uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'GET Tosca Policy Model by Name/Version')"/>
+ <to
+ uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'tosca','','read')"/>
+ <to
+ uri="bean:org.onap.policy.clamp.loop.template.PolicyModelsService?method=getPolicyModelByType(${header.policyModelType},${header.policyModelVersion})"/>
+ <to
+ uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()"/>
+ <doCatch>
+ <exception>java.lang.Exception</exception>
+ <handled>
+ <constant>true</constant>
+ </handled>
+ <to
+ uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()"/>
+ <log loggingLevel="ERROR"
+ message="GET Policy Model request failed for type: ${header.policyModelType}, ${exception.stacktrace}"/>
+ <setHeader headerName="CamelHttpResponseCode">
+ <constant>500</constant>
+ </setHeader>
+ <setBody>
+ <simple>GET Policy model FAILED</simple>
+ </setBody>
+ </doCatch>
+ </doTry>
+ </route>
+ </get>
+ <get uri="/v2/policyToscaModels/yaml/{policyModelType}/{policyModelVersion}"
+ outType="java.lang.String" produces="application/json">
+ <route>
+ <removeHeaders pattern="*"
+ excludePattern="policyModelType|policyModelVersion"/>
+ <doTry>
+ <to
+ uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'GET Tosca Policy Model Yaml String by Name/Version')"/>
+ <to
+ uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'tosca','','read')"/>
+ <to
+ uri="bean:org.onap.policy.clamp.loop.template.PolicyModelsService?method=getPolicyModelTosca(${header.policyModelType},${header.policyModelVersion})"/>
+ <to
+ uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()"/>
+ <doCatch>
+ <exception>java.lang.Exception</exception>
+ <handled>
+ <constant>true</constant>
+ </handled>
+ <to
+ uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()"/>
+ <log loggingLevel="ERROR"
+ message="GET Policy Model YAML request failed for type: ${header.policyModelType}, ${exception.stacktrace}"/>
+ <setHeader headerName="CamelHttpResponseCode">
+ <constant>500</constant>
+ </setHeader>
+ <setBody>
+ <simple>GET Policy model YAML FAILED</simple>
+ </setBody>
+ </doCatch>
+ </doTry>
+ </route>
+ </get>
+
+ <post uri="/v2/policyToscaModels"
+ type="java.lang.String"
+ outType="org.onap.policy.clamp.loop.template.PolicyModel"
+ consumes="plain/text" produces="application/json">
+ <route>
+ <removeHeaders pattern="*"/>
+ <doTry>
+ <to
+ uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Upload New or Update Tosca Policy Model')"/>
+ <to
+ uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'tosca','','update')"/>
+ <setProperty propertyName="PolicyModelTosca">
+ <simple>${body}</simple>
+ </setProperty>
+ <to
+ uri="bean:org.onap.policy.clamp.loop.template.PolicyModelsService?method=createNewPolicyModelFromTosca(${exchangeProperty[PolicyModelTosca]})"/>
+ <to
+ uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()"/>
+ <doCatch>
+ <exception>java.lang.Exception</exception>
+ <handled>
+ <constant>true</constant>
+ </handled>
+ <to
+ uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()"/>
+ <log loggingLevel="ERROR"
+ message="POST Policy Model YAML request failed: ${exception.stacktrace}"/>
+ <setHeader headerName="CamelHttpResponseCode">
+ <constant>500</constant>
+ </setHeader>
+ <setBody>
+ <simple>POST Policy model YAML FAILED</simple>
+ </setBody>
+ </doCatch>
+ </doTry>
+ </route>
+ </post>
+ <put uri="/v2/policyToscaModels/{policyModelType}/{policyModelVersion}"
+ type="java.lang.String"
+ outType="org.onap.policy.clamp.loop.template.PolicyModel"
+ consumes="plain/text" produces="application/json">
+ <route>
+ <removeHeaders pattern="*"
+ excludePattern="policyModelType|policyModelVersion"/>
+ <doTry>
+ <to
+ uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Upload New or Update Tosca Policy Model')"/>
+ <to
+ uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'tosca','','update')"/>
+ <setProperty propertyName="PolicyModelTosca">
+ <simple>${body}</simple>
+ </setProperty>
+ <to
+ uri="bean:org.onap.policy.clamp.loop.template.PolicyModelsService?method=updatePolicyModelTosca(${header.policyModelType},${policyModelVersion},${exchangeProperty[PolicyModelTosca]})"/>
+ <to
+ uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()"/>
+ <doCatch>
+ <exception>java.lang.Exception</exception>
+ <handled>
+ <constant>true</constant>
+ </handled>
+ <to
+ uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()"/>
+ <log loggingLevel="ERROR"
+ message="MODIFY Policy Model YAML request failed: ${exception.stacktrace}"/>
+ <setHeader headerName="CamelHttpResponseCode">
+ <constant>500</constant>
+ </setHeader>
+ <setBody>
+ <simple>MODIFY Policy model YAML FAILED</simple>
+ </setBody>
+ </doCatch>
+ </doTry>
+ </route>
+ </put>
- <post uri="/v2/policyToscaModels"
- type="java.lang.String"
- outType="org.onap.policy.clamp.loop.template.PolicyModel"
- consumes="plain/text" produces="application/json">
- <route>
- <removeHeaders pattern="*"/>
- <doTry>
- <to
- uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Upload New or Update Tosca Policy Model')" />
- <to
- uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'tosca','','update')" />
- <setProperty propertyName="PolicyModelTosca">
- <simple>${body}</simple>
- </setProperty>
- <to
- uri="bean:org.onap.policy.clamp.loop.template.PolicyModelsService?method=createNewPolicyModelFromTosca(${exchangeProperty[PolicyModelTosca]})" />
- <to
- uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()" />
- <doCatch>
- <exception>java.lang.Exception</exception>
- <handled>
- <constant>true</constant>
- </handled>
- <to
- uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()" />
- <log loggingLevel="ERROR"
- message="POST Policy Model YAML request failed: ${exception.stacktrace}" />
- <setHeader headerName="CamelHttpResponseCode">
- <constant>500</constant>
- </setHeader>
- <setBody>
- <simple>POST Policy model YAML FAILED</simple>
- </setBody>
- </doCatch>
- </doTry>
- </route>
- </post>
- <put uri="/v2/policyToscaModels/{policyModelType}/{policyModelVersion}"
- type="java.lang.String"
- outType="org.onap.policy.clamp.loop.template.PolicyModel"
- consumes="plain/text" produces="application/json">
- <route>
- <removeHeaders pattern="*"
- excludePattern="policyModelType|policyModelVersion" />
- <doTry>
- <to
- uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Upload New or Update Tosca Policy Model')" />
- <to
- uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'tosca','','update')" />
- <setProperty propertyName="PolicyModelTosca">
- <simple>${body}</simple>
- </setProperty>
- <to
- uri="bean:org.onap.policy.clamp.loop.template.PolicyModelsService?method=updatePolicyModelTosca(${header.policyModelType},${policyModelVersion},${exchangeProperty[PolicyModelTosca]})" />
- <to
- uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()" />
- <doCatch>
- <exception>java.lang.Exception</exception>
- <handled>
- <constant>true</constant>
- </handled>
- <to
- uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()" />
- <log loggingLevel="ERROR"
- message="MODIFY Policy Model YAML request failed: ${exception.stacktrace}" />
- <setHeader headerName="CamelHttpResponseCode">
- <constant>500</constant>
- </setHeader>
- <setBody>
- <simple>MODIFY Policy model YAML FAILED</simple>
- </setBody>
- </doCatch>
- </doTry>
- </route>
- </put>
+ <get uri="/v2/templates"
+ outType="org.onap.policy.clamp.loop.template.LoopTemplate"
+ produces="application/json">
+ <route>
+ <removeHeaders pattern="*"/>
+ <doTry>
+ <to
+ uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'GET ALL Templates')"/>
+ <to
+ uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'template','','read')"/>
+ <to
+ uri="bean:org.onap.policy.clamp.loop.template.LoopTemplatesService?method=getAllLoopTemplates()"/>
+ <to
+ uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()"/>
+ <doCatch>
+ <exception>java.lang.Exception</exception>
+ <handled>
+ <constant>true</constant>
+ </handled>
+ <to
+ uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()"/>
+ <log loggingLevel="ERROR"
+ message="GET ALL templates request failed: ${exception.stacktrace}"/>
+ <setHeader headerName="CamelHttpResponseCode">
+ <constant>500</constant>
+ </setHeader>
+ <setBody>
+ <simple>GET ALL templates FAILED</simple>
+ </setBody>
+ </doCatch>
+ </doTry>
+ </route>
+ </get>
+ <get uri="/v2/templates/{templateName}"
+ outType="org.onap.policy.clamp.loop.template.LoopTemplate"
+ produces="application/json">
+ <route>
+ <removeHeaders pattern="*"
+ excludePattern="templateName"/>
+ <doTry>
+ <to
+ uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'GET a Template by NAME')"/>
+ <to
+ uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'template','','read')"/>
+ <to
+ uri="bean:org.onap.policy.clamp.loop.template.LoopTemplatesService?method=getLoopTemplate(${header.templateName})"/>
+ <to
+ uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()"/>
+ <doCatch>
+ <exception>java.lang.Exception</exception>
+ <handled>
+ <constant>true</constant>
+ </handled>
+ <to
+ uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()"/>
+ <log loggingLevel="ERROR"
+ message="GET Template request failed for template: ${header.templateName}, ${exception.stacktrace}"/>
+ <setHeader headerName="CamelHttpResponseCode">
+ <constant>500</constant>
+ </setHeader>
+ <setBody>
+ <simple>GET Template FAILED</simple>
+ </setBody>
+ </doCatch>
+ </doTry>
+ </route>
+ </get>
+ <get uri="/v2/templates/names" outType="java.lang.String[]"
+ produces="application/json">
+ <route>
+ <removeHeaders pattern="*"/>
+ <doTry>
+ <to
+ uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'GET ALL Loop Template Names')"/>
+ <to
+ uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'template','','read')"/>
+ <to
+ uri="bean:org.onap.policy.clamp.loop.template.LoopTemplatesService?method=getLoopTemplateNames()"/>
+ <to
+ uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()"/>
+ <doCatch>
+ <exception>java.lang.Exception</exception>
+ <handled>
+ <constant>true</constant>
+ </handled>
+ <to
+ uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()"/>
+ <log loggingLevel="ERROR"
+ message="GET All Template names request failed for template: ${exception.stacktrace}"/>
+ <setHeader headerName="CamelHttpResponseCode">
+ <constant>500</constant>
+ </setHeader>
+ <setBody>
+ <simple>GET All Template names FAILED</simple>
+ </setBody>
+ </doCatch>
+ </doTry>
+ </route>
+ </get>
+ <get uri="/v2/policies/list" outType="java.lang.String" produces="application/json">
+ <route>
+ <removeHeaders pattern="*"/>
+ <doTry>
+ <to
+ uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'GET Policies List ')"/>
+ <to
+ uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'policies','','read')"/>
- <get uri="/v2/templates"
- outType="org.onap.policy.clamp.loop.template.LoopTemplate"
- produces="application/json">
- <route>
- <removeHeaders pattern="*" />
- <doTry>
- <to
- uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'GET ALL Templates')" />
- <to
- uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'template','','read')" />
- <to
- uri="bean:org.onap.policy.clamp.loop.template.LoopTemplatesService?method=getAllLoopTemplates()" />
- <to
- uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()" />
- <doCatch>
- <exception>java.lang.Exception</exception>
- <handled>
- <constant>true</constant>
- </handled>
- <to
- uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()" />
- <log loggingLevel="ERROR"
- message="GET ALL templates request failed: ${exception.stacktrace}" />
- <setHeader headerName="CamelHttpResponseCode">
- <constant>500</constant>
- </setHeader>
- <setBody>
- <simple>GET ALL templates FAILED</simple>
- </setBody>
- </doCatch>
- </doTry>
- </route>
- </get>
- <get uri="/v2/templates/{templateName}"
- outType="org.onap.policy.clamp.loop.template.LoopTemplate"
- produces="application/json">
- <route>
- <removeHeaders pattern="*"
- excludePattern="templateName" />
- <doTry>
- <to
- uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'GET a Template by NAME')" />
- <to
- uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'template','','read')" />
- <to
- uri="bean:org.onap.policy.clamp.loop.template.LoopTemplatesService?method=getLoopTemplate(${header.templateName})" />
- <to
- uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()" />
- <doCatch>
- <exception>java.lang.Exception</exception>
- <handled>
- <constant>true</constant>
- </handled>
- <to
- uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()" />
- <log loggingLevel="ERROR"
- message="GET Template request failed for template: ${header.templateName}, ${exception.stacktrace}" />
- <setHeader headerName="CamelHttpResponseCode">
- <constant>500</constant>
- </setHeader>
- <setBody>
- <simple>GET Template FAILED</simple>
- </setBody>
- </doCatch>
- </doTry>
- </route>
- </get>
- <get uri="/v2/templates/names" outType="java.lang.String[]"
- produces="application/json">
- <route>
- <removeHeaders pattern="*" />
- <doTry>
- <to
- uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'GET ALL Loop Template Names')" />
- <to
- uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'template','','read')" />
- <to
- uri="bean:org.onap.policy.clamp.loop.template.LoopTemplatesService?method=getLoopTemplateNames()" />
- <to
- uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()" />
- <doCatch>
- <exception>java.lang.Exception</exception>
- <handled>
- <constant>true</constant>
- </handled>
- <to
- uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()" />
- <log loggingLevel="ERROR"
- message="GET All Template names request failed for template: ${exception.stacktrace}" />
- <setHeader headerName="CamelHttpResponseCode">
- <constant>500</constant>
- </setHeader>
- <setBody>
- <simple>GET All Template names FAILED</simple>
- </setBody>
- </doCatch>
- </doTry>
- </route>
- </get>
- <get uri="/v2/clampInformation" outType="org.onap.policy.clamp.clds.model.ClampInformation"
- produces="application/json">
- <to
- uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=getClampInformation()" />
- </get>
- </rest>
+ <to uri="direct:get-all-policies"/>
+ <setProperty propertyName="policiesListResponse">
+ <simple>${body}</simple>
+ </setProperty>
+ <to uri="direct:get-all-pdp-groups"/>
+ <setProperty propertyName="pdpGroupInfoResponse">
+ <simple>${body}</simple>
+ </setProperty>
+ <setBody>
+ <method ref="org.onap.policy.clamp.policy.pdpgroup.PoliciesPdpMerger"
+ method="mergePoliciesAndPdpGroupStates(${exchangeProperty[policiesListResponse]},${exchangeProperty[pdpGroupInfoResponse]})"/>
+ </setBody>
+ <to
+ uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()"/>
+ <doCatch>
+ <exception>java.lang.Exception</exception>
+ <handled>
+ <constant>true</constant>
+ </handled>
+ <to
+ uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()"/>
+ <log loggingLevel="ERROR"
+ message="GET Policy Model YAML request failed for type: ${header.policyModelType}, ${exception.stacktrace}"/>
+ <setHeader headerName="CamelHttpResponseCode">
+ <constant>500</constant>
+ </setHeader>
+ <setBody>
+ <simple>GET Policy model YAML FAILED</simple>
+ </setBody>
+ </doCatch>
+ </doTry>
+ </route>
+ </get>
+ <get uri="/v2/clampInformation" outType="org.onap.policy.clamp.clds.model.ClampInformation"
+ produces="application/json">
+ <to
+ uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=getClampInformation()"/>
+ </get>
+ </rest>
</rests>
diff --git a/src/main/resources/clds/clds-users.json b/src/main/resources/clds/clds-users.json
index fe305980b..5a7f43841 100644
--- a/src/main/resources/clds/clds-users.json
+++ b/src/main/resources/clds/clds-users.json
@@ -1,32 +1,33 @@
- [{
- "user":"admin",
- "password":"$2a$10$H/e21kl04Dw9C978CHuM7OewyMGUN5WGzAAx7SgIaR4ix8.wTcssi",
- "permissions":
- [
- "org.onap.clamp.clds.cl|dev|read",
- "org.onap.clamp.clds.cl|dev|update",
- "org.onap.clamp.clds.cl.manage|dev|*",
- "org.onap.clamp.clds.cl.event|dev|*",
- "org.onap.clamp.clds.filter.vf|dev|*",
- "org.onap.clamp.clds.template|dev|read",
- "org.onap.clamp.clds.template|dev|update",
- "org.onap.clamp.clds.tosca|dev|read",
- "org.onap.clamp.clds.tosca|dev|update"
- ]
- },
- {
- "user":"cs0008",
- "password":"$2a$10$H/e21kl04Dw9C978CHuM7OewyMGUN5WGzAAx7SgIaR4ix8.wTcssi",
- "permissions":
- [
- "org.onap.clamp.clds.cl|dev|read",
- "org.onap.clamp.clds.cl|dev|update",
- "org.onap.clamp.clds.cl.manage|dev|*",
- "org.onap.clamp.clds.filter.vf|dev|*",
- "org.onap.clamp.clds.template|dev|read",
- "org.onap.clamp.clds.template|dev|update",
- "org.onap.clamp.clds.tosca|dev|read",
- "org.onap.clamp.clds.tosca|dev|update"
- ]
- }
+[
+ {
+ "user": "admin",
+ "password": "$2a$10$H/e21kl04Dw9C978CHuM7OewyMGUN5WGzAAx7SgIaR4ix8.wTcssi",
+ "permissions": [
+ "org.onap.clamp.clds.cl|dev|read",
+ "org.onap.clamp.clds.cl|dev|update",
+ "org.onap.clamp.clds.cl.manage|dev|*",
+ "org.onap.clamp.clds.cl.event|dev|*",
+ "org.onap.clamp.clds.filter.vf|dev|*",
+ "org.onap.clamp.clds.template|dev|read",
+ "org.onap.clamp.clds.template|dev|update",
+ "org.onap.clamp.clds.tosca|dev|read",
+ "org.onap.clamp.clds.tosca|dev|update",
+ "org.onap.clamp.clds.policies|dev|read",
+ "org.onap.clamp.clds.policies|dev|update"
+ ]
+ },
+ {
+ "user": "cs0008",
+ "password": "$2a$10$H/e21kl04Dw9C978CHuM7OewyMGUN5WGzAAx7SgIaR4ix8.wTcssi",
+ "permissions": [
+ "org.onap.clamp.clds.cl|dev|read",
+ "org.onap.clamp.clds.cl|dev|update",
+ "org.onap.clamp.clds.cl.manage|dev|*",
+ "org.onap.clamp.clds.filter.vf|dev|*",
+ "org.onap.clamp.clds.template|dev|read",
+ "org.onap.clamp.clds.template|dev|update",
+ "org.onap.clamp.clds.tosca|dev|read",
+ "org.onap.clamp.clds.tosca|dev|update"
+ ]
+ }
]