From 347ebdb1b6d19b4ea82bb1c3512242a964973ec8 Mon Sep 17 00:00:00 2001 From: Michael DeHaan Date: Mon, 17 Dec 2007 13:53:56 -0500 Subject: Mount module already had an inventory-suitable function, just using that. --- func/minion/modules/mount.py | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) (limited to 'func') diff --git a/func/minion/modules/mount.py b/func/minion/modules/mount.py index 2ca15fe..02463e4 100644 --- a/func/minion/modules/mount.py +++ b/func/minion/modules/mount.py @@ -82,21 +82,7 @@ class MountModule(func_module.FuncModule): return False def inventory(self, flatten=True): - cmd = sub_process.Popen(["/bin/mount"], stdout=sub_process.PIPE, shell=False) - output = cmd.communicate()[0] - lines = output.split("\n") - results = [] - for line in lines: - if line.find(" on ") == -1: - continue - (resource,rest) = line.split(" on ") - (mountpoint,mtype) = rest.split(" type ") - (realtype, params) = mtype.split(None) - params = params.replace("(","") - params = params.replace(")","") - paramlist = params.split(",") - results.append([resource,mountpoint,realtype,paramlist]) - return results + return self.list() methods = MountModule() -- cgit