Skip to content

feat: regenerate ingester.py for NetBox 4.6 support#91

Merged
mfiedorowicz merged 3 commits into
developfrom
feat/netbox-4.6-support
May 19, 2026
Merged

feat: regenerate ingester.py for NetBox 4.6 support#91
mfiedorowicz merged 3 commits into
developfrom
feat/netbox-4.6-support

Conversation

@leoparente
Copy link
Copy Markdown
Contributor

@leoparente leoparente commented May 14, 2026

Summary

Regenerates netboxlabs/diode/sdk/ingester.py against a live NetBox 4.6.0 install.

What's new

Builder-class support for four new NetBox 4.6 entity types:

  • VirtualMachineType
  • CableBundle
  • RackGroup
  • ScriptModule

Plus new flat-FK fields on existing classes:

  • VirtualMachine.virtual_machine_type
  • Cable.bundle
  • Rack.group

The Entity union gains the four new variants.

Wire-compatibility

Preserved at the proto layer (see diode #528). Existing field numbers unchanged; refactored GFK oneof members marked [deprecated = true] in the underlying proto. Existing Python builders for the legacy shapes continue to work.

Related PRs

🤖 Generated with Claude Code

Regenerated builder classes from diode-drf-extract PR #49 against a
live NetBox 4.6.0 install. Adds Python SDK support for the four new
NetBox 4.6 entity types — VirtualMachineType, CableBundle, RackGroup,
ScriptModule — and the new flat-FK fields virtual_machine_type on
VirtualMachine, bundle on Cable, group on Rack.

Wire-compat is preserved at the proto layer (existing field numbers
unchanged; refactored GFK oneof members get [deprecated = true]
annotations in the underlying proto). Consumers using only the older
shape continue to work.

References the proto update in diode PR #528.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Follow-up to 20c97d0 (regenerated ingester.py). Adds:

- `netboxlabs/diode/sdk/diode/v1/ingester_pb2.py`, `.pyi`, and
  `_grpc.py` regenerated via `buf generate --template
  buf.gen.sdk.py.yaml` from diode PR #528's updated proto, so
  `ingester_pb2.CableBundle`, `RackGroup`, `VirtualMachineType`, and
  `ScriptModule` are defined and `tests/test_ingester.py` /
  `tests/test_client.py` resolve their imports cleanly.
- `docs/README.md` and `docs/examples/{cable_bundle,rack_group,
  script_module,virtual_machine_type}.py` propagated from
  diode-drf-extract `output/docs/python/`.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added Documentation Improvements or additions to documentation markdown labels May 14, 2026
Follow-up to 45003ee. The bindings regenerated via
`buf generate --template buf.gen.sdk.py.yaml` use top-level Python
import paths:

  from validate import validate_pb2 ...
  from diode.v1 import ingester_pb2 ...

…but the SDK ships the validate bindings at
`netboxlabs.diode.sdk.validate` and the ingester bindings at
`netboxlabs.diode.sdk.diode.v1` (the prior bindings already used these
fully-qualified paths). Without the rewrite, import-time fails with
`ModuleNotFoundError: No module named 'validate'` and the entire test
suite errors out during collection.

Rewrites the two affected import lines in:
- `netboxlabs/diode/sdk/diode/v1/ingester_pb2.py`
- `netboxlabs/diode/sdk/diode/v1/ingester_pb2.pyi`
- `netboxlabs/diode/sdk/diode/v1/ingester_pb2_grpc.py`

Verified locally: `pytest tests/` reports 185 passed.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 14, 2026

Coverage

Coverage Report
FileStmtsMissCoverMissing
/opt/hostedtoolcache/Python/3.10.20/x64/lib/python3.10/site-packages/netboxlabs/diode/sdk
   chunking.py33197%112
   client.py5094092%165–166, 185–187, 190–193, 482, 548, 553, 557, 643–648, 693–695, 700, 705, 710, 715, 725, 729, 733, 755, 776, 778, 852, 883, 891, 933, 969, 984–985, 992–993
   exceptions.py44393%69, 82–83
TOTAL6014493% 

Tests Skipped Failures Errors Time
185 0 💤 0 ❌ 0 🔥 2.311s ⏱️

@leoparente leoparente marked this pull request as ready for review May 18, 2026 14:00
@mfiedorowicz mfiedorowicz merged commit 4429e38 into develop May 19, 2026
6 checks passed
@mfiedorowicz mfiedorowicz deleted the feat/netbox-4.6-support branch May 19, 2026 08:59
@github-actions
Copy link
Copy Markdown

🎉 This PR is included in version 1.12.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Documentation Improvements or additions to documentation markdown python released

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants