Implement serialization/deserialization for TOSCA concepts
[policy/models.git] / models-examples / src / main / resources / policytypes / onap.policies.optimization.AffinityPolicy.yaml
1 tosca_definitions_version: tosca_simple_yaml_1_0_0
2 policy_types:
3     - onap.policies.Optimization:
4         derived_from: tosca.policies.Root
5         version: 1.0.0
6         description: a base policy type for all policies that govern optimization
7     - onap.policies.optimization.AffinityPolicy:
8         derived_from: onap.policies.Optimization
9         properties:
10             policyScope:
11                 type: list
12                 description: scope where the policy is applicable
13                 required: true
14                 matchable: true
15                 entry_schema:
16                     type: string
17             policyType:
18                 type: list
19                 description: type of a policy
20                 required: true
21                 matchable: true
22                 entry_schema:
23                     type: string
24                     consraints:
25                     -   valid_values:
26                         - zone
27             identity:
28                 type: string
29                 required: true
30             applicableResources:
31                 type: list
32                 required: true
33                 entry_schema:
34                     type: string
35                     constraints:
36                     -   valid_values:
37                         - any
38                         - all
39             affinityProperties:
40                 type: policy.data.affinityProperties_properties
41                 required: true
42             resources:
43                 type: list
44                 required: true
45                 entry_schema:
46                     type: string
47 data_types:
48     policy.data.affinityProperties_properties:
49         derived_from: tosca.nodes.Root
50         properties:
51             qualifier:
52                 type: list
53                 required: true
54                 entry_schema:
55                     type: string
56                     constraints:
57                     -   valid_values:
58                         - same
59                         - different
60             category:
61                 type: string
62                 required: true