|
| 1 | +# Contributing to mediacast-netcatalog |
| 2 | + |
| 3 | +Thanks for your interest. This project is **research-grade data + a Rust |
| 4 | +crate** maintained by [Mediacast Network Solutions](https://github.com/Mediacastnet). |
| 5 | +First production consumer is our own [NetCaster](https://github.com/Mediacastnet/netcaster); |
| 6 | +that biases what we accept, but the project is genuinely open and high-value |
| 7 | +contributions from outside the venue-network space are welcome. |
| 8 | + |
| 9 | +## What we want |
| 10 | + |
| 11 | +### Catalog contributions (highest value) |
| 12 | + |
| 13 | +- **New vendor catalogs**. Extreme, FortiSwitch, MikroTik, Brocade/RUCKUS, |
| 14 | + Dell EMC, Edgecore, Cumulus/SONiC. Aim for ≥80% of the 25 abstract command |
| 15 | + types. Cite vendor docs in the `sources:` block. |
| 16 | +- **Firmware-version drift entries** for vendors already covered. If you |
| 17 | + hit an output-format change between firmware revisions on a vendor we |
| 18 | + ship, send a PR adding a `versions:` block + sample output. |
| 19 | +- **Real-gear validation**. Take an entry marked `unverified: true`, run it |
| 20 | + against actual hardware, capture the real output, and PR a fix that |
| 21 | + removes the flag. |
| 22 | + |
| 23 | +### Crate contributions |
| 24 | + |
| 25 | +- **Probe protocol additions**. v0.1 stubs NETCONF/gNMI/RESTCONF/SSH; |
| 26 | + IPMI, ONIE, SONiC discovery would round it out. |
| 27 | +- **Version-matcher edge cases**. If your vendor's firmware string format |
| 28 | + doesn't parse cleanly, send a failing test + the fix. |
| 29 | +- **Performance**. Catalog loading is `O(files)`, lookup is `O(versions |
| 30 | + blocks)`. If you're driving high volume and have a profile, send a PR. |
| 31 | + |
| 32 | +### What we don't want |
| 33 | + |
| 34 | +- Drive-by formatting or rename PRs. |
| 35 | +- New abstract command types without a real-world consumer requesting them. |
| 36 | + The 25 we have were extracted from a working codebase; new ones need the |
| 37 | + same provenance. |
| 38 | +- Refactors that don't fix anything. |
| 39 | + |
| 40 | +## Catalog YAML conventions |
| 41 | + |
| 42 | +See `catalog/SCHEMA.md` for the full spec. Quick rules: |
| 43 | + |
| 44 | +- Every entry **must** cite its source. URL + access date in the |
| 45 | + `sources:` block, or per-version `notes:` if the source is the same as |
| 46 | + another entry. |
| 47 | +- `cli` is a single line. Multi-line composite commands (Junos `configure |
| 48 | + → set → commit`) use a multi-line YAML string with one CLI command per |
| 49 | + line. |
| 50 | +- `applies_to` is a SemVer-flavored range. See the schema doc for the |
| 51 | + recognized syntax. |
| 52 | +- For commands the vendor genuinely doesn't expose, set `cli: |
| 53 | + "NOT_SUPPORTED"` and document why in `notes`. |
| 54 | +- Mark `unverified: true` if the data was extracted from heuristic / |
| 55 | + community sources rather than vendor docs. |
| 56 | + |
| 57 | +## Development setup |
| 58 | + |
| 59 | +```bash |
| 60 | +git clone https://github.com/Mediacastnet/mediacast-netcatalog |
| 61 | +cd mediacast-netcatalog |
| 62 | + |
| 63 | +# Rust |
| 64 | +cargo test --no-default-features |
| 65 | +cargo run --example basic_lookup |
| 66 | + |
| 67 | +# Python bindings |
| 68 | +pip install "maturin>=1.5,<2.0" |
| 69 | +maturin develop --features python |
| 70 | +python -c "from mediacast_netcatalog import Catalog; print(Catalog.load_bundled().vendors())" |
| 71 | +``` |
| 72 | + |
| 73 | +## PR process |
| 74 | + |
| 75 | +1. Open an issue first for substantive changes (new vendor, schema |
| 76 | + change, breaking API). For obvious fixes, just send the PR. |
| 77 | +2. Run `cargo fmt`, `cargo clippy`, `cargo test`, and `yamllint catalog/` |
| 78 | + before submitting. |
| 79 | +3. Add an entry to `CHANGELOG.md` under `[Unreleased]`. |
| 80 | +4. CI must pass on Linux + macOS + Windows. |
| 81 | + |
| 82 | +## License |
| 83 | + |
| 84 | +By contributing, you agree your contribution is dual-licensed under |
| 85 | +MIT or Apache-2.0, matching the rest of the project. See `LICENSE-MIT` |
| 86 | +and `LICENSE-APACHE`. |
| 87 | + |
| 88 | +## Code of conduct |
| 89 | + |
| 90 | +Be kind. Disagree on technical merit, not on people. Maintainers will |
| 91 | +moderate at their discretion. |
0 commit comments