]> git.llucax.com Git - software/pymin.git/blob - services/proxy/host.py
Split proxy handler in submodules (refs #2).
[software/pymin.git] / services / proxy / host.py
1 # vim: set encoding=utf-8 et sw=4 sts=4 :
2
3 from pymin.seqtools import Sequence
4 from pymin.service.util import DictSubHandler
5
6 __all__ = ('HostHandler',)
7
8
9 class Host(Sequence):
10     def __init__(self,ip):
11         self.ip = ip
12     def as_tuple(self):
13         return (self.ip,)
14
15 # TODO convert to a SetSubHandler
16
17 class HostHandler(DictSubHandler):
18
19     handler_help = u"Manage proxy hosts"
20
21     _cont_subhandler_attr = 'hosts'
22     _cont_subhandler_class = Host
23