A virtual chassis represents a set of physical devices with a shared control plane; for example, a stack of switches managed as a single device. Viewing the master device of a virtual chassis will show all member interfaces and IP addresses.
Interfaces can now be assigned an 802.1Q mode (access or trunked) and associated with particular VLANs. Thanks to John Anderson for his work on this!
The REST API now supports the creation of multiple objects of the same type using a single POST request. For example, to create multiple devices:
curl -X POST -H "Authorization: Token <TOKEN>" -H "Content-Type: application/json" -H "Accept: application/json; indent=4" http://localhost:8000/api/dcim/devices/ --data '[
{"name": "device1", "device_type": 24, "device_role": 17, "site": 6},
{"name": "device2", "device_type": 24, "device_role": 17, "site": 6},
{"name": "device3", "device_type": 24, "device_role": 17, "site": 6},
]'
Bulk creation is all-or-none: If any of the creations fails, the entire operation is rolled back.
Similar to IP addresses, NetBox now supports automated provisioning of available prefixes from within a parent prefix. For example, to retrieve the next three available /28s within a parent /24:
curl -X POST -H "Authorization: Token <TOKEN>" -H "Content-Type: application/json" -H "Accept: application/json; indent=4" http://localhost:8000/api/ipam/prefixes/10153/available-prefixes/ --data '[
{"prefix_length": 28},
{"prefix_length": 28},
{"prefix_length": 28}
]'
If the parent prefix cannot accommodate all requested prefixes, the operation is cancelled and no new prefixes are created.
Device components (interfaces, console ports, etc.) can now be renamed in bulk via the web interface. This was implemented primarily to support the bulk renumbering of interfaces whose parent is part of a virtual chassis.
time_zone field to the site modelcreated and last_updated fields for relevant models to their API serializersstatus field to the site modeldescription field to the site modelstatus field to the circuit model* New since v2.3-beta2
STATUS_ACTIVE is now DEVICE_STATUS_ACTIVE). Custom validation reports will need to be updated if they reference any of these constants.created and last_updated fields for objects inheriting from CreatedUpdatedModel.parent filter for prefixes (use within or within_include instead).status, time_zone (pytz format), and description fields to dcim.Site.manufacturer foreign key field on dcim.Platform.status field on circuits.Circuit.<class 'ValueError'>
Cannot use None as a query value