1
0
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:
Daniel W. Anner
2023-08-11 11:00:26 -04:00
committed by GitHub
parent 9fd07b594c
commit 40afe6cf36
4 changed files with 726 additions and 0 deletions

View 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}}
}
}
}
}
}