diff options
author | Michael DeHaan <mdehaan@redhat.com> | 2007-12-17 12:18:45 -0500 |
---|---|---|
committer | Michael DeHaan <mdehaan@redhat.com> | 2007-12-17 12:18:45 -0500 |
commit | 9806fbbebb7d9e28cc58ab5388ad646ffbf7ebb6 (patch) | |
tree | 82ef2ab118e367048eaa5fde851acdb14713c7a6 | |
parent | 0dfe68bf49ba03d3fb46bc6d6d87f4085db0d18b (diff) | |
download | third_party-func-9806fbbebb7d9e28cc58ab5388ad646ffbf7ebb6.tar.gz third_party-func-9806fbbebb7d9e28cc58ab5388ad646ffbf7ebb6.tar.xz third_party-func-9806fbbebb7d9e28cc58ab5388ad646ffbf7ebb6.zip |
Added inventory module for mount, though something has broken func-inventory's ability to query remote modules and I am still chasing what that is.
-rw-r--r-- | func/minion/modules/mount.py | 3 | ||||
-rwxr-xr-x | func/minion/server.py | 1 | ||||
-rwxr-xr-x | func/overlord/inventory.py | 5 |
3 files changed, 8 insertions, 1 deletions
diff --git a/func/minion/modules/mount.py b/func/minion/modules/mount.py index e0cbe75..d29ba9d 100644 --- a/func/minion/modules/mount.py +++ b/func/minion/modules/mount.py @@ -24,6 +24,7 @@ class MountModule(func_module.FuncModule): "list": self.list, "mount": self.mount, "umount": self.umount + "inventory": self.inventory, } func_module.FuncModule.__init__(self) @@ -80,7 +81,7 @@ class MountModule(func_module.FuncModule): else: return False - def inventory(): + def inventory(self): cmd = sub_process.Popen(["/bin/mount"], stdout=sub_process.PIPE, shell=False) output = cmd.communicate()[0] lines = output.split("\n") diff --git a/func/minion/server.py b/func/minion/server.py index 3ef7786..ef9e112 100755 --- a/func/minion/server.py +++ b/func/minion/server.py @@ -78,6 +78,7 @@ class XmlRpcInterface(object): # system.listMethods os a quasi stanard xmlrpc method, so # thats why it has a odd looking name self.handlers["system.listMethods"] = self.list_methods + self.handlers["system.list_methods"] = self.list_methods self.handlers["system.list_modules"] = self.list_modules def list_modules(self): diff --git a/func/overlord/inventory.py b/func/overlord/inventory.py index 8bb5942..28a269e 100755 --- a/func/overlord/inventory.py +++ b/func/overlord/inventory.py @@ -98,7 +98,12 @@ class FuncInventory(object): if options.verbose: print "---- scanning module: %s" % module_name host_module = getattr(func_client.Client(host,noglobs=True),module_name) + if options.verbose: + print "--- DEBUG: remote module: %s" % host_module + remote_methods = host_module.list_methods() + if options.verbose: + print "--- DEBUG: available remote methods: %s" % remote_methods for remote_method in remote_methods: if ("all" in filtered_function_list) or (remote_method in filtered_function_list): if options.verbose: |