Commit 31b64ef
feat(vpcpeering): Implement validation for VpcManifest
We already have validation for VpcExpose, VpcPeering, and expose or
peering addition to lists and tables; we're only missing some basic
checks for the VpcManifest objects.
There's not much to do this time, because most of the work consists in
validating the VpcExpose objects and preventing prefix overlap between
them, which we have implemented in previous commits. Make sure the name
is not empty, make sure the lists of VpcExpose objects are not empty,
and use the resulting validation function for each VpcManifest when
validating a VpcPeering object.
Add relevant enum variants to ApiError.
Fix some tests that would use manifests with empty VpcExpose lists.
Signed-off-by: Quentin Monnet <[email protected]>1 parent 3c58a05 commit 31b64ef
2 files changed
+68
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
142 | 142 | | |
143 | 143 | | |
144 | 144 | | |
145 | | - | |
146 | | - | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
147 | 159 | | |
148 | 160 | | |
149 | 161 | | |
150 | | - | |
151 | | - | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
152 | 176 | | |
153 | 177 | | |
154 | 178 | | |
155 | | - | |
156 | | - | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
157 | 193 | | |
158 | 194 | | |
159 | 195 | | |
160 | | - | |
161 | | - | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
162 | 210 | | |
163 | 211 | | |
164 | 212 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
40 | 39 | | |
41 | 40 | | |
42 | 41 | | |
| |||
233 | 232 | | |
234 | 233 | | |
235 | 234 | | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
236 | 244 | | |
237 | 245 | | |
238 | 246 | | |
| |||
253 | 261 | | |
254 | 262 | | |
255 | 263 | | |
| 264 | + | |
| 265 | + | |
256 | 266 | | |
257 | 267 | | |
258 | 268 | | |
| |||
315 | 325 | | |
316 | 326 | | |
317 | 327 | | |
318 | | - | |
| 328 | + | |
319 | 329 | | |
320 | 330 | | |
321 | 331 | | |
| |||
0 commit comments