diff options
author | Mattias Andrée <maandree@kth.se> | 2016-10-03 12:51:00 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2016-10-03 12:51:00 +0200 |
commit | f241128b429f725f4f4da893c7d2cb0e4373e77a (patch) | |
tree | 011e6ad00f2253c6394979d1917b212141446ab5 /src/plugins/snmp.py | |
parent | fix softirqs (diff) | |
download | xpybar-f241128b429f725f4f4da893c7d2cb0e4373e77a.tar.gz xpybar-f241128b429f725f4f4da893c7d2cb0e4373e77a.tar.bz2 xpybar-f241128b429f725f4f4da893c7d2cb0e4373e77a.tar.xz |
snmp, snmp6: add keys
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r-- | src/plugins/snmp.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/plugins/snmp.py b/src/plugins/snmp.py index a52cb4e..90e7554 100644 --- a/src/plugins/snmp.py +++ b/src/plugins/snmp.py @@ -23,6 +23,8 @@ from util import * class SNMP: ''' IPv4 SNMP data + + @variable keys:list<str> List of avaiable keys ''' @@ -44,10 +46,13 @@ class SNMP: snmp = zip(snmp_h, snmp_d) self.__info = {} + self.keys = [] for header_list, data_list in snmp: prefix = header_list[0][:-1] for suffix, value in zip(header_list[1:], data_list[1:]): - self.__info[prefix + suffix] = int(value) + key = prefix + suffix + self.__info[key] = int(value) + self.keys.append(key) def __contains__(self, key): |