mirror of
https://github.com/kernelkit/infix.git
synced 2026-08-07 07:53:18 +02:00
yang: wifi: Use correct type for counters
This commit is contained in:
@@ -401,23 +401,23 @@ submodule infix-if-wifi {
|
||||
}
|
||||
|
||||
leaf rx-packets {
|
||||
type uint32;
|
||||
type yang:counter64;
|
||||
description "Packets received from this client.";
|
||||
}
|
||||
|
||||
leaf tx-packets {
|
||||
type uint32;
|
||||
type yang:counter64;
|
||||
description "Packets transmitted to this client.";
|
||||
}
|
||||
|
||||
leaf rx-bytes {
|
||||
type uint32;
|
||||
type yang:counter64;
|
||||
units "octets";
|
||||
description "Bytes received from this client.";
|
||||
}
|
||||
|
||||
leaf tx-bytes {
|
||||
type uint32;
|
||||
type yang:counter64;
|
||||
units "octets";
|
||||
description "Bytes transmitted to this client.";
|
||||
}
|
||||
|
||||
@@ -152,13 +152,13 @@ def parse_iw_stations(output):
|
||||
seconds = int(value.split()[0])
|
||||
current_station["connected-time"] = seconds
|
||||
elif key == "rx packets":
|
||||
current_station["rx-packets"] = int(value)
|
||||
current_station["rx-packets"] = value
|
||||
elif key == "tx packets":
|
||||
current_station["tx-packets"] = int(value)
|
||||
current_station["tx-packets"] = value
|
||||
elif key == "rx bytes":
|
||||
current_station["rx-bytes"] = int(value)
|
||||
current_station["rx-bytes"] = value
|
||||
elif key == "tx bytes":
|
||||
current_station["tx-bytes"] = int(value)
|
||||
current_station["tx-bytes"] = value
|
||||
elif key == "tx bitrate":
|
||||
# Format: "866.7 MBit/s ..." - extract speed and convert to 100kbit/s units
|
||||
speed_mbps = float(value.split()[0])
|
||||
|
||||
Reference in New Issue
Block a user