Module: check_mk
Branch: master
Commit: fbd57a11eef25422febed8d17215039c0df86daf
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=fbd57a11eef254…
Author: Moritz Kiemer <mo(a)mathias-kettner.de>
Date: Wed Jul 4 14:22:13 2018 +0200
windows_os_bonding: don't change info.
Change-Id: I6b909409f5d858c230910799bf619f0358766848
---
checks/windows_os_bonding | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/checks/windows_os_bonding b/checks/windows_os_bonding
index 9f162d8..165f057 100644
--- a/checks/windows_os_bonding
+++ b/checks/windows_os_bonding
@@ -49,24 +49,24 @@ def parse_windows_os_bonding(info):
for line in info:
if len(line)>1:
- line[1] = re.sub("^ +", "", line[1])
+ item = line[1].lstrip()
if line[0] == "Team Name":
- bond = line[1]
+ bond = item
bonds[bond] = {}
bonds[bond]["interfaces"] = {}
elif line[0] == "Bonding Mode":
- bonds[bond]["mode"] = line[1]
+ bonds[bond]["mode"] = item
elif line[0] == "Status":
- bonds[bond]["status"] = line[1].lower()
+ bonds[bond]["status"] = item.lower()
elif line[0] == "Speed":
- bonds[bond]["speed"] = line[1]
+ bonds[bond]["speed"] = item
elif line[0] == "Slave Name":
- slave = line[1]
+ slave = item
bonds[bond]["interfaces"][slave] = {}
elif line[0] == "Slave Status":
- bonds[bond]["interfaces"][slave]["status"] =
line[1].lower()
+ bonds[bond]["interfaces"][slave]["status"] =
item.lower()
elif line[0] == "Slave MAC address":
- bonds[bond]["interfaces"][slave]["hwaddr"] =
line[1].lower().replace("-", ":")
+ bonds[bond]["interfaces"][slave]["hwaddr"] =
item.lower().replace("-", ":")
return bonds