Merge pull request #49 from unifi-poller/dn2_spf
Add SFP data to a Port.
This commit is contained in:
commit
98e070a338
|
|
@ -100,68 +100,84 @@ type MacTable struct {
|
|||
// Port is a physical connection on a USW or Gateway.
|
||||
// Not every port has the same capabilities.
|
||||
type Port struct {
|
||||
AggregatedBy FlexBool `json:"aggregated_by"`
|
||||
Autoneg FlexBool `json:"autoneg,omitempty"`
|
||||
BytesR FlexInt `json:"bytes-r"`
|
||||
DNS []string `json:"dns,omitempty"`
|
||||
Dot1XMode string `json:"dot1x_mode"`
|
||||
Dot1XStatus string `json:"dot1x_status"`
|
||||
Enable FlexBool `json:"enable"`
|
||||
FlowctrlRx FlexBool `json:"flowctrl_rx"`
|
||||
FlowctrlTx FlexBool `json:"flowctrl_tx"`
|
||||
FullDuplex FlexBool `json:"full_duplex"`
|
||||
IP string `json:"ip,omitempty"`
|
||||
Ifname string `json:"ifname,omitempty"`
|
||||
IsUplink FlexBool `json:"is_uplink"`
|
||||
Mac string `json:"mac,omitempty"`
|
||||
MacTable []MacTable `json:"mac_table,omitempty"`
|
||||
Jumbo FlexBool `json:"jumbo,omitempty"`
|
||||
Masked FlexBool `json:"masked"`
|
||||
Media string `json:"media"`
|
||||
Name string `json:"name"`
|
||||
NetworkName string `json:"network_name,omitempty"`
|
||||
Netmask string `json:"netmask,omitempty"`
|
||||
NumPort int `json:"num_port,omitempty"`
|
||||
OpMode string `json:"op_mode"`
|
||||
PoeCaps FlexInt `json:"poe_caps"`
|
||||
PoeClass string `json:"poe_class,omitempty"`
|
||||
PoeCurrent FlexInt `json:"poe_current,omitempty"`
|
||||
PoeEnable FlexBool `json:"poe_enable,omitempty"`
|
||||
PoeGood FlexBool `json:"poe_good,omitempty"`
|
||||
PoeMode string `json:"poe_mode,omitempty"`
|
||||
PoePower FlexInt `json:"poe_power,omitempty"`
|
||||
PoeVoltage FlexInt `json:"poe_voltage,omitempty"`
|
||||
PortDelta struct {
|
||||
TimeDelta int64 `json:"time_delta"`
|
||||
TimeDeltaActivity int64 `json:"time_delta_activity"`
|
||||
} `json:"port_delta,omitempty"`
|
||||
PortIdx FlexInt `json:"port_idx"`
|
||||
PortPoe FlexBool `json:"port_poe"`
|
||||
PortconfID string `json:"portconf_id"`
|
||||
RxBroadcast FlexInt `json:"rx_broadcast"`
|
||||
RxBytes FlexInt `json:"rx_bytes"`
|
||||
RxBytesR FlexInt `json:"rx_bytes-r"`
|
||||
RxDropped FlexInt `json:"rx_dropped"`
|
||||
RxErrors FlexInt `json:"rx_errors"`
|
||||
RxMulticast FlexInt `json:"rx_multicast"`
|
||||
RxPackets FlexInt `json:"rx_packets"`
|
||||
RxRate FlexInt `json:"rx_rate,omitempty"`
|
||||
Satisfaction FlexInt `json:"satisfaction,omitempty"`
|
||||
SfpFound FlexBool `json:"sfp_found,omitempty"`
|
||||
Speed FlexInt `json:"speed"`
|
||||
SpeedCaps FlexInt `json:"speed_caps"`
|
||||
StpPathcost FlexInt `json:"stp_pathcost"`
|
||||
StpState string `json:"stp_state"`
|
||||
TxBroadcast FlexInt `json:"tx_broadcast"`
|
||||
TxBytes FlexInt `json:"tx_bytes"`
|
||||
TxBytesR FlexInt `json:"tx_bytes-r"`
|
||||
TxDropped FlexInt `json:"tx_dropped"`
|
||||
TxErrors FlexInt `json:"tx_errors"`
|
||||
TxMulticast FlexInt `json:"tx_multicast"`
|
||||
TxPackets FlexInt `json:"tx_packets"`
|
||||
TxRate FlexInt `json:"tx_rate,omitempty"`
|
||||
Type string `json:"type,omitempty"`
|
||||
Up FlexBool `json:"up"`
|
||||
AggregatedBy FlexBool `json:"aggregated_by"`
|
||||
Autoneg FlexBool `json:"autoneg,omitempty"`
|
||||
BytesR FlexInt `json:"bytes-r"`
|
||||
DNS []string `json:"dns,omitempty"`
|
||||
Dot1XMode string `json:"dot1x_mode"`
|
||||
Dot1XStatus string `json:"dot1x_status"`
|
||||
Enable FlexBool `json:"enable"`
|
||||
FlowctrlRx FlexBool `json:"flowctrl_rx"`
|
||||
FlowctrlTx FlexBool `json:"flowctrl_tx"`
|
||||
FullDuplex FlexBool `json:"full_duplex"`
|
||||
IP string `json:"ip,omitempty"`
|
||||
Ifname string `json:"ifname,omitempty"`
|
||||
IsUplink FlexBool `json:"is_uplink"`
|
||||
Mac string `json:"mac,omitempty"`
|
||||
MacTable []MacTable `json:"mac_table,omitempty"`
|
||||
Jumbo FlexBool `json:"jumbo,omitempty"`
|
||||
Masked FlexBool `json:"masked"`
|
||||
Media string `json:"media"`
|
||||
Name string `json:"name"`
|
||||
NetworkName string `json:"network_name,omitempty"`
|
||||
Netmask string `json:"netmask,omitempty"`
|
||||
NumPort int `json:"num_port,omitempty"`
|
||||
OpMode string `json:"op_mode"`
|
||||
PoeCaps FlexInt `json:"poe_caps"`
|
||||
PoeClass string `json:"poe_class,omitempty"`
|
||||
PoeCurrent FlexInt `json:"poe_current,omitempty"`
|
||||
PoeEnable FlexBool `json:"poe_enable,omitempty"`
|
||||
PoeGood FlexBool `json:"poe_good,omitempty"`
|
||||
PoeMode string `json:"poe_mode,omitempty"`
|
||||
PoePower FlexInt `json:"poe_power,omitempty"`
|
||||
PoeVoltage FlexInt `json:"poe_voltage,omitempty"`
|
||||
PortDelta PortDelta `json:"port_delta,omitempty"`
|
||||
PortIdx FlexInt `json:"port_idx"`
|
||||
PortPoe FlexBool `json:"port_poe"`
|
||||
PortconfID string `json:"portconf_id"`
|
||||
RxBroadcast FlexInt `json:"rx_broadcast"`
|
||||
RxBytes FlexInt `json:"rx_bytes"`
|
||||
RxBytesR FlexInt `json:"rx_bytes-r"`
|
||||
RxDropped FlexInt `json:"rx_dropped"`
|
||||
RxErrors FlexInt `json:"rx_errors"`
|
||||
RxMulticast FlexInt `json:"rx_multicast"`
|
||||
RxPackets FlexInt `json:"rx_packets"`
|
||||
RxRate FlexInt `json:"rx_rate,omitempty"`
|
||||
Satisfaction FlexInt `json:"satisfaction,omitempty"`
|
||||
SatisfactionReason FlexInt `json:"satisfaction_reason"`
|
||||
SFPCompliance string `json:"sfp_compliance"`
|
||||
SFPCurrent FlexInt `json:"sfp_current"`
|
||||
SFPFound FlexBool `json:"sfp_found"`
|
||||
SFPPart string `json:"sfp_part"`
|
||||
SFPRev string `json:"sfp_rev"`
|
||||
SFPRxfault FlexBool `json:"sfp_rxfault"`
|
||||
SFPRxpower FlexInt `json:"sfp_rxpower"`
|
||||
SFPSerial string `json:"sfp_serial"`
|
||||
SFPTemperature FlexInt `json:"sfp_temperature"`
|
||||
SFPTxfault FlexBool `json:"sfp_txfault"`
|
||||
SFPTxpower FlexInt `json:"sfp_txpower"`
|
||||
SFPVendor string `json:"sfp_vendor"`
|
||||
SFPVoltage FlexInt `json:"sfp_voltage"`
|
||||
Speed FlexInt `json:"speed"`
|
||||
SpeedCaps FlexInt `json:"speed_caps"`
|
||||
StpPathcost FlexInt `json:"stp_pathcost"`
|
||||
StpState string `json:"stp_state"`
|
||||
TxBroadcast FlexInt `json:"tx_broadcast"`
|
||||
TxBytes FlexInt `json:"tx_bytes"`
|
||||
TxBytesR FlexInt `json:"tx_bytes-r"`
|
||||
TxDropped FlexInt `json:"tx_dropped"`
|
||||
TxErrors FlexInt `json:"tx_errors"`
|
||||
TxMulticast FlexInt `json:"tx_multicast"`
|
||||
TxPackets FlexInt `json:"tx_packets"`
|
||||
TxRate FlexInt `json:"tx_rate,omitempty"`
|
||||
Type string `json:"type,omitempty"`
|
||||
Up FlexBool `json:"up"`
|
||||
}
|
||||
|
||||
// PortDelta is part of a Port.
|
||||
type PortDelta struct {
|
||||
TimeDelta FlexInt `json:"time_delta"`
|
||||
TimeDeltaActivity FlexInt `json:"time_delta_activity"`
|
||||
}
|
||||
|
||||
// USWStat holds the "stat" data for a switch.
|
||||
|
|
|
|||
Loading…
Reference in New Issue