settings/hosts.py
author Tero Marttila <terom@fixme.fi>
Thu, 02 Apr 2009 20:19:18 +0300
changeset 1 2223ade4f259
child 4 8b633782f02d
permissions -rw-r--r--
continue the overengineering effort, we are now able to generate dhcpd.conf files
from addr import IP, Network
from host import Interface, Host
from dhcp import Subnet

dhcp_settings = {
    'default-lease-time':   43200,
    'max-lease-time':       86400,
    'authorative':          None,
}

dhcp_options = {
    'domain-name-servers':  IP('194.197.235.145'),
}

shared_network  = 'PVL'
subnets         = [
    Subnet(Network('194.197.235.0/24'), router_idx=1, range=(26, 70), unknown_clients='allow'),
    Subnet(Network('192.168.0.0/23'),   router_idx=1, unknown_clients='deny'),
]

hosts           = [
    Host('jumpgate',    IP('194.197.235.1'),    [ ]),
    Host('mikk4',       IP('194.197.235.72'),   [ 
        Interface('00:16:01:37:D1:D2'), 
        Interface('00:0F:B0:0A:EF:58'),
    ]),
]