diff options
author | Michael DeHaan <mdehaan@redhat.com> | 2007-10-24 15:47:40 -0400 |
---|---|---|
committer | Michael DeHaan <mdehaan@redhat.com> | 2007-10-24 15:47:40 -0400 |
commit | 1215af4b5430163ece944b2464f936e1c4278cfd (patch) | |
tree | eb350bfd8414a1c965c57102853a7d0f59b02d3c /func | |
parent | bb56e5bf579267d4bc76883ebddcc7c0f8a8852c (diff) | |
download | third_party-func-1215af4b5430163ece944b2464f936e1c4278cfd.tar.gz third_party-func-1215af4b5430163ece944b2464f936e1c4278cfd.tar.xz third_party-func-1215af4b5430163ece944b2464f936e1c4278cfd.zip |
Add a new method "inventory" which will be the default method func-inventory will call, so that modules
that have non-constant data (like the process module) won't record their data in func-inventory by default.
Only modules that have mostly-static data will have an inventory method, though often this will be aliased
to their existing info() method -- but maybe not always.
Diffstat (limited to 'func')
-rwxr-xr-x | func/minion/modules/hardware.py | 5 | ||||
-rwxr-xr-x | func/minion/modules/smart.py | 3 | ||||
-rwxr-xr-x | func/minion/modules/virt.py | 21 |
3 files changed, 16 insertions, 13 deletions
diff --git a/func/minion/modules/hardware.py b/func/minion/modules/hardware.py index 79faf4c..3b22232 100755 --- a/func/minion/modules/hardware.py +++ b/func/minion/modules/hardware.py @@ -29,8 +29,9 @@ from modules import func_module class HardwareModule(func_module.FuncModule): def __init__(self): self.methods = { - "info" : self.info, - "hal_info" : self.hal_info + "info" : self.info, + "inventory" : self.info, # for func-inventory + "hal_info" : self.hal_info } func_module.FuncModule.__init__(self) diff --git a/func/minion/modules/smart.py b/func/minion/modules/smart.py index c65dfb1..ca8f301 100755 --- a/func/minion/modules/smart.py +++ b/func/minion/modules/smart.py @@ -26,7 +26,8 @@ from modules import func_module class SmartModule(func_module.FuncModule): def __init__(self): self.methods = { - "info" : self.info, + "info" : self.info, + "inventory" : self.info, # for func-inventory } func_module.FuncModule.__init__(self) diff --git a/func/minion/modules/virt.py b/func/minion/modules/virt.py index 0c9acf0..7dc5697 100755 --- a/func/minion/modules/virt.py +++ b/func/minion/modules/virt.py @@ -130,16 +130,17 @@ class Virt(func_module.FuncModule): """ self.methods = { - "install" : self.install, - "shutdown" : self.shutdown, - "destroy" : self.destroy, - "start" : self.create, - "pause" : self.pause, - "unpause" : self.unpause, - "delete" : self.undefine, - "status" : self.get_status, - "info" : self.info, - "list_vms" : self.list_vms, + "install" : self.install, + "shutdown" : self.shutdown, + "destroy" : self.destroy, + "start" : self.create, + "pause" : self.pause, + "unpause" : self.unpause, + "delete" : self.undefine, + "status" : self.get_status, + "info" : self.info, + "inventory" : self.info, # for func-inventory + "list_vms" : self.list_vms, } func_module.FuncModule.__init__(self) |