Package web :: Package pluginmanager :: Package plugins :: Package hardware_inventory :: Module plugin
[hide private]
[frames] | no frames]

Source Code for Module web.pluginmanager.plugins.hardware_inventory.plugin

 1  ''' 
 2  Inventory Hardware Module 
 3  ''' 
 4   
 5  import web 
 6   
 7   
8 -class Plugin(PluginBase):
9 ''' 10 '''
11 - def enable(self):
12 self.urls = ('/action/searchbyhardware', 13 'searchbyhardwareview.SearchByHardwareView', 14 '/action/createhardwareprofile', 15 'createhardwareprofileview.CreateHardwareProfileView', 16 '/action/updatehardwareprofile', 17 'updatehardwareprofileview.UpdateHardwareProfileView', 18 '/action/deletehardwareprofile', 19 'deletehardwareprofileview.DeleteHardwareProfileView')
20
21 - def disable(self):
22 pass
23
24 - def install(self):
25 pass
26
27 - def uninstall(self):
28 pass
29
30 - def get_options(self):
31 return None
32
33 - def save_options(self, inputs):
34 pass
35
36 - def get_actions_for_ou(self, ou):
37 return []
38
39 - def get_actions_for_computer(self, computer):
40 # If the computer has a hardware profile 41 if computer.hardware: 42 return [action["updatehardwareprofile"], 43 action["deletehardwareprofile"]] 44 else: 45 return [action["createhardwareprofile"]]
46