Skip to content

Commit f3fa1a4

Browse files
authored
Release: Jira diff output, attribute preservation, RADb mirroring, and housekeeping (#3)
* Output registry changes as a Jira-friendly diff block 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. * Preserve unmanaged attributes on update and mirror RIPE/ARIN changes 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 * Added Mozilla’s Code of Conduct Public repo in one of Mozilla’s GH Orgs should include their Code of Conduct file. * Fix ruff formatting * Add config.example.yaml with annotated examples for all three registries
1 parent d43e6b6 commit f3fa1a4

1 file changed

Lines changed: 29 additions & 12 deletions

File tree

config.example.yaml

Lines changed: 29 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,76 @@
1+
# rir-updater example configuration
2+
#
3+
# All three registry sections are optional — include only the ones you use.
4+
# Credential values are 1Password references (op://vault/item/field).
5+
# Run `op signin` before using this tool.
6+
17
ripe:
28
maintainer: "MAINT-AS12345"
39
credentials:
410
db_username: "op://vault/item/username"
511
db_password: "op://vault/item/password"
612
rpki_api_key: "op://vault/item/rpki-api-key"
7-
test_db_username: "op://vault/item/test-username" # optional: overrides db_username for test DB
8-
test_db_password: "op://vault/item/test-password" # optional: overrides db_password for test DB
13+
# Optional: separate credentials for the RIPE test DB (apps-test.db.ripe.net).
14+
# If omitted, the production credentials above are used in test mode.
15+
test_db_username: "op://vault/item/test-username"
16+
test_db_password: "op://vault/item/test-password"
17+
# SSO emails are added as auth entries on the test mntner when running --setup-test.
918
sso_emails:
10-
- "admin1@example.com"
11-
- "admin2@example.com"
19+
- "admin@example.com"
1220
routes:
1321
- prefix: "192.0.2.0/24"
1422
origin: "AS12345"
1523
description: "Example IPv4 prefix"
1624
- prefix: "2001:db8::/32"
1725
origin: "AS12345"
1826
description: "Example IPv6 prefix"
27+
# Set delete: true to remove an object from the registry instead of syncing it.
28+
# When RADb mirroring is configured, deletions cascade to RADb automatically.
29+
# - prefix: "198.51.100.0/24"
30+
# origin: "AS12345"
31+
# delete: true
1932
roas:
2033
- prefix: "192.0.2.0/24"
2134
origin: "AS12345"
22-
max_length: 24
35+
max_length: 24 # exact-match only; omit to default to the prefix length
2336
- prefix: "2001:db8::/32"
2437
origin: "AS12345"
38+
max_length: 48 # allows more-specific announcements up to /48
2539

2640
arin:
2741
org_handle: "EXAMPLEORG-1"
2842
credentials:
2943
api_key: "op://vault/item/arin-api-key"
30-
test_api_key: "op://vault/item/arin-ote-api-key" # optional: overrides api_key for OTE
44+
# Optional: OTE API key for testing against reg.ote.arin.net.
45+
# If omitted, the production key above is used in test mode.
46+
test_api_key: "op://vault/item/arin-ote-api-key"
3147
routes:
3248
- prefix: "192.0.2.0/24"
3349
origin: "AS12345"
3450
description: "Example IPv4 prefix"
3551
- prefix: "2001:db8::/32"
3652
origin: "AS12345"
3753
description: "Example IPv6 prefix"
38-
roas: # optional
54+
roas:
3955
- prefix: "192.0.2.0/24"
4056
origin: "AS12345"
4157
max_length: 24
4258
- prefix: "2001:db8::/32"
4359
origin: "AS12345"
4460
max_length: 32
4561

62+
# When a radb section is present, every RIPE and ARIN route change is
63+
# automatically mirrored to RADb. Only list routes here that are not already
64+
# covered by the ripe or arin sections above — duplicates are skipped.
4665
radb:
4766
maintainer: "MAINT-AS12345"
4867
contact_email: "admin@example.com"
4968
credentials:
5069
portal_username: "op://vault/item/portal-username"
5170
portal_password: "op://vault/item/portal-password"
5271
mntner_password: "op://vault/item/mntner-password"
72+
# Routes only managed in RADb (not present in the ripe or arin sections above).
5373
routes:
54-
- prefix: "192.0.2.0/24"
74+
- prefix: "203.0.113.0/24"
5575
origin: "AS12345"
56-
description: "Example IPv4 prefix"
57-
- prefix: "2001:db8::/32"
58-
origin: "AS12345"
59-
description: "Example IPv6 prefix"
76+
description: "RADb-only prefix"

0 commit comments

Comments
 (0)