Add more textual explanation in api doc
[policy/parent.git] / docs / api / policytypes / onap.policies.optimization.OptimizationPolicy.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.OptimizationPolicy": {
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                                         "placement_optimization"
36                                     ]
37                                 }
38                             ]
39                         }
40                     },
41                     "identity": {
42                         "type": "string",
43                         "required": true
44                     },
45                     "objective": {
46                         "type": "list",
47                         "required": true,
48                         "entry_schema": {
49                             "type": "string",
50                             "constraints": [
51                                 {
52                                     "valid_values": [
53                                         "minimize",
54                                         "maximize"
55                                     ]
56                                 }
57                             ]
58                         }
59                     },
60                     "objectiveParameter": {
61                         "type": "policy.data.objectiveParameter_properties",
62                         "required": true
63                     }
64                 }
65             }
66         }
67     ],
68     "data_types": [
69         {
70             "policy.data.objectiveParameter_properties": {
71                 "derived_from": "tosca.nodes.Root",
72                 "properties": {
73                     "parameterAttributes": {
74                         "type": "list",
75                         "required": true,
76                         "entry_schema": {
77                             "type": "policy.data.parameterAttributes_properties"
78                         }
79                     },
80                     "operator": {
81                         "type": "list",
82                         "required": true,
83                         "entry_schema": {
84                             "type": "string",
85                             "constraints": [
86                                 {
87                                     "valid_values": [
88                                         "*",
89                                         "+",
90                                         "-",
91                                         "/",
92                                         "%"
93                                     ]
94                                 }
95                             ]
96                         }
97                     }
98                 }
99             },
100             "policy.data.parameterAttributes_properties": {
101                 "derived_from": "tosca.nodes.Root",
102                 "properties": {
103                     "resources": {
104                         "type": "string",
105                         "required": true
106                     },
107                     "customerLocationInfo": {
108                         "type": "string",
109                         "required": true
110                     },
111                     "parameter": {
112                         "type": "string",
113                         "required": true
114                     },
115                     "weight": {
116                         "type": "string",
117                         "required": true
118                     },
119                     "operator": {
120                         "type": "list",
121                         "required": true,
122                         "entry_schema": {
123                             "type": "string",
124                             "constraints": [
125                                 {
126                                     "valid_values": [
127                                         "*",
128                                         "+",
129                                         "-",
130                                         "/",
131                                         "%"
132                                     ]
133                                 }
134                             ]
135                         }
136                     }
137                 }
138             }
139         }
140     ]
141 }