Merge "Add new match Policy Type"
[policy/models.git] / models-examples / src / main / resources / policytypes / onap.policies.controlloop.guard.common.Filter.yaml
1 tosca_definitions_version: tosca_simple_yaml_1_1_0
2 policy_types:
3    onap.policies.controlloop.guard.common.Filter:
4       derived_from: onap.policies.controlloop.guard.Common
5       type_version: 1.0.0
6       version: 1.0.0
7       name: onap.policies.controlloop.guard.common.Filter
8       description: Supports filtering of A&AI entities such as vnf-id, type, service, geographic region, etc.
9       properties:
10          algorithm:
11             type: string
12             description: Designates the precendence of blacklist vs whitelist
13             required: true
14             default: blacklist-overrides
15             constraints:
16             - valid_values: ["blacklist-overrides", "whitelist-overrides"]
17          filters:
18             type: list
19             description: List of filters to be applied.
20             required: true
21             entry_schema:
22                type: onap.datatypes.guard.filter
23 data_types:
24    onap.datatypes.guard.filter:
25       derived_from: tosca.nodes.Root
26       properties:
27          field:
28             type: string
29             description: Name of the field to perform the filter on using the A&AI <node>.<property> syntax.
30             required: true
31             constraints:
32                - valid_values:
33                   - generic-vnf.vnf-name
34                   - generic-vnf.vnf-id
35                   - generic-vnf.vnf-type
36                   - generic-vnf.nf-naming-code
37                   - vserver.vserver-id
38                   - cloud-region.cloud-region-id
39          filter:
40             type: string
41             description: The filter value itself. For example, "RegionOne" "vFWCL*"
42             required: true
43          function:
44             type: string
45             description: The function applied to the filter.
46             required: true
47             constraints:
48                - valid_values:
49                   - string-equal
50                   - string-equal-ignore-case
51                   - string-regexp-match
52                   - string-contains
53                   - string-greater-than
54                   - string-greater-than-or-equal
55                   - string-less-than
56                   - string-less-than-or-equal
57                   - string-starts-with
58                   - string-ends-with
59          blacklist:
60             type: boolean
61             description: |
62                Indicates if the filter should be treated as a blacklist (true)
63                or whitelist (false).
64             required: true
65             default: true