summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPamela Dragosh <pdragosh@research.att.com>2020-08-17 16:42:55 -0400
committerPamela Dragosh <pdragosh@research.att.com>2020-08-17 16:58:59 -0400
commit132299e0db10e19f956ee3a886dc7e0966215279 (patch)
treef0b15e9399b539005d0640d317318e1e07e7b2f4
parentf5eeaaeaeadf04571d8881f497c770ee1bbbdde5 (diff)
Add new guard filter policy type
New policy type for testing and preloading. Issue-ID: POLICY-2590 Change-Id: Ic542c61bd402387870306fce9a1977b169052ef9 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
-rw-r--r--models-examples/src/main/resources/policytypes/onap.policies.controlloop.guard.common.Filter.yaml65
1 files changed, 65 insertions, 0 deletions
diff --git a/models-examples/src/main/resources/policytypes/onap.policies.controlloop.guard.common.Filter.yaml b/models-examples/src/main/resources/policytypes/onap.policies.controlloop.guard.common.Filter.yaml
new file mode 100644
index 000000000..2d96c5235
--- /dev/null
+++ b/models-examples/src/main/resources/policytypes/onap.policies.controlloop.guard.common.Filter.yaml
@@ -0,0 +1,65 @@
+tosca_definitions_version: tosca_simple_yaml_1_1_0
+policy_types:
+ onap.policies.controlloop.guard.common.Filter:
+ derived_from: onap.policies.controlloop.guard.Common
+ type_version: 1.0.0
+ version: 1.0.0
+ name: onap.policies.controlloop.guard.common.Filter
+ description: Supports filtering of A&AI entities such as vnf-id, type, service, geographic region, etc.
+ properties:
+ algorithm:
+ type: string
+ description: Designates the precendence of blacklist vs whitelist
+ required: true
+ default: blacklist-overrides
+ constraints:
+ - valid_values: ["blacklist-overrides", "whitelist-overrides"]
+ filters:
+ type: list
+ description: List of filters to be applied.
+ required: true
+ entry_schema:
+ type: onap.datatypes.guard.filter
+data_types:
+ onap.datatypes.guard.filter:
+ derived_from: tosca.nodes.Root
+ properties:
+ field:
+ type: string
+ description: Name of the field to perform the filter on using the A&AI <node>.<property> syntax.
+ required: true
+ constraints:
+ - valid_values:
+ - generic-vnf.vnf-name
+ - generic-vnf.vnf-id
+ - generic-vnf.vnf-type
+ - generic-vnf.nf-naming-code
+ - vserver.vserver-id
+ - cloud-region.cloud-region-id
+ filter:
+ type: string
+ description: The filter value itself. For example, "RegionOne" "vFWCL*"
+ required: true
+ function:
+ type: string
+ description: The function applied to the filter.
+ required: true
+ constraints:
+ - valid_values:
+ - string-equal
+ - string-equal-ignore-case
+ - string-regexp-match
+ - string-contains
+ - string-greater-than
+ - string-greater-than-or-equal
+ - string-less-than
+ - string-less-than-or-equal
+ - string-starts-with
+ - string-ends-with
+ blacklist:
+ type: boolean
+ description: |
+ Indicates if the filter should be treated as a blacklist (true)
+ or whitelist (false).
+ required: true
+ default: true \ No newline at end of file