summaryrefslogtreecommitdiffstats
path: root/func
diff options
context:
space:
mode:
authorMichael DeHaan <mdehaan@redhat.com>2007-12-17 13:53:56 -0500
committerMichael DeHaan <mdehaan@redhat.com>2007-12-17 13:53:56 -0500
commit347ebdb1b6d19b4ea82bb1c3512242a964973ec8 (patch)
tree76bf74f0a5a1e3fd54518d71987e242accbf837d /func
parent9415533b40ce464700702cea5a72e3d32c8374e5 (diff)
downloadfunc-347ebdb1b6d19b4ea82bb1c3512242a964973ec8.tar.gz
func-347ebdb1b6d19b4ea82bb1c3512242a964973ec8.tar.xz
func-347ebdb1b6d19b4ea82bb1c3512242a964973ec8.zip
Mount module already had an inventory-suitable function, just using that.
Diffstat (limited to 'func')
-rw-r--r--func/minion/modules/mount.py16
1 files changed, 1 insertions, 15 deletions
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()