diff options
author | jhh <jorge.hernandez-herrero@att.com> | 2020-01-30 18:57:13 -0600 |
---|---|---|
committer | jhh <jorge.hernandez-herrero@att.com> | 2020-02-04 00:26:57 -0600 |
commit | baa4e928207f5930fcd620bddddcd493aa7a4122 (patch) | |
tree | b4832c661bc05bcb457e65a73c06f0a960ac7632 /policy-utils/src/test/resources | |
parent | a54a2373f1b48cdb64d4920ec57ffeab4f228814 (diff) |
domain native and operational policies support
- moved DomainMaker to policy-utils/ project.
- support for native drools and controller drools policy types.
Issue-ID: POLICY-2345
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: I46b9816eadceb7ef280e0e6789f07b4d4ca51519
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Diffstat (limited to 'policy-utils/src/test/resources')
4 files changed, 128 insertions, 0 deletions
diff --git a/policy-utils/src/test/resources/policy.type.external-9.9.9.schema.json b/policy-utils/src/test/resources/policy.type.external-9.9.9.schema.json new file mode 100644 index 00000000..d8651eb5 --- /dev/null +++ b/policy-utils/src/test/resources/policy.type.external-9.9.9.schema.json @@ -0,0 +1,7 @@ +{ + "definitions": {}, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://www.onap.org/policy/models/schemas/policy.type.external", + "type": "object", + "title": "Domain policy.type.external Policy root schema" +} diff --git a/policy-utils/src/test/resources/policyA-no-policy-type.json b/policy-utils/src/test/resources/policyA-no-policy-type.json new file mode 100644 index 00000000..c92b736c --- /dev/null +++ b/policy-utils/src/test/resources/policyA-no-policy-type.json @@ -0,0 +1,16 @@ +{ + "type": "policy.type.Z", + "type_version": "1.0.0", + "version": "1.0.0", + "metadata": { + "policy-id": "A" + }, + "properties": { + "nested": { + "nested1": "nested1", + "nested2": true, + "nested3": 50 + } + }, + "name": "A" +}
\ No newline at end of file diff --git a/policy-utils/src/test/resources/policyA.json b/policy-utils/src/test/resources/policyA.json new file mode 100644 index 00000000..7afa79d3 --- /dev/null +++ b/policy-utils/src/test/resources/policyA.json @@ -0,0 +1,16 @@ +{ + "type": "policy.type.A", + "type_version": "1.0.0", + "version": "1.0.0", + "metadata": { + "policy-id": "A" + }, + "properties": { + "nested": { + "nested1": "nested1", + "nested2": true, + "nested3": 50 + } + }, + "name": "A" +}
\ No newline at end of file diff --git a/policy-utils/src/test/resources/schemas/policy.type.A-1.0.0.schema.json b/policy-utils/src/test/resources/schemas/policy.type.A-1.0.0.schema.json new file mode 100644 index 00000000..089ec44f --- /dev/null +++ b/policy-utils/src/test/resources/schemas/policy.type.A-1.0.0.schema.json @@ -0,0 +1,89 @@ +{ + "definitions": {}, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://www.onap.org/policy/models/schemas/policy.type.A", + "type": "object", + "title": "Domain policy.type.A Policy root schema", + "required": [ + "type", + "type_version", + "version", + "metadata", + "properties" + ], + "properties": { + "type": { + "$id": "#/properties/type", + "type": "string", + "pattern": "^(.+)$" + }, + "type_version": { + "$id": "#/properties/type_version", + "type": "string", + "pattern": "^(.+)$" + }, + "version": { + "$id": "#/properties/version", + "type": "string", + "title": "Version", + "pattern": "^(.+)$" + }, + "name": { + "$id": "#/properties/name", + "type": "string", + "pattern": "^(.+)$" + }, + "metadata": { + "$id": "#/properties/metadata", + "type": "object", + "title": "Metadata", + "required": [ + "policy-id" + ], + "properties": { + "policy-id": { + "$id": "#/properties/metadata/properties/policy-id", + "type": "string", + "pattern": "^(.+)$" + } + } + }, + "properties": { + "$id": "#/properties/properties", + "type": "object", + "required": [ + "nested" + ], + "properties": { + "nested": { + "$id": "#/properties/properties/properties/nested", + "type": "object", + "required": [ + "nested1", + "nested2", + "nested3" + ], + "properties": { + "nested1": { + "$id": "#/properties/properties/properties/nested/properties/nested1", + "type": "string", + "pattern": "^(.+)$" + }, + "nested2": { + "$id": "#/properties/properties/properties/nested/properties/nested2", + "type": "boolean", + "default": true + }, + "nested3": { + "$id": "#/properties/properties/properties/nested/properties/nested3", + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 30 + } + } + } + } + } + } +} |