fix up data.load_py, and make conf.File be a ConfObject itself - implement this for dhcp_conf
"""
Used to define IP-address/subnet stuff
"""
import IPy
class IP (IPy.IP, object) :
"""
A literal IPv4 address
"""
def __init__ (self, address) :
"""
Parse the given literal IP address in "a.b.c.d" form
"""
super(IP, self).__init__(address)
class Network (IPy.IP, object) :
"""
An IPv4 network (subnet)
"""
def __init__ (self, prefix) :
"""
Parse the given prefix in "a.b.c.d/l" form
"""
super(Network, self).__init__(prefix)
class MAC (object) :
"""
A mac address
"""
def __init__ (self, mac) :
"""
Parse the given MAC address in "aa:bb:cc:dd:ee:ff" form
"""
# XXX: validate
self.mac = mac
def __str__ (self) :
return self.mac