Add BGP peer and route flap control operations - #485
Conversation
- action.protocol.bgp.peer.flap: flap BGP peer sessions on the fly - state.protocol.route.flap: flap routes (generic - BGP/ISIS/OSPF) on the fly Both are enable/up_time/down_time toggles, marked x-status under_review. Regenerate artifacts (openapi.yaml, otg.proto). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
@apratimmukherjee @sasubrata this implements #484 — on-the-fly flap for BGP peers and routes. I've raised it as a proposal and I'm happy to adjust the modeling to fit the project's conventions. Could you take a look or assign a reviewer when you have a chance? Thanks! |
|
@atul-nexthop Thanks for raising this — appreciate the initiative on both the issue and the PR. I want to check this against a related ask: I was forwarded an email thread describing a need to not auto-advertise routes on session up, and instead control route transmission (and flapping) explicitly from the test. Could you clarify whether this PR is: An additional requirement — i.e., flap control exposed via the API itself, rather than driven from test code (e.g., a loop issuing adv/withdraw), or |
@apratimmukherjee Thank you for your quick response. This is separate task from the one raised via support team.
Please let me know if this makes sense. |
Route flap was modeled on the generic State.Protocol.Route, but only BGP route ranges support flapping in IxNetwork (ISIS/OSPF route ranges have no flap fields, only a static Active flag). Move route flap to a BGP-scoped action so the schema only advertises what the backend can honor. - Remove flap from generic State.Protocol.Route (keeps names + state, honored by BGP/ISIS/OSPF via Active). - Add action.protocol.bgp.route.flap alongside action.protocol.bgp.peer.flap. - Add route-range flap fields confirmed in restpy: delay, partial_flap, flap_from_route_index, flap_to_route_index (plus enable/up_time/down_time). Regenerate artifacts (openapi.yaml, otg.proto). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Addresses #484
What this adds
On-the-fly flap operations (start/stop while the session is up, no config change), per the requirements in #484:
action.protocol.bgp.peer.flap— flap BGP peer sessions.action.protocol.bgp.route.flap— flap BGP route ranges.Design
Flapping is only supported on BGP peers and route ranges in IxNetwork; ISIS/OSPF route ranges have no flap fields (only a static
Activeflag). So both flap operations are modeled BGP-scoped underAction.Protocol.Bgp, alongsidenotificationandinitiate_graceful_restart:Action.Protocol.Bgp.Peer.Flap—peer_names(BGP peers),enable,up_time,down_time.Action.Protocol.Bgp.Route.Flap—route_names(BGP v4/v6 route ranges),enable,up_time,down_time, plus the extra route-range controls IxNetwork exposes:delay— delay (seconds) before flapping begins.partial_flap— flap only a subset of the routes within each range.flap_from_route_index/flap_to_route_index— inclusive index window for the subset whenpartial_flapis enabled.Flap is a triggered operation with timing, which fits the action scope per
control/readme.md(states are representable purely by enums; actions are triggers).x-field-uids are appended so existing fields are untouched. Both new operations are markedx-status: under_review.Note on scope (changed from the earlier revision of this PR)
Route flap was initially placed on the generic
State.Protocol.Route(cross-protocol via itsx-constraint). That advertised a flap capability for ISIS/OSPF that the backend can't honor, and the extra fields (partial_flap,flap_from/to_route_index) are BGP-route-range specific. It has been moved toaction.protocol.bgp.route.flapand removed fromState.Protocol.Route(which keepsnames+statewithdraw/advertise, honored by BGP/ISIS/OSPF viaActive).Files
control/bgp.yaml,control/protocol.yaml(source)artifacts/openapi.yaml,artifacts/otg.proto(regenerated viabuild.py)Testing
python build.pypasses (openapiart validation green).