Merge "Insert tosca models for policy model uploading"
[optf/osdf.git] / osdf / models / policy / placement / tosca_upload / onap.policies.optimization.DistancePolicy.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.DistancePolicy:
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                         - distance_to_location
27             identity:
28                 type: string
29                 required: true
30             resources:
31                 type: list
32                 required: true
33                 entry_schema:
34                     type: string
35             applicableResources:
36                 type: list
37                 required: true
38                 entry_schema:
39                     type: string
40                     constraints:
41                     -   valid_values:
42                         - any
43                         - all
44             distanceProperties:
45                 type: policy.data.distanceProperties_properties
46                 required: true
47 data_types:
48     policy.data.distanceProperties_properties:
49         derived_from: tosca.nodes.Root
50         properties:
51             locationInfo:
52                 type: string
53                 required: true
54             distance:
55                 type: policy.data.distance_properties
56                 required: true
57     policy.data.distance_properties:
58         derived_from: tosca.nodes.Root
59         properties:
60             value:
61                 type: string
62                 required: true
63             operator:
64                 type: list
65                 required: true
66                 entry_schema:
67                     type: string
68                     constraints:
69                     -   valid_values:
70                         - <
71                         - <=
72                         - '>'
73                         - '>='
74                         - '='
75             unit:
76                 type: list
77                 required: true
78                 entry_schema:
79                     type: string
80                     constraints:
81                     -   valid_values:
82                         - km