blob: f0737b56946d4706216bd1df34584ac1e5479c66 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
|
tosca_definitions_version: tosca_simple_yaml_1_1_0
policy_types:
onap.policies.Base:
derived_from: tosca.policies.Root
version: 1.0.0
properties:
baseNoMatch:
type: string
baseMatch:
type: string
metadata:
matchable: true
onap.policies.base.Middle:
derived_from: onap.policies.Base
type_version: 1.0.0
version: 1.0.0
properties:
middleNoMatch:
type: string
middleMatch:
type: string
metadata:
matchable: true
onap.policies.base.middle.Test:
derived_from: onap.policies.base.Middle
type_version: 1.0.0
version: 1.0.0
properties:
nonmatchableString:
type: string
matchableString:
type: string
metadata:
matchable: true
nonmatchableInteger:
type: integer
metadata:
matchable: false
matchableInteger:
type: integer
metadata:
matchable: true
nonmatchableFloat:
type: float
matchableFloat:
type: float
metadata:
matchable: true
nonmatchableBoolean:
type: boolean
matchableBoolean:
type: boolean
metadata:
matchable: true
nonmatchableTimestamp:
type: timestamp
matchableTimestamp:
type: timestamp
metadata:
matchable: true
nonmatchableListInteger:
type: list
entry_schema:
type: integer
matchableListString:
type: list
description: |
Every entry in the list is matchable, the attribute id will be the same for all value. eg. the
property name.
metadata:
matchable: true
entry_schema:
type: string
matchableMapString:
type: map
description: |
Every entry in the map is matchable, however the attribute id will be set by the key.
metadata:
matchable: true
entry_schema:
type: string
nonmatchableMapString:
type: map
description: |
Nothing gets matched - however you have no control over the LHS key. Someone could
easily set that value to a matchable property name defined elsewhere.
entry_schema:
type: string
badDataType:
type: i.do.not.exist
description: we can only ignore this - should get caught in the API
matchableDataType:
type: onap.datatype.zero
description: |
The matchable field in a datatype must be IGNORED, because this will result in too many assumptions
as we may go down many levels of datatypes, lists of datatypes, maps of datatypes, etc. Does every
field in the datatype become matchable? That does not make sense right now to write a Policy Type
like that.
metadata:
matchable: true
data_types:
onap.datatype.zero:
derived_from: tosca.datatypes.Root
description: Note that we do not have to declare matchable for each property.
properties:
zeroStringMatchable:
type: string
metadata:
matchable: true
zeroBooleanMatchable:
type: boolean
metadata:
matchable: true
zeroFloatMatchable:
type: float
metadata:
matchable: true
zeroIntegerMatchable:
type: integer
metadata:
matchable: true
zeroTimestampMatchable:
type: timestamp
metadata:
matchable: true
zeroDatatypeOne:
type: onap.datatype.one
zeroBadDatatype:
type: list
description: we can only ignore this - should get caught in the API
entry_schema:
type: another.missing.datatype
onap.datatype.one:
derived_from: tosca.datatypes.Root
properties:
oneString:
type: string
oneStringMatchable:
type: string
metadata:
matchable: true
propertyTwoListOfDatatype:
type: list
entry_schema:
type: onap.datatype.two
onap.datatype.two:
derived_from: tosca.datatypes.Root
properties:
twoString:
type: string
twoStringMatchable:
type: string
metadata:
matchable: true
twoIntegerMatchable:
type: integer
metadata:
matchable: true
propertyThreeDatatype:
type: map
entry_schema:
type: onap.datatype.three
onap.datatype.three:
derived_from: tosca.datatypes.Root
properties:
threeStringMatchable:
type: string
metadata:
matchable: true
threeIntegerMatchable:
type: integer
metadata:
matchable: true
|