A collection of community-sourced DeviceType definitions for import to NetBox
Go to file
Alex Tremblay 3343bdeaa1
Add and fix several Cisco and H3C devices (#1176)
* Update WS-C3750G-12S-E.yaml

* Update WS-C3750G-12S-S.yaml

* add missing cisco switch WS-C3650-48FQM-S

* add missing devices from our environment

* fixup

* model rename for HPE A5120 switches

* replaced power-port definitions with module-bay definitions on WS-3650-48FQM models

* add/fix weight values arcording to updated schema

* add power supply modules for WS-C3650-48FQM devices

* add "cisco-" prefix to all cisco device types

* fix duplicate entry issues in cisco and huawei devices

* fix invalid powerport type in cisco power module

* fix type schema validation error in UBR10012 device

* re-add YAML document start markers to all cisco device type files

* Update ASR-920-12CZ-A.yaml

Fix spacing issues

* Update ASR-920-12CZ-D.yaml

Fixed comment, removed extra newline.

* Update ASR-920-12SZ-D.yaml

Fixed comment, removed extra newline.

* Update ASR-920-4SZ-A.yaml

Fixed comment, removed extra newline.

* Update ASR-920-24SZ-M.yaml

Fixed comment, removed extra newline.

* Update SPA112.yaml

Fixed comments. Unnecessary newline removed.

* Update N540-ACC-SYS.yaml

Fixed description. Unnecessary newline removed.

* Update WS-C3750X-48P-S.yaml

Fixed comments. Unnecessary newline removed.

* Update Meraki-MS220-24P.yaml

Reverted description newlines

* Update PWR-C2-1025WAC.yaml

* Update PWR-C2-250WAC.yaml

* Update PWR-C2-640WAC.yaml

* Update PWR-C2-640WDC.yaml

* Update S3100-8TP-PWR-EI.yaml

Removed non-manufacturer datasheet comment

* Update HP-5120-48G-POE-4SFP-EI.yaml

Fixed model/slug

* Update HP-5120-24G-POE-4SFP-EI.yaml

* Update HP-5120-48G-POE-4SFP-EI.yaml

* Update HP-5120-48G-PoEP-EI.yaml

* Update HP-5120-24G-PoEP-EI.yaml

* Update HP-5120-48G-PoEP-EI.yaml

* Update HP-5120-24G-PoEP-EI.yaml

* all C3850 models have dual independant PSU bays

* add PSU modules for C3850 and C3750X model switches

* all C3750X models have dual independant PSU bays

* typo fix

* C3650-##FQM series are the only fixed PSU models in the C3650 line

* All C3650 switches (except minis) have two modular PSU slots

* Update WS-C3850-48XS-E.yaml

Added weight, modular PSUs and modular FANs

* Update WS-C3850-48XS-E.yaml

* Update WS-C3850-48XS-E.yaml

Removed network module since according to datasheet and pictures the 3850-48XS-E does not have a swappable module bay

* Update WS-C3850-48XS-E.yaml

* Added position attribute to newly created PSU module-bays

* Added redundant power supplies

* Moving console, power and module bays up

* added weight to new files

* Added positions to PSU module bays

* rearranged module bays

---------

Co-authored-by: Daniel W. Anner <daniel.anner@danstechsupport.com>
2023-03-13 14:04:12 -04:00
.github Adding dependabot & updating reqirements (#1026) 2023-01-05 11:27:38 -05:00
device-types Add and fix several Cisco and H3C devices (#1176) 2023-03-13 14:04:12 -04:00
module-types Add and fix several Cisco and H3C devices (#1176) 2023-03-13 14:04:12 -04:00
schema Implementation of IEEE 802.3az (#1165) 2023-03-13 12:40:28 -04:00
tests Fix float validation using decimal.Decimal (#1073) 2023-01-31 09:42:16 -05:00
.gitignore #979 @basictheprogramm synology ds418 fix (#1025) 2023-01-04 15:37:12 -05:00
.pre-commit-config.yaml Adding dependabot & updating reqirements (#1026) 2023-01-05 11:27:38 -05:00
.yamllint.yaml Fix pre-commit and update CI (#875) 2022-08-10 22:29:59 -04:00
CONTRIBUTING.md Update CONTRIBUTING.md 2022-09-15 21:08:41 -05:00
LICENSE.txt YAML Formatting & Validation (#347) 2021-02-27 07:25:47 -05:00
README.md Weight Import Fix (#1187) 2023-03-09 10:49:38 -05:00
requirements.txt Bump pre-commit from 3.0.2 to 3.1.1 (#1159) 2023-03-01 12:37:40 -05:00

NetBox Device Type Library

About this Library

This library is intended to be used for populating device types in NetBox. 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 instead of creating new device type definitions manually.

If you would like to contribute to this library, please read through our contributing guide before submitting content.

Note: As of March 2023 Netbox-Device-Type-Library-Import has been brought into the NetBox Community Organization. We will work to get this fully supported soon. If you would like to automate the import of these devicetype template files, there is a NetBox Community community based python script that will check for duplicates, allow you to selectively import vendors, etc. available here netbox-community/Device-Type-Library-Import. Note: This is not related to NetBox in any official way and you will not get support for it here.

Device Type Definitions

Each definition must include at minimum the following fields:

  • manufacturer: The name of the manufacturer which produces this device type.
    • Type: String
  • model: The model number of the device type. This must be unique per manufacturer.
    • Type: String
  • slug: A URL-friendly representation of the model number. Like the model number, this must be unique per manufacturer.
    • Type: String
    • Pattern: "^[-a-zA-Z0-9_]+$". Must match the following characters: -, _, Uppercase or Lowercase a to z, Numbers 0 to 9.

🧪 Valid Example:

manufacturer: Dell
model: PowerEdge R6515
slug: dell-poweredge-r6515

The following fields may optionally be declared:

  • part_number: An alternative representation of the model number (e.g. a SKU). (Default: None)
    • Type: String

🧪 Example: part_number: D109-C3

  • u_height: The height of the device type in rack units. Increments of 0.5U are supported. (Default: 1)
    • Type: number (minimum of 0, multiple of 0.5)

🧪 Example: u_height: 12.5

  • is_full_depth: A boolean which indicates whether the device type consumes both the front and rear rack faces. (Default: true)
    • Type: Boolean

🧪 Example: is_full_depth: false

  • airflow: A decleration of the airflow pattern for the device. (Default: None)
    • Type: String
    • Options:
      • front-to-rear
      • rear-to-front
      • left-to-right
      • right-to-left
      • side-to-rear
      • passive

🧪 Example: airflow: side-to-rear

  • subdevice_role: Indicates that this is a parent or child device. (Default: None)
    • Type: String
    • Options:
      • parent
      • child

🧪 Example: subdevice_role: parent

  • comments: A string field which allows for comments to be added to the device. (Default: None)
    • Type: String

🧪 Example: comments: This is a comment that will appear on all NetBox devices of this type

  • weight: A number representing the numeric weight value. Must be a multiple of 0.01 (2 decimal places). (Default: None)
    • Type: Number
    • Value: must be a multiple of 0.01
  • weight_unit: A string defining the unit of measurement. It must be one of the supported values. (Default: None)
    • Type: String
    • Value: Enumerated Options
      • kg
      • g
      • lb
      • oz

🧪 Example:

weight: 12.21
weight_unit: lb

For further detail on these attributes and those listed below, please reference the schema definitions and the Component Definitions below.

Component Definitions

Valid component types are listed below. Each type of component must declare a list of the individual component templates to be added.

The available fields for each type of component are listed below.

Console Ports

  • name: Name
  • label: Label
  • type: Port type slug (Array)

Console Server Ports

  • name: Name
  • label: Label
  • type: Port type slug (Array)

Power Ports

  • name: Name
  • label: Label
  • type: Port type slug (Array)
  • maximum_draw: The port's maximum power draw, in watts (optional)
  • allocated_draw: The port's allocated power draw, in watts (optional)

Power Outlets

  • name: Name
  • label: Label
  • type: Port type slug (Array)
  • power_port: The name of the power port on the device which powers this outlet (optional)
  • feed_leg: The phase (leg) of power to which this outlet is mapped; A, B, or C (optional)

Interfaces

  • name: Name
  • label: Label
  • type: Interface type slug (Array)
  • mgmt_only: A boolean which indicates whether this interface is used for management purposes only (default: false)

Front Ports

  • name: Name
  • label: Label
  • type: Port type slug (Array)
  • 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)

Rear Ports

  • name: Name
  • label: Label
  • type: Port type slug (Array)
  • positions: The number of front ports that can map to this rear port (default: 1)

Module Bays

  • name: Name
  • label: Label
  • position: The module bay's position within the parent device

Device Bays

  • name: Name
  • label: Label

Inventory Items

  • name: Name
  • label: Label
  • manufacturer: The name of the manufacturer which produces this item
  • part_id: The part ID assigned by the manufacturer

Data Validation / Commit Quality Checks

There are two ways this repo focuses on keeping quality device-type definitions:

  • Pre-Commit Checks - Optional, but highly recommended, for helping to identify simple issues before committing. (trailing-whitespace, end-of-file-fixer, check-yaml, yamlfmt, yamllint)
    • Installation
      • Virtual Environment Route
        • It is recommended to create a virtual env for your repo (python3 -m venv venv)
        • Install the required pip packages (pip install -r requirements.txt)
        • Continue to the "Install pre-commit Hooks"
      • pre-commit Only Route
      • Install pre-commit Hooks
        • To install the pre-commit script: pre-commit install
    • Usage & Useful pre-commit Commands
      • After staging your files with git, to run the pre-commit script on changed files: pre-commit run
      • To run the pre-commit script on all files: pre-commit run --all
      • To uninstall the pre-commit script: pre-commit uninstall
    • Learn more about pre-commit
  • GitHub Actions - Automatically run before a PR can be merged. Repeats yamllint & validates against NetBox Device-Type Schema.