Commit 65ccdd3
committed
fix(nautobot_device_sync): handle uninspected nodes gracefully
- Remove baremetal.node.create.end from event handlers since newly
created nodes lack inventory and location data needed for Nautobot
- Catch NotFound exception when fetching inventory for nodes that
haven't been inspected yet
- Skip placeholder "None" string in switch_info (set by port_bios_name_hook
for Neutron compatibility)
- Return failure with info log when no location available instead of
error, as inspection event will trigger proper sync later
Nodes will now sync to Nautobot on provision_set.end (after inspection)
or update.end events when full data is available.1 parent 7e678a1 commit 65ccdd3
File tree
3 files changed
+21
-7
lines changed- python/understack-workflows
- tests
- understack_workflows
- main
- oslo_event
3 files changed
+21
-7
lines changedLines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
527 | 527 | | |
528 | 528 | | |
529 | 529 | | |
530 | | - | |
| 530 | + | |
531 | 531 | | |
532 | 532 | | |
| 533 | + | |
533 | 534 | | |
534 | 535 | | |
535 | 536 | | |
536 | 537 | | |
537 | 538 | | |
538 | 539 | | |
539 | 540 | | |
| 541 | + | |
540 | 542 | | |
| 543 | + | |
| 544 | + | |
541 | 545 | | |
542 | 546 | | |
543 | 547 | | |
| |||
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
76 | 75 | | |
77 | 76 | | |
78 | 77 | | |
| |||
Lines changed: 16 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
231 | 232 | | |
232 | 233 | | |
233 | 234 | | |
234 | | - | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
235 | 243 | | |
236 | 244 | | |
237 | 245 | | |
| |||
405 | 413 | | |
406 | 414 | | |
407 | 415 | | |
408 | | - | |
| 416 | + | |
409 | 417 | | |
410 | 418 | | |
411 | 419 | | |
| |||
441 | 449 | | |
442 | 450 | | |
443 | 451 | | |
444 | | - | |
| 452 | + | |
| 453 | + | |
445 | 454 | | |
446 | | - | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
447 | 459 | | |
448 | 460 | | |
449 | 461 | | |
| |||
504 | 516 | | |
505 | 517 | | |
506 | 518 | | |
507 | | - | |
508 | 519 | | |
509 | 520 | | |
510 | 521 | | |
| |||
0 commit comments