1 # vim: set encoding=utf-8 et sw=4 sts=4 :
3 # TODO documentation, validation
5 from pymin.seqtools import Sequence
6 from pymin.service.util import DictComposedSubHandler
8 __all__ = ('MailExchangeHandler',)
11 class MailExchange(Sequence):
12 def __init__(self, mx, prio):
15 def update(self, prio=None):
16 if prio is not None: self.prio = prio
18 return (self.mx, self.prio)
20 class MailExchangeHandler(DictComposedSubHandler):
21 handler_help = u"Manage DNS mail exchangers (MX)"
22 _comp_subhandler_cont = 'zones'
23 _comp_subhandler_attr = 'mxs'
24 _comp_subhandler_class = MailExchange