Merge "Insert tosca models for policy model uploading"
[optf/osdf.git] / osdf / models / policy / placement / tosca_upload / 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                     consraints:
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     policy.data.flavorFeatures_properties:
42         derived_from: tosca.nodes.Root
43         properties:
44             id:
45                 type: string
46                 required: true
47             type:
48                 type: string
49                 required: true
50             directives:
51                 type: list
52                 required: true
53                 entry_schema:
54                     type: policy.data.directives_properties
55             flavorProperties:
56                 type: list
57                 required: true
58                 entry_schema:
59                     type: policy.data.flavorProperties_properties
60     policy.data.directives_properties:
61         derived_from: tosca.nodes.Root
62         properties:
63             type:
64                 type: string
65             attributes:
66                 type: list
67                 entry_schema:
68                     type: policy.data.directives_attributes_properties
69     policy.data.directives_attributes_properties:
70         derived_from: tosca.nodes.Root
71         properties:
72             attribute_name:
73                 type: string
74             attribute_value:
75                 type: string
76     policy.data.flavorProperties_properties:
77         derived_from: tosca.nodes.Root
78         properties:
79             hpa-feature:
80                 type: string
81                 required: true
82             mandatory:
83                 type: string
84                 required: true
85             score:
86                 type: string
87                 required: false
88             architecture:
89                 type: string
90                 required: true
91             hpa-version:
92                 type: string
93                 required: true
94             directives:
95                 type: list
96                 required: true
97                 entry_schema:
98                     type: policy.data.directives_properties
99             hpa-feature-attributes:
100                 type: list
101                 required: true
102                 entry_schema:
103                     type: policy.data.hpa-feature-attributes_properties
104     policy.data.hpa-feature-attributes_properties:
105         derived_from: tosca.nodes.Root
106         properties:
107             hpa-attribute-key:
108                 type: string
109                 required: true
110             hpa-attribute-value:
111                 type: string
112                 required: true
113             operator:
114                 type: list
115                 required: true
116                 entry_schema:
117                     type: string
118                     constraints:
119                     -   valid_values:
120                         - <
121                         - <=
122                         - '>'
123                         - '>='
124                         - '='
125                         - '!='
126                         - any
127                         - all
128                         - subset
129             unit:
130                 type: string
131                 required: false