SIGTERM again
[handlervirt.git] / ModuleClusterStats.py
blobe2f81e24dc8bcf02af69e0b26454ea001a93c15f
1 from Form import *
2 from Table import *
3 from Module import *
4 from validations import *
6 NOTE_SERVICE_TYPE = 'What service type should we browse on the network for.'
8 class ModuleAvahiBase (Module, FormHelper):
9 PROPERTIES = [
10 'service_type'
13 def __init__ (self, cfg, prefix, name, submit_url):
14 FormHelper.__init__ (self, name, cfg)
15 Module.__init__ (self, name, cfg, prefix, submit_url)
17 def _op_render (self):
18 txt = "<h2>Avahi options</h2>"
20 table = TableProps()
21 self.AddPropEntry (table, "mDNS Service Type", "%s!service_type" % (self._prefix), NOTE_SERVICE_TYPE)
22 txt += self.Indent(table)
24 return txt
26 def _op_apply_changes (self, uri, post):
27 self.ApplyChangesPrefix (self._prefix, [], post)
30 class ModuleAvahi (ModuleAvahiBase):
31 def __init__ (self, cfg, prefix, submit_url):
32 ModuleAvahiBase.__init__ (self, cfg, prefix, 'avahi', submit_url)
34 def _op_render (self):
35 return ModuleAvahiBase._op_render (self)
37 def _op_apply_changes (self, uri, post):
38 return ModuleAvahiBase._op_apply_changes (self, uri, post)