1 # vim: set encoding=utf-8 et sw=4 sts=4 :
3 from formencode import validators as V
4 from pymin.config import Option
5 from handler import DhcpHandler
7 def setup_service(options, config):
8 options.add_group('dhcp', 'DHCP service', [
9 Option('pickle_dir', V.String, metavar='DIR',
10 help='store persistent data in DIR directory'),
11 Option('config_dir', V.String, metavar='DIR',
12 help='write config file in DIR directory'),
15 def get_service(config):
16 return DhcpHandler(config.dhcp.pickle_dir, config.dhcp.config_dir)