summaryrefslogtreecommitdiffstats
path: root/applications/common/src/test/resources
diff options
context:
space:
mode:
authorPamela Dragosh <pdragosh@research.att.com>2019-08-30 15:21:05 -0400
committerPamela Dragosh <pdragosh@research.att.com>2019-09-09 15:27:30 -0400
commit85b5178017e89c815af7792826f52a90814f5dba (patch)
tree1cc49f6763f1af2cab372bb75ae6b9e5391c3ad7 /applications/common/src/test/resources
parentdc68da3c00c0a814110e0f7529365d695bff571b (diff)
Integrate using Policy Type to find Matchable
Utilize's Jim's helper class to pull from API policy types definitions so that Xacml PDP can determine which properties are "matchable". Override initialize to set translator parameters. Utilize the metadata section of ToscaProperties to store the matchable field. Updated Matchable Request to be dynamic with respect to the incoming resource attributes. Stored the policy types as JSON. Issue-ID: POLICY-1899 Change-Id: Icff3605495b0a34ebfcdfa54346095ce2d8468a4 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
Diffstat (limited to 'applications/common/src/test/resources')
-rw-r--r--applications/common/src/test/resources/matchable/onap.policies.Test-1.0.0.yaml38
-rw-r--r--applications/common/src/test/resources/matchable/test.policies.input.tosca.yaml23
2 files changed, 61 insertions, 0 deletions
diff --git a/applications/common/src/test/resources/matchable/onap.policies.Test-1.0.0.yaml b/applications/common/src/test/resources/matchable/onap.policies.Test-1.0.0.yaml
new file mode 100644
index 00000000..089aad66
--- /dev/null
+++ b/applications/common/src/test/resources/matchable/onap.policies.Test-1.0.0.yaml
@@ -0,0 +1,38 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+policy_types:
+ onap.policies.Test:
+ derived_from: tosca.policies.Root
+ version: 1.0.0
+ properties:
+ nonmatachableString:
+ type: string
+ matchableString:
+ type: string
+ metadata:
+ matchable: true
+ nonmatachableInteger:
+ type: integer
+ metadata:
+ matchable: false
+ matachableInteger:
+ type: integer
+ metadata:
+ matchable: true
+ nonmatachableDouble:
+ type: double
+ matchableDouble:
+ type: double
+ metadata:
+ matchable: true
+ nonmatachableBoolean:
+ type: boolean
+ matachableBoolean:
+ type: boolean
+ metadata:
+ matchable: true
+ matchableListString:
+ type: list
+ metadata:
+ matchable: true
+ entry_schema:
+ type: string \ No newline at end of file
diff --git a/applications/common/src/test/resources/matchable/test.policies.input.tosca.yaml b/applications/common/src/test/resources/matchable/test.policies.input.tosca.yaml
new file mode 100644
index 00000000..434f7a97
--- /dev/null
+++ b/applications/common/src/test/resources/matchable/test.policies.input.tosca.yaml
@@ -0,0 +1,23 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+topology_template:
+ policies:
+ -
+ Test.policy:
+ type: onap.policies.Test
+ type_version: 1.0.0
+ version: 1.0.0
+ metadata:
+ policy-id: Test.policy
+ policy-version: 1
+ properties:
+ nonmatachableString: "I am NON matchable"
+ matchableString: "I should be matched"
+ nonmatachableInteger: 0
+ matachableInteger: 1000
+ nonmatachableDouble: 0.0
+ matchableDouble: 1.1
+ nonmatachableBoolean: false
+ matachableBoolean: true
+ matchableListString:
+ - match A
+ - match B \ No newline at end of file