aboutsummaryrefslogtreecommitdiffstats
path: root/controlloop/templates/template.demo.clc/src/main
diff options
context:
space:
mode:
authorJoshua Reich <jreich@research.att.com>2019-04-10 13:38:59 -0700
committerPamela Dragosh <pdragosh@research.att.com>2019-04-11 07:28:52 -0400
commita7a144ba512654bd93b0856b1e9eb5c886060c21 (patch)
tree808acb95b4608c9e7e4e4501f4c4111e9563fa18 /controlloop/templates/template.demo.clc/src/main
parent92fc7744a4df901d1688b9fa8da899372ea76fd8 (diff)
Cleanup PIP/Database-related code.
Ensure database schema/naming consistent across repos. Ensure PIP implementation consistent across repos. Cleanup unused imports and made sure licenses are ok. Issue-ID: POLICY-1471 Change-Id: I20a325fe3e66e6ae400e603ec366315aea716993 Signed-off-by: Joshua Reich <jreich@research.att.com> Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
Diffstat (limited to 'controlloop/templates/template.demo.clc/src/main')
-rw-r--r--controlloop/templates/template.demo.clc/src/main/java/org/onap/policy/guard/PolicyGuardXacmlHelperEmbedded.java5
-rw-r--r--controlloop/templates/template.demo.clc/src/main/resources/coordination/prototype/firstBlocksSecond.xml14
2 files changed, 12 insertions, 7 deletions
diff --git a/controlloop/templates/template.demo.clc/src/main/java/org/onap/policy/guard/PolicyGuardXacmlHelperEmbedded.java b/controlloop/templates/template.demo.clc/src/main/java/org/onap/policy/guard/PolicyGuardXacmlHelperEmbedded.java
index d51a862db..e0cd2c9c4 100644
--- a/controlloop/templates/template.demo.clc/src/main/java/org/onap/policy/guard/PolicyGuardXacmlHelperEmbedded.java
+++ b/controlloop/templates/template.demo.clc/src/main/java/org/onap/policy/guard/PolicyGuardXacmlHelperEmbedded.java
@@ -51,6 +51,7 @@ import org.json.JSONObject;
import org.onap.policy.common.endpoints.event.comm.Topic.CommInfrastructure;
import org.onap.policy.common.endpoints.utils.NetLoggerUtil;
import org.onap.policy.common.endpoints.utils.NetLoggerUtil.EventType;
+import org.onap.policy.database.operationshistory.Dbao;
import org.onap.policy.drools.system.PolicyEngine;
import org.onap.policy.guard.PolicyGuardResponse;
import org.onap.policy.guard.PolicyGuardXacmlRequestAttributes;
@@ -311,11 +312,11 @@ public class PolicyGuardXacmlHelperEmbedded {
while (itAttr.hasNext()) {
Attribute currentAttr = itAttr.next();
String attributeId = currentAttr.getAttributeId().stringValue();
- if ("urn:oasis:names:tc:xacml:1.0:request:request-id".equals(attributeId)) {
+ if ("urn:org:onap:guard:request:request-id".equals(attributeId)) {
Iterator<AttributeValue<?>> itValues = currentAttr.getValues().iterator();
reqIdFromXacmlResponse = UUID.fromString(itValues.next().getValue().toString());
}
- if ("urn:oasis:names:tc:xacml:1.0:operation:operation-id".equals(attributeId)) {
+ if ("urn:org:onap:guard:operation:operation-id".equals(attributeId)) {
Iterator<AttributeValue<?>> itValues = currentAttr.getValues().iterator();
operationFromXacmlResponse = itValues.next().getValue().toString();
}
diff --git a/controlloop/templates/template.demo.clc/src/main/resources/coordination/prototype/firstBlocksSecond.xml b/controlloop/templates/template.demo.clc/src/main/resources/coordination/prototype/firstBlocksSecond.xml
index 54cda9575..0610ba9fc 100644
--- a/controlloop/templates/template.demo.clc/src/main/resources/coordination/prototype/firstBlocksSecond.xml
+++ b/controlloop/templates/template.demo.clc/src/main/resources/coordination/prototype/firstBlocksSecond.xml
@@ -22,9 +22,9 @@
<!--
# PIP Engine Definition
#
-xacml.pip.engines=getstatus
-getstatus.classname=org.onap.policy.guard.PipEngineGetStatus
-getstatus.issuer=org:onap:policy:guard:getstatus
+xacml.pip.engines=get-operation-outcome
+get-operation-outcome.classname=org.onap.policy.database.operationshistory.GetOperationOutcomePip
+get-operation-outcome.issuer=urn:org:onap:xacml:guard:get-operation-outcome"
-->
<Policy xmlns="urn:oasis:names:tc:xacml:3.0:core:schema:wd-17" PolicyId="urn:com:att:xacml:policy:id:son:guard:UNIQUE_ID" Version="1" RuleCombiningAlgId="urn:oasis:names:tc:xacml:3.0:rule-combining-algorithm:permit-unless-deny">
@@ -35,7 +35,7 @@ getstatus.issuer=org:onap:policy:guard:getstatus
<Match MatchId="urn:oasis:names:tc:xacml:1.0:function:string-regexp-match">
<!-- value to be autofilled by yaml from a xacml template -->
<AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">CONTROL_LOOP_TWO</AttributeValue>
- <AttributeDesignator Category="urn:oasis:names:tc:xacml:1.0:subject-category:access-subject" AttributeId="urn:oasis:names:tc:xacml:1.0:clname:clname-id" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
+ <AttributeDesignator Category="urn:oasis:names:tc:xacml:1.0:subject-category:access-subject" AttributeId="urn:org:onap:guard:clname:clname-id" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
</Match>
</AllOf>
</AnyOf>
@@ -54,7 +54,11 @@ getstatus.issuer=org:onap:policy:guard:getstatus
<VariableDefinition VariableId="clc_status">
<Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:string-one-and-only">
<!-- to be autofilled by yaml from a xacml template -->
- <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="com:att:research:xacml:test:sql:resource:operations:status" DataType="http://www.w3.org/2001/XMLSchema#string" Issuer="org:onap:policy:guard:getstatus:clname:CONTROL_LOOP_ONE" MustBePresent="false"/>
+ <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource"
+ AttributeId="urn:org:onap:guard:operation:operation-outcome"
+ DataType="http://www.w3.org/2001/XMLSchema#string"
+ Issuer="urn:org:onap:xacml:guard:get-operation-outcome:clname:CONTROL_LOOP_ONE"
+ MustBePresent="false"/>
</Apply>
</VariableDefinition>
</Policy>