Files
netbox-repo/schema/racktype.json
Bastian Leicht 57742dbb2c Add rack-types (#3026)
* feat: add front image

* feat: startech 4post rack

* feat: add digitus DN-19 07U-I-OD

* feat: add digitus DN-19 07U-I-OD

* Revert "feat: add front image"

This reverts commit bdd27607f821fa942d40fb01774cab6053f83ada.

* fix: change form_factor

* feat: add racktype schema

* feat: add racktype schema

* feat: upload generated known-racks.pickle

* fix: change filename

* feat: add rack type

* refactor: change tests to work with racks

* refactor: use the correct device class

* fix: rename file correctly

* Update racktype.json

* fix: add missing desc_units schema property

* fix: add missing desc_units value

* chore: update readme with rack-types documentation

---------

Co-authored-by: Harry <Harry@cadby.co.uk>
2025-08-11 13:07:27 +01:00

101 lines
2.4 KiB
JSON

{
"type": "object",
"$id": "urn:devicetype-library:rack-type",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"manufacturer": {
"type": "string"
},
"model": {
"type": "string"
},
"slug": {
"type": "string",
"pattern": "^[-a-z0-9_]+$"
},
"description": {
"type": "string"
},
"form_factor": {
"type": "string",
"enum": [
"wall-cabinet",
"4-post-frame",
"2-post-frame",
"4-post-cabinet",
"wall-frame",
"wall-frame-vertical",
"wall-cabinet-vertical"
]
},
"width": {
"type": "integer",
"enum": [
10,
19,
20,
23
]
},
"u_height": {
"type": "number",
"minimum": 0,
"multipleOf": 1
},
"outer_width": {
"type": "number",
"minimum": 0,
"multipleOf": 0.01
},
"outer_height": {
"type": "number",
"minimum": 0,
"multipleOf": 0.01
},
"outer_depth": {
"type": "number",
"minimum": 0,
"multipleOf": 0.01
},
"outer_unit": {
"type": "string",
"enum": [
"mm",
"in"
]
},
"weight": {
"type": "number",
"minimum": 0,
"multipleOf": 0.01
},
"max_weight": {
"type": "number",
"minimum": 0,
"multipleOf": 0.01
},
"weight_unit": {
"$ref": "urn:devicetype-library:generated-schema#/definitions/weight-unit"
},
"mounting_depth": {
"type": "number",
"minimum": 0,
"multipleOf": 0.01
},
"starting_unit": {
"type": "number",
"minimum": 1,
"multipleOf": 1
},
"desc_units": {
"type": "boolean",
"default": false
},
"comments": {
"type": "string"
}
},
"required": ["manufacturer", "model", "slug", "form_factor", "width", "u_height", "starting_unit"],
"additionalProperties": false
}