Schema network-device.json
Resolve referenced schemas (may reorder keys)
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"description": "Describes a network device or switch.",
"required": [
"id",
"chassis_id",
"mgmt_ip",
"mtu",
"interfaces"
],
"properties": {
"id": {
"description": "Globally unique identifier for the network device",
"type": "string",
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
},
"chassis_id": {
"description": "A persistent identifier of the network device, often the MAC address. Where LLDP is implemented on the network device interfaces, the LLDP Chassis ID should match this value.",
"anyOf": [
{
"type": "string",
"pattern": "^([0-9a-f]{2}-){5}([0-9a-f]{2})$",
"description": "When the Chassis ID is a MAC address, use this format."
},
{
"type": "string",
"pattern": "^.+$",
"description": "When the Chassis ID is anything other than a MAC address, a freeform string may be used."
}
]
},
"mgmt_ip": {
"type": "string",
"description": "The management IP address of the network device.",
"anyOf": [
{
"format": "ipv4"
},
{
"format": "ipv6"
}