Commit db6bb9f
committed
feat(vpcpeering): Introduce validation for VpcPeeringTable
In previous commits, we introduced validation for VpcExpose and
VpcManifest objects; now, we need the same for a VpcPeeringTable.
We had checks for overlap between prefixes of a same VpcExpose, or
between prefixes of different VpcExpose within a VpcManifest object. It
turns out we also need to detect overlap between the prefixes of the
exposes from the manifests for a peering related to a given VPC and the
existing exposes from manifests from all other peerings in the
VpcPeeringTable object, when they relate to the same VPC.
To detect overlap, we reuse the dedicated function introduced in a
previous commit.
On the tests side:
- Add dedicated unit tests, and call the validation function.
- Fix some tests that would incorrectly reuse VpcExpose objects for
multiple peerings about the same VPC.
Signed-off-by: Quentin Monnet <[email protected]>1 parent c7f282b commit db6bb9f
File tree
3 files changed
+99
-14
lines changed- mgmt/src/models/external/overlay
3 files changed
+99
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
42 | 45 | | |
43 | 46 | | |
44 | 47 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
216 | 216 | | |
217 | 217 | | |
218 | 218 | | |
219 | | - | |
| 219 | + | |
220 | 220 | | |
221 | 221 | | |
222 | 222 | | |
223 | | - | |
| 223 | + | |
224 | 224 | | |
225 | 225 | | |
226 | 226 | | |
227 | 227 | | |
228 | 228 | | |
229 | 229 | | |
230 | 230 | | |
231 | | - | |
| 231 | + | |
232 | 232 | | |
233 | 233 | | |
234 | 234 | | |
235 | | - | |
| 235 | + | |
236 | 236 | | |
237 | 237 | | |
238 | 238 | | |
239 | 239 | | |
240 | 240 | | |
241 | | - | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
242 | 248 | | |
243 | 249 | | |
244 | 250 | | |
| |||
272 | 278 | | |
273 | 279 | | |
274 | 280 | | |
275 | | - | |
| 281 | + | |
276 | 282 | | |
277 | 283 | | |
278 | 284 | | |
279 | 285 | | |
280 | 286 | | |
281 | 287 | | |
282 | 288 | | |
283 | | - | |
| 289 | + | |
284 | 290 | | |
285 | 291 | | |
286 | 292 | | |
287 | 293 | | |
288 | 294 | | |
289 | 295 | | |
290 | 296 | | |
291 | | - | |
| 297 | + | |
292 | 298 | | |
293 | 299 | | |
294 | 300 | | |
295 | 301 | | |
296 | 302 | | |
297 | 303 | | |
298 | 304 | | |
299 | | - | |
| 305 | + | |
300 | 306 | | |
301 | 307 | | |
302 | 308 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
233 | 234 | | |
234 | 235 | | |
235 | 236 | | |
236 | | - | |
237 | | - | |
238 | 237 | | |
239 | 238 | | |
240 | 239 | | |
| |||
258 | 257 | | |
259 | 258 | | |
260 | 259 | | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
261 | 314 | | |
262 | 315 | | |
263 | 316 | | |
| |||
631 | 684 | | |
632 | 685 | | |
633 | 686 | | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
634 | 692 | | |
635 | | - | |
636 | | - | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
637 | 710 | | |
638 | 711 | | |
639 | 712 | | |
| |||
661 | 734 | | |
662 | 735 | | |
663 | 736 | | |
| 737 | + | |
| 738 | + | |
664 | 739 | | |
665 | 740 | | |
666 | | - | |
| 741 | + | |
| 742 | + | |
667 | 743 | | |
668 | 744 | | |
669 | 745 | | |
0 commit comments