diff options
Diffstat (limited to 'controlloop/templates/template.demo.clc/src/main')
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> |