Refactor type generator

* Allows for generating top-level types for any embedded struct so
  that sub-types can be properly instantiated from calling code
  * Specifying `-no-embedded-types` will generate top-level types
    rather than embedding the struct

* Refactored "Device" API
  * All fields set to `omitempty` because it describes all possible
    device types, so effectively any field could be omitted any time
  * Fixed `get` call for "Device" API; replacing `rest` with `stat`

* Generated `get` and `update` calls for `Setting*` APIs

* Added `5.14.23` JSON files
This commit is contained in:
James Stephenson
2020-08-28 22:18:21 -04:00
committed by Paul Tyng
parent 79542b4006
commit 35eda4f67b
110 changed files with 3589 additions and 374 deletions

View File

@@ -0,0 +1,36 @@
{
"name": "",
"forward": "all|native|customize|disabled",
"native_networkconf_id": "",
"tagged_networkconf_ids": [""],
"voice_networkconf_id": "",
"op_mode":"switch",
"autoneg":"true|false",
"speed":"10|100|1000|2500|5000|10000|20000|25000|40000|50000|100000",
"full_duplex":"true|false",
"poe_mode":"auto|pasv24|passthrough|off",
"isolation":"true|false",
"dot1x_ctrl":"auto|force_authorized|force_unauthorized|mac_based|multi_host",
"dot1x_idle_timeout":"[0-9]|[1-9][0-9]{1,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5]",
"stormctrl_type": "level|rate",
"stormctrl_ucast_enabled": "true|false",
"stormctrl_ucast_level": "[0-9]|[1-9][0-9]|100",
"stormctrl_ucast_rate": "[0-9]|[1-9][0-9]{1,6}|1[0-3][0-9]{6}|14[0-7][0-9]{5}|148[0-7][0-9]{4}|14880000",
"stormctrl_mcast_enabled": "true|false",
"stormctrl_mcast_level": "[0-9]|[1-9][0-9]|100",
"stormctrl_mcast_rate": "[0-9]|[1-9][0-9]{1,6}|1[0-3][0-9]{6}|14[0-7][0-9]{5}|148[0-7][0-9]{4}|14880000",
"stormctrl_bcast_enabled": "true|false",
"stormctrl_bcast_level": "[0-9]|[1-9][0-9]|100",
"stormctrl_bcast_rate": "[0-9]|[1-9][0-9]{1,6}|1[0-3][0-9]{6}|14[0-7][0-9]{5}|148[0-7][0-9]{4}|14880000",
"priority_queue1_level": "[0-9]|[1-9][0-9]|100",
"priority_queue2_level": "[0-9]|[1-9][0-9]|100",
"priority_queue3_level": "[0-9]|[1-9][0-9]|100",
"priority_queue4_level": "[0-9]|[1-9][0-9]|100",
"lldpmed_enabled": "true|false",
"lldpmed_notify_enabled": "true|false",
"stp_port_mode": "true|false",
"egress_rate_limit_kbps_enabled": "true|false",
"egress_rate_limit_kbps": "6[4-9]|[7-9][0-9]|[1-9][0-9]{2,6}",
"port_security_enabled": "true|false",
"port_security_mac_address": ["^([0-9A-Fa-f]{2}[:]){5}([0-9A-Fa-f]{2})$"]
}