mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Feature - Schema Generation (#13353)
* Schema generation is working * Added option to either dump to a file or the console * Moving schema file and utilizing settings definition for file paths * Cleaning up the imports and fixing a few pythonic issues * Tweak command flags * Clean up choices mapping * Misc cleanup * Rename & move template file * Move management command from extras to dcim * Update release checklist --------- Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
This commit is contained in:
93
netbox/templates/extras/schema/devicetype_schema.jinja2
Normal file
93
netbox/templates/extras/schema/devicetype_schema.jinja2
Normal file
@@ -0,0 +1,93 @@
|
||||
{
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"definitions": {
|
||||
"airflow": {
|
||||
"type": "string",
|
||||
"enum": {{ airflow_choices }}
|
||||
},
|
||||
"weight-unit": {
|
||||
"type": "string",
|
||||
"enum": {{ weight_unit_choices }}
|
||||
},
|
||||
"subdevice-role": {
|
||||
"type": "string",
|
||||
"enum": {{ subdevice_role_choices }}
|
||||
},
|
||||
"console-port": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": {{ console_port_type_choices }}
|
||||
}
|
||||
}
|
||||
},
|
||||
"console-server-port": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": {{ console_server_port_type_choices }}
|
||||
}
|
||||
}
|
||||
},
|
||||
"power-port": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": {{ power_port_type_choices }}
|
||||
}
|
||||
}
|
||||
},
|
||||
"power-outlet": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": {{ power_outlet_type_choices }}
|
||||
},
|
||||
"feed-leg": {
|
||||
"type": "string",
|
||||
"enum": {{ power_outlet_feedleg_choices }}
|
||||
}
|
||||
}
|
||||
},
|
||||
"interface": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": {{ interface_type_choices }}
|
||||
},
|
||||
"poe_mode": {
|
||||
"type": "string",
|
||||
"enum": {{ interface_poe_mode_choices }}
|
||||
},
|
||||
"poe_type": {
|
||||
"type": "string",
|
||||
"enum": {{ interface_poe_type_choices }}
|
||||
}
|
||||
}
|
||||
},
|
||||
"front-port": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": {{ front_port_type_choices }}
|
||||
}
|
||||
}
|
||||
},
|
||||
"rear-port": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": {{ rear_port_type_choices}}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user