Files
netbox-repo/schema/components.json
Juniper46 bed77b1bed Improve Validation and fixed issues based on Issue (#3768)
* Update devicetype.json

* Update moduletype.json

* Update definitions_test.py

* Update device_types.py

* Update devicetype.json

* Update moduletype.json

* Update devicetype.json

* Update HWG-STE.yml

* Update 701BA8PP.yml

* Update WS-C2960C-12PC-L.yaml

* Update snr-ups-onrt-1000-s24-element-ii.yaml

* Update EP-R6.yaml

* Update moduletype.json

* Fixed issues

* Added description limit

---------

Co-authored-by: Harry <harry@cadby.co.uk>
2025-11-27 10:46:51 +00:00

320 lines
7.2 KiB
JSON

{
"type": "object",
"$id": "urn:devicetype-library:components",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"definitions": {
"console-port": {
"type": "object",
"properties": {
"name": {
"type": "string",
"maxLength": 64
},
"label": {
"type": "string",
"maxLength": 64
},
"type": {
"$ref": "urn:devicetype-library:generated-schema#/definitions/console-port/properties/type"
},
"description": {
"type": "string",
"maxLength": 200
},
"_is_power_source": {
"$ref": "urn:devicetype-library:reusable#/definitions/_is_power_source"
}
},
"required": [
"name",
"type"
],
"additionalProperties": false
},
"console-server-port": {
"type": "object",
"properties": {
"name": {
"type": "string",
"maxLength": 64
},
"label": {
"type": "string",
"maxLength": 64
},
"type": {
"$ref": "urn:devicetype-library:generated-schema#/definitions/console-server-port/properties/type"
},
"description": {
"type": "string",
"maxLength": 200
}
},
"required": [
"name",
"type"
],
"additionalProperties": false
},
"power-port": {
"type": "object",
"properties": {
"name": {
"type": "string",
"maxLength": 64
},
"label": {
"type": "string",
"maxLength": 64
},
"type": {
"$ref": "urn:devicetype-library:generated-schema#/definitions/power-port/properties/type"
},
"maximum_draw": {
"type": "integer",
"minimum": 1
},
"allocated_draw": {
"type": "integer",
"minimum": 1
},
"description": {
"type": "string",
"maxLength": 200
}
},
"required": [
"name",
"type"
],
"additionalProperties": false
},
"power-outlet": {
"type": "object",
"properties": {
"name": {
"type": "string",
"maxLength": 64
},
"label": {
"type": "string",
"maxLength": 64
},
"type": {
"$ref": "urn:devicetype-library:generated-schema#/definitions/power-outlet/properties/type"
},
"power_port": {
"type": "string",
"maxLength": 64
},
"feed_leg": {
"$ref": "urn:devicetype-library:generated-schema#/definitions/power-outlet/properties/feed-leg"
},
"description": {
"type": "string",
"maxLength": 200
}
},
"required": [
"name",
"type"
],
"additionalProperties": false
},
"interface": {
"type": "object",
"properties": {
"name": {
"type": "string",
"maxLength": 64
},
"label": {
"type": "string",
"maxLength": 64
},
"type": {
"$ref": "urn:devicetype-library:generated-schema#/definitions/interface/properties/type"
},
"enabled": {
"type": "boolean"
},
"mgmt_only": {
"type": "boolean"
},
"description": {
"type": "string",
"maxLength": 200
},
"bridge": {
"type": "string",
"maxLength": 64
},
"poe_mode": {
"$ref": "urn:devicetype-library:generated-schema#/definitions/interface/properties/poe_mode"
},
"poe_type": {
"$ref": "urn:devicetype-library:generated-schema#/definitions/interface/properties/poe_type"
},
"rf_role": {
"$ref": "urn:devicetype-library:generated-schema#/definitions/interface/properties/rf_role"
}
},
"required": [
"name",
"type"
],
"additionalProperties": false
},
"front-port": {
"type": "object",
"properties": {
"name": {
"type": "string",
"maxLength": 64
},
"label": {
"type": "string",
"maxLength": 64
},
"type": {
"$ref": "urn:devicetype-library:generated-schema#/definitions/front-port/properties/type"
},
"color": {
"type": "string",
"pattern": "^[a-f0-9]{6}$"
},
"rear_port": {
"type": "string",
"maxLength": 64
},
"rear_port_position": {
"type": "integer",
"minimum": 1
},
"description": {
"type": "string",
"maxLength": 200
}
},
"required": [
"name",
"type",
"rear_port"
],
"additionalProperties": false
},
"rear-port": {
"type": "object",
"properties": {
"name": {
"type": "string",
"maxLength": 64
},
"label": {
"type": "string",
"maxLength": 64
},
"type": {
"$ref": "urn:devicetype-library:generated-schema#/definitions/rear-port/properties/type"
},
"color": {
"type": "string",
"pattern": "^[a-f0-9]{6}$"
},
"positions": {
"type": "integer",
"minimum": 1
},
"description": {
"type": "string",
"maxLength": 200
},
"_is_power_source": {
"$ref": "urn:devicetype-library:reusable#/definitions/_is_power_source"
}
},
"required": [
"name",
"type"
],
"additionalProperties": false
},
"module-bay": {
"type": "object",
"properties": {
"name": {
"type": "string",
"maxLength": 64
},
"label": {
"type": "string",
"maxLength": 64
},
"position": {
"type": "string",
"maxLength": 30
},
"description": {
"type": "string",
"maxLength": 200
}
},
"required": [
"name",
"position"
],
"additionalProperties": false
},
"device-bay": {
"type": "object",
"properties": {
"name": {
"type": "string",
"maxLength": 64
},
"label": {
"type": "string",
"maxLength": 64
},
"description": {
"type": "string",
"maxLength": 200
}
},
"required": [
"name"
],
"additionalProperties": false
},
"inventory-item": {
"type": "object",
"properties": {
"name": {
"type": "string",
"maxLength": 64
},
"label": {
"type": "string",
"maxLength": 64
},
"manufacturer": {
"type": "string",
"maxLength": 100
},
"part_id": {
"type": "string",
"maxLength": 50
},
"description": {
"type": "string",
"maxLength": 200
}
},
"required": [
"name"
],
"additionalProperties": false
}
}
}