Commit 446b399
committed
ospf: route retransmit-interval and transmit-delay CLI through ietf-ospf YANG
Extends the per-interface CLI-through-YANG conversion already done for
cost / hello-interval / dead-interval / priority / mtu-ignore / passive to
the two remaining per-interface scalars that have RFC 9129 callbacks:
retransmit-interval and transmit-delay.
Commands converted on each daemon:
v2: ip ospf retransmit-interval / no ip ospf retransmit-interval +
the hidden `ospf retransmit-interval` / `no ospf retransmit-interval`
backwards-compat aliases
ip ospf transmit-delay / no ip ospf transmit-delay + the matching
hidden `ospf transmit-delay` / `no ospf transmit-delay` aliases
v3: ipv6 ospf6 retransmit-interval / no ipv6 ospf6 retransmit-interval
ipv6 ospf6 transmit-delay / no ipv6 ospf6 transmit-delay
Conversion pattern (matches the cost / hello / dead / priority / mtu-ignore
/ passive slice):
* v2 commands take an optional `[A.B.C.D]` per-address override that
has no RFC 9129 representation. Each DEFPY_YANG body checks
`if (!ifaddr_str && per_iface_xpath returns 0)` and dispatches
through nb_cli_enqueue_change / nb_cli_apply_changes; on the
negative path it falls back to the legacy direct-mutation logic,
preserving the per-address-override capability for operators that
need it.
* The YANG path also requires the interface to be in an area
(if_area on IF_DEF_PARAMS). Operators setting per-interface attrs
on an unattached interface continue to use the legacy path -- the
YANG model can't express "interface params before area assignment"
because the leaves live under areas/area[id]/interfaces.
* Per-leaf bodies factor into small `_set_apply` / `_unset_apply`
helpers shared by the main `ip ospf X` form and the hidden
backwards-compat `ospf X` alias (v2 only).
* v3 collapses the legacy DEFUN+ALIAS pair into two DEFPY_YANG forms
(one for set, one for `no`), each guarded by `ospf6_per_iface_xpath`
before falling back to direct ospf6_interface mutation.
Topotest: extends `test_ospf_per_iface_cli_routes_through_yang` to drive
`ip ospf retransmit-interval 23` + `ip ospf transmit-delay 31` (and v3
equivalents) on r1-eth1 alongside the previously-covered six leaves,
verifies each lands in `show running-config <daemon>`, then unwinds via
`no` and verifies absence. The `b3b` and `transmit-delay` focused
mgmtd-write tests continue to cover the YANG-side of the round-trip.
Doc: no change. The converted-leaves paragraph already lists
retransmit-interval and transmit-delay; the "Existing CLI commands for
those leaves set the same YANG nodes as mgmtd writes" sentence now
becomes accurate for these two.
Signed-off-by: Eric Parsonage <eric@eparsonage.com>1 parent f150c86 commit 446b399
3 files changed
Lines changed: 223 additions & 117 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2494 | 2494 | | |
2495 | 2495 | | |
2496 | 2496 | | |
2497 | | - | |
| 2497 | + | |
2498 | 2498 | | |
2499 | | - | |
| 2499 | + | |
2500 | 2500 | | |
2501 | 2501 | | |
2502 | 2502 | | |
2503 | 2503 | | |
2504 | 2504 | | |
2505 | 2505 | | |
2506 | | - | |
2507 | 2506 | | |
| 2507 | + | |
| 2508 | + | |
2508 | 2509 | | |
| 2510 | + | |
| 2511 | + | |
| 2512 | + | |
| 2513 | + | |
| 2514 | + | |
2509 | 2515 | | |
2510 | 2516 | | |
2511 | 2517 | | |
2512 | 2518 | | |
2513 | 2519 | | |
2514 | | - | |
2515 | | - | |
2516 | | - | |
2517 | | - | |
| 2520 | + | |
2518 | 2521 | | |
2519 | 2522 | | |
2520 | 2523 | | |
2521 | | - | |
| 2524 | + | |
2522 | 2525 | | |
2523 | 2526 | | |
2524 | 2527 | | |
2525 | 2528 | | |
2526 | 2529 | | |
2527 | 2530 | | |
2528 | 2531 | | |
| 2532 | + | |
| 2533 | + | |
| 2534 | + | |
| 2535 | + | |
| 2536 | + | |
| 2537 | + | |
| 2538 | + | |
| 2539 | + | |
| 2540 | + | |
| 2541 | + | |
| 2542 | + | |
| 2543 | + | |
| 2544 | + | |
| 2545 | + | |
| 2546 | + | |
| 2547 | + | |
| 2548 | + | |
| 2549 | + | |
| 2550 | + | |
2529 | 2551 | | |
2530 | 2552 | | |
2531 | | - | |
| 2553 | + | |
2532 | 2554 | | |
2533 | | - | |
| 2555 | + | |
2534 | 2556 | | |
2535 | 2557 | | |
2536 | 2558 | | |
2537 | 2559 | | |
2538 | 2560 | | |
2539 | 2561 | | |
2540 | | - | |
2541 | 2562 | | |
| 2563 | + | |
| 2564 | + | |
2542 | 2565 | | |
| 2566 | + | |
| 2567 | + | |
| 2568 | + | |
| 2569 | + | |
| 2570 | + | |
2543 | 2571 | | |
2544 | 2572 | | |
2545 | 2573 | | |
2546 | 2574 | | |
2547 | 2575 | | |
2548 | | - | |
2549 | | - | |
2550 | | - | |
2551 | | - | |
| 2576 | + | |
2552 | 2577 | | |
2553 | 2578 | | |
2554 | 2579 | | |
2555 | | - | |
| 2580 | + | |
2556 | 2581 | | |
2557 | 2582 | | |
2558 | 2583 | | |
2559 | 2584 | | |
2560 | 2585 | | |
2561 | 2586 | | |
2562 | 2587 | | |
| 2588 | + | |
| 2589 | + | |
| 2590 | + | |
| 2591 | + | |
| 2592 | + | |
| 2593 | + | |
| 2594 | + | |
| 2595 | + | |
| 2596 | + | |
| 2597 | + | |
| 2598 | + | |
| 2599 | + | |
| 2600 | + | |
| 2601 | + | |
| 2602 | + | |
| 2603 | + | |
| 2604 | + | |
| 2605 | + | |
| 2606 | + | |
2563 | 2607 | | |
2564 | 2608 | | |
2565 | 2609 | | |
| |||
0 commit comments