diff options
author | Michael DeHaan <mdehaan@mdehaan.rdu.redhat.com> | 2007-09-24 14:30:53 -0400 |
---|---|---|
committer | Michael DeHaan <mdehaan@mdehaan.rdu.redhat.com> | 2007-09-24 14:30:53 -0400 |
commit | 9fa149f6e2a5a0d3233644298a5d50db3f8b6748 (patch) | |
tree | f051dd74be397866290d959844741d65ad1260a8 | |
parent | 84207483cc8a8d00d047ab3c15e2f15cb194884c (diff) | |
download | func-9fa149f6e2a5a0d3233644298a5d50db3f8b6748.tar.gz func-9fa149f6e2a5a0d3233644298a5d50db3f8b6748.tar.xz func-9fa149f6e2a5a0d3233644298a5d50db3f8b6748.zip |
Basic plugin for checking SMART status on drives.
-rw-r--r-- | client/test_func.py | 12 | ||||
-rwxr-xr-x | modules/smart.py | 3 |
2 files changed, 9 insertions, 6 deletions
diff --git a/client/test_func.py b/client/test_func.py index 6362b85..bcce45d 100644 --- a/client/test_func.py +++ b/client/test_func.py @@ -5,10 +5,11 @@ import xmlrpclib -TEST_PROCESS = True +TEST_PROCESS = False TEST_VIRT = False -TEST_SERVICES = True -TEST_HARDWARE = True +TEST_SERVICES = False +TEST_HARDWARE = False +TEST_SMART = True # get a connecton (to be replaced by client lib logic) s = xmlrpclib.ServerProxy("http://127.0.0.1:51234") @@ -16,9 +17,12 @@ s = xmlrpclib.ServerProxy("http://127.0.0.1:51234") # here's the basic test... print s.test.add(1, 2) +if TEST_SMART: + print s.smart.info() + if TEST_PROCESS: print s.process.info() - print s.process.pkill("thunderbird") + # print s.process.pkill("thunderbird") # here's the service module testing if TEST_SERVICES: diff --git a/modules/smart.py b/modules/smart.py index fc4c329..410e353 100755 --- a/modules/smart.py +++ b/modules/smart.py @@ -46,8 +46,7 @@ class SmartModule(func_module.FuncModule): results = [] for x in data.split("\n"): - tokens = x.split() - results.append(tokens) + results.append(x) return (cmd.returncode, results) |