1 # vim: set encoding=utf-8 et sw=4 sts=4 :
3 from pymin.validation import Item, Field, Any, HostName, \
4 FullyQualifiedHostName, IPAddress, CIDR
5 from pymin.service.util import DictComposedSubHandler
7 __all__ = ('HostHandler',)
11 name = Field(HostName(not_empty=True))
12 address = Field(Any(HostName, FullyQualifiedHostName, IPAddress))
15 class HostHandler(DictComposedSubHandler):
17 handler_help = u"Manage hosts for a vpn"
18 _comp_subhandler_cont = 'vpns'
19 _comp_subhandler_attr = 'hosts'
20 _comp_subhandler_class = Host