diff options
author | 2017-09-06 11:03:15 -0400 | |
---|---|---|
committer | 2017-09-06 19:17:34 -0400 | |
commit | 79a537071550d5ae0df0c58572ff2b5aa3065c72 (patch) | |
tree | 75d0cc1e0e0a0c0fdc09c1a6e932f8f72d9c106b /platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_policy-manager-create-policy.xml | |
parent | 98ddb133dec262b727b93eab40f384b88fed864a (diff) |
Add generic-resource-api DG seed code
Add seed code for generic-resource-api directed graphs.
Change-Id: I51df937740d54d6f907c79fe322e4ffafe53537c
Issue-ID: SDNC-45
Signed-off-by: Dan Timoney <dtimoney@att.com>
Former-commit-id: b014b942536d93f55664b67a36436168e623bcec
Diffstat (limited to 'platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_policy-manager-create-policy.xml')
-rwxr-xr-x | platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_policy-manager-create-policy.xml | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_policy-manager-create-policy.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_policy-manager-create-policy.xml new file mode 100755 index 00000000..50b71864 --- /dev/null +++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_policy-manager-create-policy.xml @@ -0,0 +1,31 @@ +<service-logic xmlns='http://www.onap.org/sdnc/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.onap.org/sdnc/svclogic ./svclogic.xsd' module='GENERIC-RESOURCE-API' version='${project.version}'><method rpc='policy-manager-create-policy' mode='sync'>
+<block atomic="true"><execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name='templateFileName' value="`$prop.restapi.templateDir + '/' + $prop.restapi.pm.createpolicy.templatefile`" />
+ <parameter name='restapiUrl' value="`$prop.policy-manager.url + '/pdp/api/createPolicy'`" />
+ <parameter name='format' value='json' />
+ <parameter name='httpMethod' value='PUT' />
+ <parameter name='convertResponse' value="false" />
+ <parameter name='customHttpHeaders'
+ value="`'Authorization=Basic ' + $prop.policy-manager.authorization + ',ClientAuth=Basic ' + $prop.policy-manager.clientauth + ',Environment=' + $prop.policy-manager.environment `" />
+<outcome value='success'>
+<block atomic="true">
+<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name='templateFileName' value="`$prop.restapi.templateDir + '/' + $prop.restapi.pm.pushpolicy.templatefile`" />
+ <parameter name='restapiUrl' value="`$prop.policy-manager.url + '/pdp/api/pushPolicy'`" />
+ <parameter name='format' value='json' />
+ <parameter name='httpMethod' value='PUT' />
+ <parameter name='convertResponse' value="false" />
+ <parameter name='customHttpHeaders'
+ value="`'Authorization=Basic ' + $prop.policy-manager.authorization + ',ClientAuth=Basic ' + $prop.policy-manager.clientauth + ',Environment=' + $prop.policy-manager.environment `" />
+<outcome value='success'>
+<block atomic="true">
+</block></outcome><outcome value='Other'>
+<return status='failure'>
+<parameter name='error-code' value='500' />
+<parameter name='error-message' value='Failed to push policy in Policy Manager' />
+</return></outcome></execute></block></outcome><outcome value='Other'>
+<return status='failure'>
+<parameter name='error-code' value='500' />
+<parameter name='error-message' value='Failed to create policy in Policy Manager' />
+</return></outcome></execute><return status='success'>
+</return></block></method></service-logic> |