summaryrefslogtreecommitdiffstats
path: root/applications/guard/src/test/resources/test-bad-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-bad-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-bad-policies.yaml')
-rw-r--r--applications/guard/src/test/resources/test-bad-policies.yaml151
1 files changed, 121 insertions, 30 deletions
diff --git a/applications/guard/src/test/resources/test-bad-policies.yaml b/applications/guard/src/test/resources/test-bad-policies.yaml
index df2431d4..07040c54 100644
--- a/applications/guard/src/test/resources/test-bad-policies.yaml
+++ b/applications/guard/src/test/resources/test-bad-policies.yaml
@@ -1,35 +1,126 @@
tosca_definitions_version: tosca_simple_yaml_1_1_0
topology_template:
- policies:
- -
- frequency-missing-properties:
- type: onap.policies.controlloop.guard.common.FrequencyLimiter
- type_version: 1.0.0
- version: 1.0.0
- -
- frequency-timewindow:
- type: onap.policies.controlloop.guard.common.FrequencyLimiter
- type_version: 1.0.0
- version: 1.0.0
- properties:
+ policies:
+ - frequency-missing-properties:
+ type: onap.policies.controlloop.guard.common.FrequencyLimiter
+ type_version: 1.0.0
+ version: 1.0.0
+ - frequency-timewindow:
+ type: onap.policies.controlloop.guard.common.FrequencyLimiter
+ type_version: 1.0.0
+ version: 1.0.0
+ properties:
limit: 5
timeWindow: i am a bad value
- -
- minmax-notarget:
- type: onap.policies.controlloop.guard.common.MinMax
- type_version: 1.0.0
- version: 1.0.0
- properties:
- -
- minmax-nominmax:
- type: onap.policies.controlloop.guard.common.MinMax
- type_version: 1.0.0
- version: 1.0.0
- properties:
+ - minmax-notarget:
+ type: onap.policies.controlloop.guard.common.MinMax
+ type_version: 1.0.0
+ version: 1.0.0
+ properties: null
+ - minmax-nominmax:
+ type: onap.policies.controlloop.guard.common.MinMax
+ type_version: 1.0.0
+ version: 1.0.0
+ properties:
target: foo
- -
- blacklist-noblacklist:
- type: onap.policies.controlloop.guard.common.Blacklist
- type_version: 1.0.0
- version: 1.0.0
- properties:
+ - blacklist-noblacklist:
+ type: onap.policies.controlloop.guard.common.Blacklist
+ type_version: 1.0.0
+ version: 1.0.0
+ properties: null
+ - filter-noalgorithm:
+ type: onap.policies.controlloop.guard.common.Filter
+ type_version: 1.0.0
+ version: 1.0.0
+ properties: null
+ - filter-badalgorithm:
+ type: onap.policies.controlloop.guard.common.Filter
+ type_version: 1.0.0
+ version: 1.0.0
+ properties:
+ algorithm: idontknow
+ - filter-nofilter:
+ type: onap.policies.controlloop.guard.common.Filter
+ type_version: 1.0.0
+ version: 1.0.0
+ properties:
+ algorithm: whitelist-overrides
+ - filter-nocollection:
+ type: onap.policies.controlloop.guard.common.Filter
+ type_version: 1.0.0
+ version: 1.0.0
+ properties:
+ algorithm: blacklist-overrides
+ filters: vnf1
+ - filter-noarray:
+ type: onap.policies.controlloop.guard.common.Filter
+ type_version: 1.0.0
+ version: 1.0.0
+ properties:
+ algorithm: blacklist-overrides
+ filters:
+ field: geo
+ - filter-missingfield:
+ type: onap.policies.controlloop.guard.common.Filter
+ type_version: 1.0.0
+ version: 1.0.0
+ properties:
+ algorithm: blacklist-overrides
+ filters:
+ - filter: foo
+ - filter-badfield:
+ type: onap.policies.controlloop.guard.common.Filter
+ type_version: 1.0.0
+ version: 1.0.0
+ properties:
+ algorithm: blacklist-overrides
+ filters:
+ - field: notinaai
+ - filter-missingfilter:
+ type: onap.policies.controlloop.guard.common.Filter
+ type_version: 1.0.0
+ version: 1.0.0
+ properties:
+ algorithm: blacklist-overrides
+ filters:
+ - field: generic-vnf.vnf-name
+ - filter-missingfunction:
+ type: onap.policies.controlloop.guard.common.Filter
+ type_version: 1.0.0
+ version: 1.0.0
+ properties:
+ algorithm: blacklist-overrides
+ filters:
+ - field: generic-vnf.vnf-name
+ filter: vfwl*
+ - filter-badfunction:
+ type: onap.policies.controlloop.guard.common.Filter
+ type_version: 1.0.0
+ version: 1.0.0
+ properties:
+ algorithm: blacklist-overrides
+ filters:
+ - field: generic-vnf.vnf-name
+ filter: vfwl*
+ function: notafunction
+ - filter-missingblacklist:
+ type: onap.policies.controlloop.guard.common.Filter
+ type_version: 1.0.0
+ version: 1.0.0
+ properties:
+ algorithm: blacklist-overrides
+ filters:
+ - field: generic-vnf.vnf-name
+ filter: vfwl*
+ function: string-equal
+ - filter-badblacklist:
+ type: onap.policies.controlloop.guard.common.Filter
+ type_version: 1.0.0
+ version: 1.0.0
+ properties:
+ algorithm: blacklist-overrides
+ filters:
+ - field: generic-vnf.vnf-name
+ filter: vfwl*
+ function: string-equal
+ blacklist: shouldbeboolean \ No newline at end of file