Use bgpkit-parser v0.20.0 upstream text dump module - #150
Merged
Conversation
Replace Monocle's 783-line local Cisco sh ip bgp implementation with a re-export of bgpkit_parser::parser::text_dump. Public monocle paths are unchanged; the parser now carries the text dump test coverage. Adapt MRT export call sites to the fallible encoding API (issue #313): export_bytes now returns Result<Bytes, EncodingError> and MrtRibEncoder process_elem returns Result; encoding failures are reported instead of silently truncating.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
bgpkit-parser0.19.0 → 0.20.0 and replace Monocle's local 783-line Ciscosh ip bgptext dump implementation (src/lens/parse/text_dump.rs) with a re-export of the upstreambgpkit_parser::parser::text_dumpmodule. Allmonocle::lens::parse::text_dump::*call sites keep working unchanged; the parser now carries the text dump test coverage (17 tests).monocle parse,monocle search) to bgpkit-parser v0.20.0's fallible encoding API (upstream issue #313):export_bytes()returnsResult<Bytes, EncodingError>andMrtRibEncoder::process_elemreturnsResult; encoding failures are reported instead of silently truncating.Verification
cargo fmtclean;cargo clippy --all-features -- -D warningsclean (only pre-existingproc-macro-error2future-incompat note)cargo test --all-features: 304 tests passed (279 lib + 15 parse + 1 + 9), 0 failed, 29 ignoredmonocle parseon a synthetic PCH-stylesh ip bgpdump produces correctBgpElemJSON (1.33.0.0/24, AS path[4657, 9318], router ID →peer_ip, local AS →peer_asn) via the re-export chainCloses the follow-up from the v0.20.0 parser release: single text dump implementation, no fork.