aboutsummaryrefslogtreecommitdiffstats
path: root/src/test/resources/tosca/tosca-with-constraints.yaml
blob: 959bc483b87847f0a8f732b6bfc651bc6ecee46e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
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 ]