Add more textual explanation in api doc
[policy/parent.git] / docs / api / policytypes / onap.policies.optimization.HpaPolicy.json
1 {
2     "tosca_definitions_version": "tosca_simple_yaml_1_0_0",
3     "policy_types": [
4         {
5             "onap.policies.Optimization": {
6                 "derived_from": "tosca.policies.Root",
7                 "version": "1.0.0",
8                 "description": "a base policy type for all policies that govern optimization"
9             }
10         },
11         {
12             "onap.policies.optimization.HpaPolicy": {
13                 "derived_from": "onap.policies.Optimization",
14                 "version": "1.0.0",
15                 "properties": {
16                     "policyScope": {
17                         "type": "list",
18                         "description": "scope where the policy is applicable",
19                         "required": true,
20                         "matchable": true,
21                         "entry_schema": {
22                             "type": "string"
23                         }
24                     },
25                     "policyType": {
26                         "type": "list",
27                         "description": "type of a policy",
28                         "required": true,
29                         "matchable": true,
30                         "entry_schema": {
31                             "type": "string",
32                             "constraints": [
33                                 {
34                                     "valid_values": [
35                                         "hpa"
36                                     ]
37                                 }
38                             ]
39                         }
40                     },
41                     "resources": {
42                         "type": "list",
43                         "required": true,
44                         "entry_schema": {
45                             "type": "string"
46                         }
47                     },
48                     "identity": {
49                         "type": "string",
50                         "required": true
51                     },
52                     "flavorFeatures": {
53                         "type": "list",
54                         "required": true,
55                         "entry_schema": {
56                             "type": "policy.data.flavorFeatures_properties"
57                         }
58                     }
59                 }
60             }
61         }
62     ],
63     "data_types": [
64         {
65             "policy.data.flavorFeatures_properties": {
66                 "derived_from": "tosca.nodes.Root",
67                 "properties": {
68                     "id": {
69                         "type": "string",
70                         "required": true
71                     },
72                     "type": {
73                         "type": "string",
74                         "required": true
75                     },
76                     "directives": {
77                         "type": "list",
78                         "required": true,
79                         "entry_schema": {
80                             "type": "policy.data.directives_properties"
81                         }
82                     },
83                     "flavorProperties": {
84                         "type": "list",
85                         "required": true,
86                         "entry_schema": {
87                             "type": "policy.data.flavorProperties_properties"
88                         }
89                     }
90                 }
91             }
92         },
93         {
94             "policy.data.directives_properties": {
95                 "derived_from": "tosca.nodes.Root",
96                 "properties": {
97                     "type": {
98                         "type": "string"
99                     },
100                     "attributes": {
101                         "type": "list",
102                         "entry_schema": {
103                             "type": "policy.data.directives_attributes_properties"
104                         }
105                     }
106                 }
107             }
108         },
109         {
110             "policy.data.directives_attributes_properties": {
111                 "derived_from": "tosca.nodes.Root",
112                 "properties": {
113                     "attribute_name": {
114                         "type": "string"
115                     },
116                     "attribute_value": {
117                         "type": "string"
118                     }
119                 }
120             }
121         },
122         {
123             "policy.data.flavorProperties_properties": {
124                 "derived_from": "tosca.nodes.Root",
125                 "properties": {
126                     "hpa-feature": {
127                         "type": "string",
128                         "required": true
129                     },
130                     "mandatory": {
131                         "type": "string",
132                         "required": true
133                     },
134                     "score": {
135                         "type": "string",
136                         "required": false
137                     },
138                     "architecture": {
139                         "type": "string",
140                         "required": true
141                     },
142                     "hpa-version": {
143                         "type": "string",
144                         "required": true
145                     },
146                     "directives": {
147                         "type": "list",
148                         "required": true,
149                         "entry_schema": {
150                             "type": "policy.data.directives_properties"
151                         }
152                     },
153                     "hpa-feature-attributes": {
154                         "type": "list",
155                         "required": true,
156                         "entry_schema": {
157                             "type": "policy.data.hpa-feature-attributes_properties"
158                         }
159                     }
160                 }
161             }
162         },
163         {
164             "policy.data.hpa-feature-attributes_properties": {
165                 "derived_from": "tosca.nodes.Root",
166                 "properties": {
167                     "hpa-attribute-key": {
168                         "type": "string",
169                         "required": true
170                     },
171                     "hpa-attribute-value": {
172                         "type": "string",
173                         "required": true
174                     },
175                     "operator": {
176                         "type": "list",
177                         "required": true,
178                         "entry_schema": {
179                             "type": "string",
180                             "constraints": [
181                                 {
182                                     "valid_values": [
183                                         "<",
184                                         "<=",
185                                         ">",
186                                         ">=",
187                                         "=",
188                                         "!=",
189                                         "any",
190                                         "all",
191                                         "subset"
192                                     ]
193                                 }
194                             ]
195                         }
196                     },
197                     "unit": {
198                         "type": "string",
199                         "required": false
200                     }
201                 }
202             }
203         }
204     ]
205 }