diff options
author | Pamela Dragosh <pdragosh@research.att.com> | 2019-08-30 15:21:05 -0400 |
---|---|---|
committer | Pamela Dragosh <pdragosh@research.att.com> | 2019-09-09 15:27:30 -0400 |
commit | 85b5178017e89c815af7792826f52a90814f5dba (patch) | |
tree | 1cc49f6763f1af2cab372bb75ae6b9e5391c3ad7 /applications/optimization/src/test/resources/onap.policies.optimization.DistancePolicy-1.0.0.json | |
parent | dc68da3c00c0a814110e0f7529365d695bff571b (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/optimization/src/test/resources/onap.policies.optimization.DistancePolicy-1.0.0.json')
-rw-r--r-- | applications/optimization/src/test/resources/onap.policies.optimization.DistancePolicy-1.0.0.json | 89 |
1 files changed, 89 insertions, 0 deletions
diff --git a/applications/optimization/src/test/resources/onap.policies.optimization.DistancePolicy-1.0.0.json b/applications/optimization/src/test/resources/onap.policies.optimization.DistancePolicy-1.0.0.json new file mode 100644 index 00000000..1b74c356 --- /dev/null +++ b/applications/optimization/src/test/resources/onap.policies.optimization.DistancePolicy-1.0.0.json @@ -0,0 +1,89 @@ +{ + "tosca_definitions_version": "tosca_simple_yaml_1_0_0", + "policy_types": { + "onap.policies.optimization.DistancePolicy": { + "derived_from": "onap.policies.Optimization", + "version": "1.0.0", + "properties": { + "applicableResources": { + "type": "list", + "required": true, + "entry_schema": { + "type": "string", + "constraints": [ + { + "valid_values": [ + "any", + "all" + ] + } + ] + } + }, + "distanceProperties": { + "type": "policy.data.distanceProperties_properties", + "required": true + } + } + } + }, + "data_types": { + "policy.data.distanceProperties_properties": { + "derived_from": "tosca.nodes.Root", + "properties": { + "locationInfo": { + "type": "string", + "required": true + }, + "distance": { + "type": "policy.data.distance_properties", + "required": true, + "entry_schema": { + "type": "policy.data.distance_properties" + } + } + } + }, + "policy.data.distance_properties": { + "derived_from": "tosca.nodes.Root", + "properties": { + "value": { + "type": "string", + "required": true + }, + "operator": { + "type": "list", + "required": true, + "entry_schema": { + "type": "string", + "constraints": [ + { + "valid_values": [ + "<", + "<=", + "\n", + ">=", + "=" + ] + } + ] + } + }, + "unit": { + "type": "list", + "required": true, + "entry_schema": { + "type": "string", + "constraints": [ + { + "valid_values": [ + "km" + ] + } + ] + } + } + } + } + } +}
\ No newline at end of file |