RIR Configs¶
An RIR Config binds the plugin to a specific RIR account. It is the parent object every other plugin model hangs off of: user keys, synced organisations and contacts, networks, customers, sync logs, tickets, and the scheduled sync job all point at one RIRConfig.
Fields¶
| Field | Type | Description |
|---|---|---|
rir |
FK to ipam.RIR |
The NetBox RIR this config targets. Required. Combined with name for uniqueness. |
name |
string (max 100) | Free-form label, e.g. production-arin or ote. Unique per RIR. |
api_url |
URL (lenient) | Override the backend's default endpoint. Leave blank to use the backend's built-in URL. Hostnames without a TLD (e.g. http://reg-mock:8080/) are accepted. |
org_handle |
string (max 50) | Your account's primary org handle at the RIR (e.g. EXAMPLE-1 for ARIN). The sync fetches this org and links an aggregate only to a Net registered to it. |
is_active |
boolean | The scheduled sync only iterates active configs, and automatic reassignment and removal only apply under an active config. Inactive configs remain editable. |
default_key |
FK to RIRUserKey |
Optional. The key used for work no user initiated, such as the scheduled sync. Must be one of this config's keys, owned by an active user. See User API Keys. |
last_sync |
datetime | Stamped by sync_rir_config on completion. Read-only. |
The model also inherits tags, created, and last_updated from NetBoxModel, and tracks asynchronous jobs via the JobsMixin (visible on the Jobs tab of the detail view).
Creating a config¶
- Go to RIR Manager > Configs and click Add.
- Pick the RIR.
- Set a name unique within that RIR.
- Optional: set
api_urlto point at a non-production endpoint (ARIN OT&E ishttps://reg.ote.arin.net/regrws/). - Set
org_handle. Most operations need this -- ARIN'sauthenticate()short-circuits toFalseif it is empty. - Save.
If your resources are registered under more than one org handle at the same RIR (for example a legacy org kept alongside your current one), create one config per org handle. Aggregate sync links each aggregate only to a Net registered to the config's own org, so the configs do not overlap. See Syncing Resources.
Bulk operations¶
The list view supports the standard NetBox bulk actions plus one custom action:
- Add: standard create form.
- Import: CSV import via
RIRConfigImportForm. Fields:rir(looked up by name),name,api_url,org_handle,is_active. - Edit: bulk-edit
rir,api_url,org_handle, andis_active. - Sync Selected: enqueue a
SyncRIRConfigJobfor every selected config the user'sadd_rirconfigpermission covers. Configs without a user key for the requesting user are skipped with a warning. See Syncing Resources. - Delete: standard bulk delete. Cascades through every dependent plugin model.
What happens when a config is deleted¶
RIRConfig is the parent of every other plugin model that holds RIR data. Deleting it cascades through:
RIRUserKey(per-user credentials)RIROrganization,RIRContact,RIRNetwork,RIRCustomerRIRSyncLog,RIRTicket
The corresponding ipam.Aggregate and ipam.Prefix rows are unaffected -- the foreign key from RIRNetwork to those is SET_NULL.
REST API¶
GET /api/plugins/rir-manager/configs/
POST /api/plugins/rir-manager/configs/
GET /api/plugins/rir-manager/configs/{id}/
PATCH /api/plugins/rir-manager/configs/{id}/
DELETE /api/plugins/rir-manager/configs/{id}/
See the REST API reference for filtering and pagination.
Related¶
- User API Keys -- attach a credential to a config.
- Syncing Resources -- run a sync against a config.
- Reference: Models -- full model field listing.