Function Code¶
The Function Code model represents an operational classification for network devices, such as WAN, ACC, COR, or DIS.
Fields¶
| Field | Description |
|---|---|
| Name | Human-readable name (unique) |
| Slug | URL-safe unique identifier and natural key |
| Description | Optional long-form description |
| Active | Whether the code can be assigned to new devices |
| Created | Timestamp when the record was created |
| Last Updated | Timestamp when the record was last modified |
Device Assignment¶
Devices are linked to Function Codes through the internal DeviceFunctionCodeAssignment model. Each device may have at most one Function Code assigned.
Manage assignments from the plugin UI:
- Function Code detail → Assign Devices to assign many devices to that Function Code
- Function Codes → Device Assignments → Add for the same bulk workflow with Function Code selected on the form
- Function Codes → Device Assignments to list, edit, bulk edit, or delete existing assignments
- Function Code detail → Assigned Devices panel to review current links
- Device detail → Function Code panel to view or update the assignment
- Function Codes → Coverage for assignment statistics by Function Code, device status, location, and role
- Function Codes → Import Assignments for synchronous CSV import, template download, and current assignment export
- Function Codes → Clear Assignments to remove assignments from selected devices
The /api/plugins/function-codes/device-assignments/ API endpoint is available for automation.
CSV Import Format¶
Use the device name or UUID. Leave function_code empty to clear an assignment. Inactive Function Codes cannot be assigned.