Update to v8.2.93

This commit is contained in:
appkins
2024-06-06 11:49:05 -05:00
parent 971b9fc3b0
commit 85af09f5e0
21 changed files with 1373 additions and 361 deletions

View File

@@ -27,14 +27,16 @@ type SettingGlobalSwitch struct {
Key string `json:"key"`
DHCPSnoop bool `json:"dhcp_snoop"`
Dot1XFallbackNetworkID string `json:"dot1x_fallback_networkconf_id"` // [\d\w]+|
Dot1XPortctrlEnabled bool `json:"dot1x_portctrl_enabled"`
FlowctrlEnabled bool `json:"flowctrl_enabled"`
JumboframeEnabled bool `json:"jumboframe_enabled"`
RADIUSProfileID string `json:"radiusprofile_id"`
StpVersion string `json:"stp_version,omitempty"` // stp|rstp|disabled
SwitchExclusions []string `json:"switch_exclusions,omitempty"` // ^([0-9A-Fa-f]{2}:){5}([0-9A-Fa-f]{2})$
AclDeviceIsolation []string `json:"acl_device_isolation,omitempty"`
AclL3Isolation []SettingGlobalSwitchAclL3Isolation `json:"acl_l3_isolation,omitempty"`
DHCPSnoop bool `json:"dhcp_snoop"`
Dot1XFallbackNetworkID string `json:"dot1x_fallback_networkconf_id"` // [\d\w]+|
Dot1XPortctrlEnabled bool `json:"dot1x_portctrl_enabled"`
FlowctrlEnabled bool `json:"flowctrl_enabled"`
JumboframeEnabled bool `json:"jumboframe_enabled"`
RADIUSProfileID string `json:"radiusprofile_id"`
StpVersion string `json:"stp_version,omitempty"` // stp|rstp|disabled
SwitchExclusions []string `json:"switch_exclusions,omitempty"` // ^([0-9A-Fa-f]{2}:){5}([0-9A-Fa-f]{2})$
}
func (dst *SettingGlobalSwitch) UnmarshalJSON(b []byte) error {
@@ -53,6 +55,27 @@ func (dst *SettingGlobalSwitch) UnmarshalJSON(b []byte) error {
return nil
}
type SettingGlobalSwitchAclL3Isolation struct {
DestinationNetworks []string `json:"destination_networks,omitempty"`
SourceNetwork string `json:"source_network,omitempty"`
}
func (dst *SettingGlobalSwitchAclL3Isolation) UnmarshalJSON(b []byte) error {
type Alias SettingGlobalSwitchAclL3Isolation
aux := &struct {
*Alias
}{
Alias: (*Alias)(dst),
}
err := json.Unmarshal(b, &aux)
if err != nil {
return fmt.Errorf("unable to unmarshal alias: %w", err)
}
return nil
}
func (c *Client) getSettingGlobalSwitch(ctx context.Context, site string) (*SettingGlobalSwitch, error) {
var respBody struct {
Meta meta `json:"meta"`