-
Story
-
Resolution: Won't Do
-
Low
-
None
we are looking for ways to retrieve a subset of monitoring policies of same PolicyType(derived from onap.policies.monitoring).
Something like below:
{
"ONAPName": "DCAE",
"ONAPComponent": "PolicyHandler",
"ONAPInstance": "622431a4-9dea-4eae-b443-3b2164639c64",
"action": "configure",
"resource":
{ "policy-id": "onap.policies.monitoring.nsas-fbb-asam-pref.test.*" }}
Looking at the policy xml <Target>, it seems it is “string-equal”. Guess we are looking for it to be “string-regexp-match”.
<Policy xmlns="urn:oasis:names:tc:xacml:3.0:core:schema:wd-17" PolicyId="onap.policies.monitoring.nsas-fbb-asam-pref.test1" Version="1.0.0" RuleCombiningAlgId="urn:oasis:names:tc:xacml:1.0:rule-combining-
<Target>
<AnyOf>
<AllOf>
<Match MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal">
<AttributeValue DataType=http://www.w3.org/2001/XMLSchema#string>onap.policies.monitoring.nsas-fbb-asam-pref.test1</AttributeValue>
<AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="urn:oasis:names:tc:xacml:1.0:resource:resource-id" DataType="http://www.w3.org/200
</Match>
</AllOf>
<AllOf>
<Match MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal">
<AttributeValue DataType=http://www.w3.org/2001/XMLSchema#string>onap.policies.monitoring.nsas-fbb-asam-pref</AttributeValue>
<AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="urn:org:onap:policy-type" DataType=http://www.w3.org/2001/XMLSchema#string MustB
</Match>
</AllOf>
<AllOf>
<Match MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal">
<AttributeValue DataType=http://www.w3.org/2001/XMLSchema#string>onap.policies.monitoring.nsas-fbb-asam-pref</AttributeValue>
<AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="urn:org:onap:policy-type" DataType=http://www.w3.org/2001/XMLSchema#string MustB
</Match>
<Match MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal">
<AttributeValue DataType=http://www.w3.org/2001/XMLSchema#string>1.0.0</AttributeValue>
<AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="urn:org:onap:policy-type-version" DataType="http://www.w3.org/2001/XMLSchema#strin
</Match>
</AllOf>
</AnyOf>
</Target>
See tutorials on the filter application on how it specifies functions for reference.