summaryrefslogtreecommitdiffstats
path: root/func
diff options
context:
space:
mode:
authorSteve 'Ashcrow' Milner <stevem@gnulinux.net>2008-01-16 09:27:15 -0500
committerSteve 'Ashcrow' Milner <stevem@gnulinux.net>2008-01-16 09:27:15 -0500
commit1420dbfbb699bbe969228173924bfa92ba7f7ce2 (patch)
treec0c0119f6ac58c3a38d4ac3e5541abcd7181a759 /func
parent79d75b06a1bdae8c5c42026de606ed1787be6030 (diff)
downloadthird_party-func-1420dbfbb699bbe969228173924bfa92ba7f7ce2.tar.gz
third_party-func-1420dbfbb699bbe969228173924bfa92ba7f7ce2.tar.xz
third_party-func-1420dbfbb699bbe969228173924bfa92ba7f7ce2.zip
Updated networktest to be the new way of defining modules and updated func-create-module to add in docstrings.
Diffstat (limited to 'func')
-rw-r--r--func/minion/modules/networktest.py16
1 files changed, 1 insertions, 15 deletions
diff --git a/func/minion/modules/networktest.py b/func/minion/modules/networktest.py
index e88c169..ed2f3ab 100644
--- a/func/minion/modules/networktest.py
+++ b/func/minion/modules/networktest.py
@@ -9,23 +9,13 @@
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-from modules import func_module
+import func_module
from codes import FuncException
import sub_process
class NetworkTest(func_module.FuncModule):
- def __init__(self):
- self.methods = {
- "ping" : self.ping,
- "netstat" : self.netstat,
- "traceroute" : self.traceroute,
- "dig" : self.dig,
- "isportopen" : self.isportopen,
- }
- func_module.FuncModule.__init__(self)
-
def ping(self, *args):
if '-c' not in args:
raise(FuncException("You must define a count with -c!"))
@@ -58,7 +48,3 @@ class NetworkTest(func_module.FuncModule):
full_cmd = [command] + opts
cmd = sub_process.Popen(full_cmd, stdout=sub_process.PIPE)
return [line for line in cmd.communicate()[0].split('\n')]
-
-
-methods = NetworkTest()
-register_rpc = methods.register_rpc