1 # vim: set encoding=utf-8 et sw=4 sts=4 :
5 from pymin.validation import Item, Field, FullyQualifiedHostName, UInt16
6 from pymin.service.util import DictComposedSubHandler
8 __all__ = ('MailExchangeHandler',)
11 class MailExchange(Item):
12 mx = Field(FullyQualifiedHostName(not_empty=True))
13 prio = Field(UInt16(not_empty=True))
15 class MailExchangeHandler(DictComposedSubHandler):
16 handler_help = u"Manage DNS mail exchangers (MX)"
17 _comp_subhandler_cont = 'zones'
18 _comp_subhandler_attr = 'mxs'
19 _comp_subhandler_class = MailExchange