devicetype-library/README.md

93 lines
3.1 KiB
Markdown
Raw Normal View History

2019-09-25 20:49:47 +02:00
# About this Library
2019-12-19 19:41:22 +01:00
This library is intended to be used for populating device types in [NetBox](https://github.com/netbox-community/netbox)
version 2.7 or later. It contains a set of device type definitions expressed in YAML and arranged by manufacturer. Each
file represents a discrete physical device type (e.g. make and model). These definitions can be loaded into NetBox to
obviate the need to create device types and their associated components manually.
2019-09-25 20:49:47 +02:00
2019-12-19 18:20:22 +01:00
If you would like to contribute to this library, please read through our [contributing guide](CONTRIBUTING.md) before
submitting content.
2019-12-11 20:05:11 +01:00
2019-09-25 20:49:47 +02:00
# Device Type Definitions
Each definition must include at minimum the following fields:
* `manufacturer`: The name of the manufacturer which produces this device type.
* `model`: The model number of the device type. This must be unique per manufacturer.
2019-12-19 18:20:22 +01:00
* `slug`: A URL-friendly representation of the model number. Like the model number, this must be unique per
manufacturer.
2019-09-25 20:49:47 +02:00
The following fields may optionally be declared:
* `part_number`: An alternative representation of the model number (e.g. a SKU).
* `u_height`: The height of the device type in rack units. (Default: 1)
2019-12-19 18:20:22 +01:00
* `is_full_depth`: A boolean which indicates whether the device type consumes both the front and rear rack faces.
(Default: true)
* `subdevice_role`: Indicates that this is a `parent` or `child` device. (Default: None)
2019-09-25 20:49:47 +02:00
2019-12-19 19:41:22 +01:00
For further detail on these attributes and those listed below, please reference the
[schema definition](tests/schema.json).
2019-09-25 20:49:47 +02:00
## Component Definitions
2019-12-19 18:20:22 +01:00
Valid component types are listed below. Each type of component must declare a list of the individual component templates
to be added.
2019-09-25 20:49:47 +02:00
2019-12-11 20:05:11 +01:00
* `console-ports`
* `console-server-ports`
* `power-ports`
* `power-outlets`
2019-09-25 20:49:47 +02:00
* `interfaces`
2019-12-11 20:05:11 +01:00
* `rear-ports`
* `front-ports`
* `device-bays`
2019-09-25 20:49:47 +02:00
The available fields for each type of component are listed below.
### Console Ports
* `name`: Port name
2019-12-19 19:41:22 +01:00
* `type`: Port type slug (API value)
2019-09-25 20:49:47 +02:00
### Console Server Ports
* `name`: Port name
2019-12-19 19:41:22 +01:00
* `type`: Port type slug (API value)
2019-09-25 20:49:47 +02:00
### Power Ports
* `name`: Port name
2019-12-19 19:41:22 +01:00
* `type`: Port type slug (API value)
2019-09-25 20:49:47 +02:00
* `maximum_draw`: The port's maximum power draw, in watts (optional)
* `allocated_draw`: The port's allocated power draw, in watts (optional)
2019-12-11 20:05:11 +01:00
### Power Outlets
2019-09-25 20:49:47 +02:00
* `name`: Outlet name
2019-12-19 19:41:22 +01:00
* `type`: Port type slug (API value)
2019-09-25 20:49:47 +02:00
* `power_port`: The name of the power port on the device which powers this outlet (optional)
2019-12-19 19:41:22 +01:00
* `feed_leg`: The phase (leg) of power to which this outlet is mapped; A, B, or C (optional)
2019-09-25 20:49:47 +02:00
### Interfaces
* `name`: Interface name
2019-12-19 19:41:22 +01:00
* `type`: Interface type slug (API value)
2019-09-25 20:49:47 +02:00
* `mgmt_only`: A boolean which indicates whether this interface is used for management purposes only (default: false)
2019-12-11 20:05:11 +01:00
### Front Ports
2019-09-25 20:49:47 +02:00
* `name`: Port name
2019-12-19 19:41:22 +01:00
* `type`: Port type slug (API value)
2019-12-11 20:05:11 +01:00
* `rear_port`: The name of the rear port on this device to which the front port maps
* `rear_port_position`: The corresponding position on the mapped rear port (default: 1)
2019-09-25 20:49:47 +02:00
2019-12-11 20:05:11 +01:00
### Rear Ports
2019-09-25 20:49:47 +02:00
* `name`: Port name
2019-12-19 19:41:22 +01:00
* `type`: Port type slug (API value)
2019-12-11 20:05:11 +01:00
* `positions`: The number of front ports that can map to this rear port (default: 1)
### Device Bays
* `name`: Bay name