bump poms to 2.1.4-SNAPSHOT
[policy/xacml-pdp.git] / applications / guard / src / main / resources / coordination / function / onap.policies.controlloop.guard.coordination.FirstBlocksSecond.xml
1 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2 <!--
3   ============LICENSE_START=======================================================
4   drools-applications
5   ================================================================================
6   Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
7   ================================================================================
8   Licensed under the Apache License, Version 2.0 (the "License");
9   you may not use this file except in compliance with the License.
10   You may obtain a copy of the License at
11
12        http://www.apache.org/licenses/LICENSE-2.0
13
14   Unless required by applicable law or agreed to in writing, software
15   distributed under the License is distributed on an "AS IS" BASIS,
16   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17   See the License for the specific language governing permissions and
18   limitations under the License.
19   ============LICENSE_END=========================================================
20   -->
21
22 <Policy xmlns="urn:oasis:names:tc:xacml:3.0:core:schema:wd-17"
23     PolicyId="UNIQUE_ID" Version="1"
24     RuleCombiningAlgId="urn:oasis:names:tc:xacml:3.0:rule-combining-algorithm:permit-unless-deny">
25     <Description>Policy for first_blocks_second coordination (if first
26         running and second requests to run, deny second).</Description>
27     <Target>
28         <AnyOf>
29             <AllOf>
30                 <Match
31                     MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal">
32                     <AttributeValue
33                         DataType="http://www.w3.org/2001/XMLSchema#string">CONTROL_LOOP_TWO</AttributeValue>
34                     <AttributeDesignator
35                         Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource"
36                         AttributeId="urn:org:onap:guard:clname:clname-id"
37                         DataType="http://www.w3.org/2001/XMLSchema#string"
38                         MustBePresent="false" />
39                 </Match>
40             </AllOf>
41         </AnyOf>
42     </Target>
43
44     <Rule RuleId="UNIQUE_ID:rule:1" Effect="Deny">
45         <Description>First Is Running</Description>
46         <Condition>
47             <Apply
48                 FunctionId="urn:oasis:names:tc:xacml:3.0:function:string-equal-ignore-case">
49                 <Apply
50                     FunctionId="urn:oasis:names:tc:xacml:1.0:function:string-one-and-only">
51                     <AttributeDesignator
52                         Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource"
53                         AttributeId="urn:org:onap:guard:operation:operation-outcome"
54                         DataType="http://www.w3.org/2001/XMLSchema#string"
55                         Issuer="urn:org:onap:xacml:guard:get-operation-outcome:clname:CONTROL_LOOP_ONE"
56                         MustBePresent="false" />
57                 </Apply>
58                 <AttributeValue
59                     DataType="http://www.w3.org/2001/XMLSchema#string">Success</AttributeValue>
60             </Apply>
61         </Condition>
62     </Rule>
63 </Policy>