Skip to content

Commit

Permalink
Closes netbox-community#881: Add support for 0.5U heights
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremystretch committed Aug 18, 2022
1 parent 66c7560 commit 6f1fa04
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

## About this Library

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.
This library is intended to be used for populating device types in [NetBox](https://github.com/netbox-community/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](CONTRIBUTING.md) before
submitting content.
Expand All @@ -25,7 +25,7 @@ Each definition must include at minimum the following fields:
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)
- `u_height`: The height of the device type in rack units. Increments of 0.5U are supported. (Default: 1)
- `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)
Expand Down Expand Up @@ -133,3 +133,4 @@ There are two ways this repo focuses on keeping quality device-type definitions:
- To uninstall the pre-commit script `pre-commit uninstall`
- Learn more about [pre-commit](https://pre-commit.com/)
- GitHub Actions - Automatically run before a PR can be merged. Repeats yamllint & validates against NetBox Device-Type Schema.

2 changes: 1 addition & 1 deletion device-types/Cisco/WS-C3750G-24TS-S.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ model: Catalyst 3750G-24TS-S
slug: ws-c3750g-24ts-s
part_number: WS-C3750G-24TS-S
is_full_depth: false
u_height: 1
u_height: 1.5
interfaces:
- name: GigabitEthernet1/0/1
type: 1000base-t
Expand Down
4 changes: 3 additions & 1 deletion schema/devicetype.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@
"type": "string"
},
"u_height": {
"type": "integer"
"type": "number",
"minimum": 0,
"multipleOf": 0.5
},
"is_full_depth": {
"type": "boolean"
Expand Down

0 comments on commit 6f1fa04

Please sign in to comment.