summaryrefslogtreecommitdiffstats
path: root/applications/guard/src/test/resources/test-policies.yaml
diff options
context:
space:
mode:
authorPamela Dragosh <pdragosh@research.att.com>2020-08-17 16:45:30 -0400
committerPamela Dragosh <pdragosh@research.att.com>2020-08-17 19:41:07 -0400
commitad9d827a43211c087fe4bcf575134aea3a5b316e (patch)
treecff37aeb77e3b7dc9ec899c7bb04961f40c695ea /applications/guard/src/test/resources/test-policies.yaml
parentabbabd038c2575d3fcdc07d25313e741d32c1c90 (diff)
Add new guard filter policy type feature
* Added new Policy Guard filter Policy type. * Enhanced translator tests to ensure bad filter policies are detected. * Added new filter application test to ensure new guard propertly creates xacml policies. Issue-ID: POLICY-2590 Change-Id: Ifc047a33084ce45b67be98a61f660d7a8c9d8615 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
Diffstat (limited to 'applications/guard/src/test/resources/test-policies.yaml')
-rw-r--r--applications/guard/src/test/resources/test-policies.yaml54
1 files changed, 54 insertions, 0 deletions
diff --git a/applications/guard/src/test/resources/test-policies.yaml b/applications/guard/src/test/resources/test-policies.yaml
index 1ac7271c..e33f116a 100644
--- a/applications/guard/src/test/resources/test-policies.yaml
+++ b/applications/guard/src/test/resources/test-policies.yaml
@@ -100,6 +100,60 @@ topology_template:
- vnf1
- vnf2
-
+ filter-1:
+ type: onap.policies.controlloop.guard.common.Filter
+ type_version: 1.0.0
+ version: 1.0.0
+ metadata:
+ policy-id : filter-1
+ policy-version: 1.0.0
+ properties:
+ actor: APPC
+ operation: "*"
+ id: loop-1
+ algorithm: blacklist-overrides
+ filters:
+ - field: "generic-vnf.vnf-id"
+ function: "string-equal"
+ filter: "vf-module-id-2"
+ blacklist: true
+ - field: "generic-vnf.vnf-name"
+ function: "string-equal-ignore-case"
+ filter: "vf-MODULE-id-2"
+ blacklist: true
+ - field: "generic-vnf.vnf-type"
+ function: "string-starts-with"
+ filter: "vf-module"
+ blacklist: true
+ - field: "generic-vnf.nf-naming-code"
+ function: "string-regexp-match"
+ filter: "[0-9][a-zA-Z]+"
+ blacklist: true
+ - field: "vserver.vserver-id"
+ function: "string-contains"
+ filter: "myserver"
+ blacklist: true
+ - field: "cloud-region.cloud-region-id"
+ function: "string-ends-with"
+ filter: "mycloud"
+ blacklist: false
+ - field: "cloud-region.cloud-region-id"
+ function: "string-greater-than"
+ filter: "00"
+ blacklist: false
+ - field: "cloud-region.cloud-region-id"
+ function: "string-greater-than-or-equal"
+ filter: "00"
+ blacklist: false
+ - field: "cloud-region.cloud-region-id"
+ function: "string-less-than"
+ filter: "99"
+ blacklist: false
+ - field: "cloud-region.cloud-region-id"
+ function: "string-less-than-or-equal"
+ filter: "99"
+ blacklist: false
+ -
unknown-1:
type: onap.policies.controlloop.guard.common.Unknown
type_version: 1.0.0