Skip to content

Commit

Permalink
device: remove TX_ERRORS
Browse files Browse the repository at this point in the history
Added by mistake since it doesn't exist.

Signed-off-by: Álvaro Fernández Rojas <[email protected]>
  • Loading branch information
Noltari committed Aug 14, 2022
1 parent 791e1cb commit 2622633
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 20 deletions.
1 change: 0 additions & 1 deletion aioqsw/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@
QSD_RX_ERRORS = "rx-errors"
QSD_RX_OCTETS = "rx-octets"
QSD_RX_SPEED = "rx-speed"
QSD_TX_ERRORS = "tx-errors"
QSD_TX_OCTETS = "tx-octets"
QSD_TX_SPEED = "tx-speed"
QSD_SERIAL = "serial"
Expand Down
19 changes: 0 additions & 19 deletions aioqsw/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@
QSD_TEMP,
QSD_TEMP_MAX,
QSD_TRUNK_NUM,
QSD_TX_ERRORS,
QSD_TX_OCTETS,
QSD_TX_SPEED,
QSD_UPTIME,
Expand Down Expand Up @@ -414,7 +413,6 @@ def __init__(self, port_stats: dict[str, Any]):
self.rx_errors: int | None = None
self.rx_octets: int | None = None
self.rx_speed: int = 0
self.tx_errors: int | None = None
self.tx_octets: int | None = None
self.tx_speed: int = 0

Expand Down Expand Up @@ -478,10 +476,6 @@ def data(self) -> dict[str, Any]:
if rx_speed is not None:
data[QSD_RX_SPEED] = rx_speed

tx_errors = self.get_tx_errors()
if tx_errors is not None:
data[QSD_TX_ERRORS] = tx_errors

tx_octets = self.get_tx_octets()
if tx_octets is not None:
data[QSD_TX_OCTETS] = tx_octets
Expand Down Expand Up @@ -512,10 +506,6 @@ def get_rx_speed(self) -> int | None:
"""Get port RX speed."""
return self.rx_speed

def get_tx_errors(self) -> int | None:
"""Get port TX errors."""
return self.tx_errors

def get_tx_octets(self) -> int | None:
"""Get port TX octets."""
return self.tx_octets
Expand All @@ -537,7 +527,6 @@ def __init__(self, ports_stats: dict[str, Any], _datetime: datetime):
self.rx_errors: int | None = None
self.rx_octets: int | None = None
self.rx_speed: int = 0
self.tx_errors: int | None = None
self.tx_octets: int | None = None
self.tx_speed: int = 0

Expand Down Expand Up @@ -646,10 +635,6 @@ def data(self) -> dict[str, Any]:
if rx_speed is not None:
data[QSD_RX_SPEED] = rx_speed

tx_errors = self.get_tx_errors()
if tx_errors is not None:
data[QSD_TX_ERRORS] = tx_errors

tx_octets = self.get_tx_octets()
if tx_octets is not None:
data[QSD_TX_OCTETS] = tx_octets
Expand Down Expand Up @@ -700,10 +685,6 @@ def get_rx_speed(self) -> int | None:
"""Get total RX speed."""
return self.rx_speed

def get_tx_errors(self) -> int | None:
"""Get total TX errors."""
return self.tx_errors

def get_tx_octets(self) -> int | None:
"""Get total TX octets."""
return self.tx_octets
Expand Down

0 comments on commit 2622633

Please sign in to comment.