summaryrefslogtreecommitdiffstats
path: root/src/test/resources/tosca/tosca-with-constraints.yaml
diff options
context:
space:
mode:
authorSébastien Determe <sebastien.determe@intl.att.com>2019-10-01 13:19:24 +0000
committerGerrit Code Review <gerrit@onap.org>2019-10-01 13:19:24 +0000
commita84a7c622ecb0574750038f35195b1534eda7abc (patch)
tree399f0d847a57828c08d6e63ee4e6c2377ce2cb83 /src/test/resources/tosca/tosca-with-constraints.yaml
parent200371009b84b9f6cfbd26816392a71e213dc3c5 (diff)
parent7c2f2b8262f7fac33ec288744051e97460551361 (diff)
Merge "Improve unit test coverage of ToscaYamlToJsonConvertor"
Diffstat (limited to 'src/test/resources/tosca/tosca-with-constraints.yaml')
-rw-r--r--src/test/resources/tosca/tosca-with-constraints.yaml54
1 files changed, 54 insertions, 0 deletions
diff --git a/src/test/resources/tosca/tosca-with-constraints.yaml b/src/test/resources/tosca/tosca-with-constraints.yaml
new file mode 100644
index 000000000..959bc483b
--- /dev/null
+++ b/src/test/resources/tosca/tosca-with-constraints.yaml
@@ -0,0 +1,54 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+policy_types:
+ onap.policies.Monitoring:
+ derived_from: tosca.policies.Root
+ description: a base policy type for all policies that governs monitoring provisioning
+ onap.policies.monitoring.example.app:
+ derived_from: onap.policies.Monitoring
+ version: 1.0.0
+ properties:
+ example_policy:
+ type: map
+ description: Properties with constraints
+ entry_schema:
+ type: onap.datatypes.monitoring.example_policy
+data_types:
+ onap.datatypes.monitoring.example_policy:
+ derived_from: tosca.datatypes.Root
+ properties:
+ cpus:
+ type: string
+ required: true
+ default: 1
+ constraints:
+ - in_range: [ 1, 4 ]
+ ports:
+ type: integer
+ constraints:
+ - in_range: [ 9000, 9010 ]
+ memSize:
+ type: integer
+ required: true
+ description: memory size
+ constraints:
+ - greater_or_equal: 2
+ - less_or_equal: 10
+ appPassword:
+ type: string
+ description: application password
+ constraints:
+ - min_length: 6
+ - max_length: 10
+ cost:
+ type: float
+ constraints:
+ - less_than: 100.50
+ - greater_than: 50.50
+ algorithm:
+ type: string
+ constraints:
+ - equal: aes
+ keylength:
+ type: integer
+ constraints:
+ - valid_values: [ 128, 256 ]