summaryrefslogtreecommitdiffstats
path: root/applications/guard/src/test/resources/test-bad-policies.yaml
blob: d7780c1fed485fc85a312b8edb8111ee5c81477f (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
tosca_definitions_version: tosca_simple_yaml_1_1_0
topology_template:
   policies:
   -  frequency-missing-properties:
         type: onap.policies.controlloop.guard.common.FrequencyLimiter
         type_version: 1.0.0
         version: 1.0.0
         properties:
            badProperty: badValue
   -  frequency-timewindow:
         type: onap.policies.controlloop.guard.common.FrequencyLimiter
         type_version: 1.0.0
         version: 1.0.0
         properties:
            limit: 5
            timeWindow: i am a bad value
   -  frequency-badtimerange_start:
         type: onap.policies.controlloop.guard.common.FrequencyLimiter
         type_version: 1.0.0
         version: 1.0.0
         properties:
          actor: APPC
          operation: Restart
          timeRange:
            startTime: 08:00:00Z
            end_time: 23:59:59Z
          id: loop-3
          timeWindow: 8
          timeUnits: hour
          limit: 0
   -  frequency-badtimerange_end:
         type: onap.policies.controlloop.guard.common.FrequencyLimiter
         type_version: 1.0.0
         version: 1.0.0
         properties:
          actor: APPC
          operation: Restart
          timeRange:
            start_time: 08:00:00Z
            endTime: 23:59:59Z
          id: loop-3
          timeWindow: 8
          timeUnits: hour
          limit: 0
   -  frequency-badtimerange_value:
         type: onap.policies.controlloop.guard.common.FrequencyLimiter
         type_version: 1.0.0
         version: 1.0.0
         properties:
          actor: APPC
          operation: Restart
          timeRange:
            start_time: 99:99:99
            end_time: 23:59:59Z
          id: loop-3
          timeWindow: 8
          timeUnits: hour
          limit: 0
   -  minmax-notarget:
         type: onap.policies.controlloop.guard.common.MinMax
         type_version: 1.0.0
         version: 1.0.0
         properties:
            badProperty: badValue
   -  minmax-nominmax:
         type: onap.policies.controlloop.guard.common.MinMax
         type_version: 1.0.0
         version: 1.0.0
         properties:
            target: foo
   -  blacklist-noblacklist:
         type: onap.policies.controlloop.guard.common.Blacklist
         type_version: 1.0.0
         version: 1.0.0
         properties:
            badProperty: badValue
   -  filter-noalgorithm:
         type: onap.policies.controlloop.guard.common.Filter
         type_version: 1.0.0
         version: 1.0.0
         properties:
            filters: []
   -  filter-badalgorithm:
         type: onap.policies.controlloop.guard.common.Filter
         type_version: 1.0.0
         version: 1.0.0
         properties:
            filters: []
            algorithm: idontknow
   -  filter-nofilter:
         type: onap.policies.controlloop.guard.common.Filter
         type_version: 1.0.0
         version: 1.0.0
         properties:
            algorithm: whitelist-overrides
   -  filter-nocollection:
         type: onap.policies.controlloop.guard.common.Filter
         type_version: 1.0.0
         version: 1.0.0
         properties:
            algorithm: blacklist-overrides
            filters: vnf1
   -  filter-noarray:
         type: onap.policies.controlloop.guard.common.Filter
         type_version: 1.0.0
         version: 1.0.0
         properties:
            algorithm: blacklist-overrides
            filters:
               field: geo
   -  filter-missingfield:
         type: onap.policies.controlloop.guard.common.Filter
         type_version: 1.0.0
         version: 1.0.0
         properties:
            algorithm: blacklist-overrides
            filters:
            -  filter: foo
   -  filter-badfield:
         type: onap.policies.controlloop.guard.common.Filter
         type_version: 1.0.0
         version: 1.0.0
         properties:
            algorithm: blacklist-overrides
            filters:
            -  field: notinaai
               filter: vfwl*
               function: string-contains
               blacklist: true
   -  filter-missingfilter:
         type: onap.policies.controlloop.guard.common.Filter
         type_version: 1.0.0
         version: 1.0.0
         properties:
            algorithm: blacklist-overrides
            filters:
            -  field: generic-vnf.vnf-name
   -  filter-missingfunction:
         type: onap.policies.controlloop.guard.common.Filter
         type_version: 1.0.0
         version: 1.0.0
         properties:
            algorithm: blacklist-overrides
            filters:
            -  field: generic-vnf.vnf-name
               filter: vfwl*
   -  filter-badfunction:
         type: onap.policies.controlloop.guard.common.Filter
         type_version: 1.0.0
         version: 1.0.0
         properties:
            algorithm: blacklist-overrides
            filters:
            -  field: generic-vnf.vnf-name
               filter: vfwl*
               function: notafunction
               blacklist: true
   -  filter-missingblacklist:
         type: onap.policies.controlloop.guard.common.Filter
         type_version: 1.0.0
         version: 1.0.0
         properties:
            algorithm: blacklist-overrides
            filters:
            -  field: generic-vnf.vnf-name
               filter: vfwl*
               function: string-equal