Skip to content

Attribute preservation, RADb mirroring, and Jira diff output#2

Merged
VegasNative merged 4 commits into
mainfrom
develop
Apr 28, 2026
Merged

Attribute preservation, RADb mirroring, and Jira diff output#2
VegasNative merged 4 commits into
mainfrom
develop

Conversation

@VegasNative
Copy link
Copy Markdown
Collaborator

Summary

  • Jira-friendly output: Changes are printed as a {code:diff} block with +/-/ prefixes per route, ready to paste into a Jira issue comment
  • Attribute preservation on update: Existing unmanaged attributes (remarks, admin-c, tech-c, etc.) are preserved when updating route objects in RIPE, ARIN, and RADb — only managed fields are overwritten
  • Automatic RADb mirroring: When a radb section is present in the config, every RIPE and ARIN route change (create, update, or delete) cascades to RADb automatically; explicit RADb routes that were already mirrored are skipped
  • delete: true support for RIPE: Route objects can now be declaratively deleted from RIPE (ARIN already supported this); deletions mirror to RADb when mirroring is configured
  • delete_route() added to all three clients (RIPE, ARIN, RADb)
  • Code of Conduct: Added CODE_OF_CONDUCT.md per Mozilla open-source requirements

Test plan

  • All 87 unit tests pass (uv run pytest)
  • Ruff lint passes (uv run ruff check .)
  • Dry-run against RIPE test / ARIN OTE to verify diff output format
  • Verify attribute preservation by inspecting an existing route object before and after update
  • Verify RADb mirroring by running with both RIPE and RADb sections configured

Replaces per-route print statements with a Summary collector that emits a
{code:diff} block at the end of each run. Created routes render green (+),
deleted routes render red (-), and updated routes appear as neutral context
lines. Dry-run mode is indicated in the header and uses the same prefixes
to show what would change.

Client dry-run return values are now 'dry-run-create', 'dry-run-update',
and 'dry-run-delete' so callers can distinguish the intended operation.
…to RADb

- Replace exists-check with full fetch on update so existing unmanaged attributes
  (remarks, admin-c, tech-c, etc.) are preserved in PUT/update payloads
- Add delete_route() to RIPE, ARIN, and RADb clients
- Mirror every RIPE and ARIN route change (create/update/delete) to RADb
  automatically when a radb section is present in the config
- Skip RADb-only routes that were already mirrored to avoid double-syncing
- Document delete:true flag, automatic mirroring, and attribute preservation in README
Public repo in one of Mozilla’s GH Orgs should include their Code of Conduct file.
@VegasNative VegasNative merged commit d43e6b6 into main Apr 28, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant