e9e5436fc46bb366509190a8d182e3864e9bb1d1
[policy/api.git] / main / src / test / resources / policytypes / onap.policies.optimization.HpaPolicy.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.HpaPolicy:
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                     constraints:
25                     -   valid_values:
26                         - hpa
27             resources:
28                 type: list
29                 required: true
30                 entry_schema:
31                     type: string
32             identity:
33                 type: string
34                 required: true
35             flavorFeatures:
36                 type: list
37                 required: true
38                 entry_schema:
39                     type: policy.data.flavorFeatures_properties
40 data_types:
41   -
42     policy.data.flavorFeatures_properties:
43         derived_from: tosca.nodes.Root
44         properties:
45             id:
46                 type: string
47                 required: true
48             type:
49                 type: string
50                 required: true
51             directives:
52                 type: list
53                 required: true
54                 entry_schema:
55                     type: policy.data.directives_properties
56             flavorProperties:
57                 type: list
58                 required: true
59                 entry_schema:
60                     type: policy.data.flavorProperties_properties
61   -
62     policy.data.directives_properties:
63         derived_from: tosca.nodes.Root
64         properties:
65             type:
66                 type: string
67             attributes:
68                 type: list
69                 entry_schema:
70                     type: policy.data.directives_attributes_properties
71   -
72     policy.data.directives_attributes_properties:
73         derived_from: tosca.nodes.Root
74         properties:
75             attribute_name:
76                 type: string
77             attribute_value:
78                 type: string
79   -
80     policy.data.flavorProperties_properties:
81         derived_from: tosca.nodes.Root
82         properties:
83             hpa-feature:
84                 type: string
85                 required: true
86             mandatory:
87                 type: string
88                 required: true
89             score:
90                 type: string
91                 required: false
92             architecture:
93                 type: string
94                 required: true
95             hpa-version:
96                 type: string
97                 required: true
98             directives:
99                 type: list
100                 required: true
101                 entry_schema:
102                     type: policy.data.directives_properties
103             hpa-feature-attributes:
104                 type: list
105                 required: true
106                 entry_schema:
107                     type: policy.data.hpa-feature-attributes_properties
108   -
109     policy.data.hpa-feature-attributes_properties:
110         derived_from: tosca.nodes.Root
111         properties:
112             hpa-attribute-key:
113                 type: string
114                 required: true
115             hpa-attribute-value:
116                 type: string
117                 required: true
118             operator:
119                 type: list
120                 required: true
121                 entry_schema:
122                     type: string
123                     constraints:
124                     -   valid_values:
125                         - <
126                         - <=
127                         - '>'
128                         - '>='
129                         - '='
130                         - '!='
131                         - any
132                         - all
133                         - subset
134             unit:
135                 type: string
136                 required: false