aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/resources
diff options
context:
space:
mode:
authorxg353y <xg353y@intl.att.com>2019-03-28 10:05:25 +0100
committerxg353y <xg353y@intl.att.com>2019-03-28 10:05:25 +0100
commita6d09fbe1046057b72247f97ac72a521949409ce (patch)
tree8542f7b7f3afb888bc6c76189b265716be64c83d /src/main/resources
parentc62d1b74275b8d5e9d4cef6c308ef16440cfa500 (diff)
Rework the submit operation
Rework the logic to create/delete ms config policies. Issue-ID: CLAMP-303 Change-Id: I317e262ab68280a7518a6e31e82e5fcb0a7f94ed Signed-off-by: xg353y <xg353y@intl.att.com>
Diffstat (limited to 'src/main/resources')
-rw-r--r--src/main/resources/META-INF/resources/designer/scripts/CldsModelService.js2
-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.xml18
4 files changed, 25 insertions, 1 deletions
diff --git a/src/main/resources/META-INF/resources/designer/scripts/CldsModelService.js b/src/main/resources/META-INF/resources/designer/scripts/CldsModelService.js
index a71e6caa6..90cdc0d78 100644
--- a/src/main/resources/META-INF/resources/designer/scripts/CldsModelService.js
+++ b/src/main/resources/META-INF/resources/designer/scripts/CldsModelService.js
@@ -96,7 +96,7 @@ app
var def = $q.defer();
var sets = [];
var svcAction = uiAction.toLowerCase();
- var svcUrl = "/restservices/clds/v2/loop/" + "action/" + svcAction + "/" + modelName;
+ var svcUrl = "/restservices/clds/v2/loop/" + svcAction + "/" + modelName;
$http.put(svcUrl).success(
function(data) {
diff --git a/src/main/resources/application-noaaf.properties b/src/main/resources/application-noaaf.properties
index 632856e92..f54cbe096 100644
--- a/src/main/resources/application-noaaf.properties
+++ b/src/main/resources/application-noaaf.properties
@@ -135,6 +135,9 @@ clamp.config.dcae.deployment.template=classpath:/clds/templates/dcae-deployment-
#
#
# Configuration Settings for Policy Engine Components
+clamp.config.policy.url=http://localhost:8085/
+clamp.config.policy.userName=test
+clamp.config.policy.password=test
clamp.config.policy.pdpUrl1=http://policy.api.simpledemo.onap.org:8081/pdp/ , testpdp, alpha123
clamp.config.policy.pdpUrl2=http://policy.api.simpledemo.onap.org:8081/pdp/ , testpdp, alpha123
clamp.config.policy.papUrl=http://policy.api.simpledemo.onap.org:8081/pap/ , testpap, alpha123
diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties
index 91c02ef74..5b47d32de 100644
--- a/src/main/resources/application.properties
+++ b/src/main/resources/application.properties
@@ -150,6 +150,9 @@ clamp.config.dcae.deployment.template=classpath:/clds/templates/dcae-deployment-
#
#
# Configuration Settings for Policy Engine Components
+clamp.config.policy.url=http://policy.api.simpledemo.onap.org:8081/pdp/
+clamp.config.policy.userName=test
+clamp.config.policy.password=test
clamp.config.policy.pdpUrl1=http://policy.api.simpledemo.onap.org:8081/pdp/ , testpdp, alpha123
clamp.config.policy.pdpUrl2=http://policy.api.simpledemo.onap.org:8081/pdp/ , testpdp, alpha123
clamp.config.policy.papUrl=http://policy.api.simpledemo.onap.org:8081/pap/ , testpap, alpha123
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 c5828b284..f339d5d70 100644
--- a/src/main/resources/clds/camel/rest/clamp-api-v2.xml
+++ b/src/main/resources/clds/camel/rest/clamp-api-v2.xml
@@ -71,6 +71,24 @@
<to uri="bean:org.onap.clamp.operation.LoopOperation?method=unDeployLoop(${header.loopName})" />
</route>
</put>
+ <put uri="/v2/loop/submit/{loopName}">
+ <route>
+ <to uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" />
+ <to uri="bean:org.onap.clamp.operation.LoopOperation?method=submitMsPolicies(${header.loopName})" />
+ <!-- <to uri="bean:org.onap.clamp.operation.LoopOperation?method=submitOpPolicy(${header.loopName})" />-->
+ <!--<to uri="bean:org.onap.clamp.operation.LoopOperation?method=submitGuardPolicy(${header.loopName})" /> -->
+ </route>
+ </put>
+ <put uri="/v2/loop/delete/{loopName}"
+ outType="org.onap.clamp.loop.Loop"
+ produces="application/json">
+ <route>
+ <to uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" />
+ <to uri="bean:org.onap.clamp.operation.LoopOperation?method=deleteMsPolicies(${header.loopName})" />
+ <to uri="bean:org.onap.clamp.operation.LoopOperation?method=deleteOpPolicy(${header.loopName})" />
+ <to uri="bean:org.onap.clamp.operation.LoopOperation?method=deleteGuardPolicy(${header.loopName})" />
+ </route>
+ </put>
</rest>
</rests>