def make_zone(filename):
zonefile = load_module(os.path.basename(filename), filename)
zones = zonefile.__zones__
- # TODO do something with the zones
+ # TODO do something more clever with the zones
+ for zone in zones:
+ zone.write(sys.stdout)
if __name__ == "__main__":
for name in sys.argv[1:]:
+import ipaddress
+
second = 1
minute = 60*second
hour = 60*minute
class Address:
def __init__(self, IPv4 = None, IPv6 = None):
- self._IPv4 = IPv4
- self._IPv6 = IPv6
+ self._IPv4 = None if IPv4 is None else ipaddress.IPv4Address(IPv4)
+ self._IPv6 = None if IPv6 is None else ipaddress.IPv6Address(IPv6)
def IPv4(self):
return Address(IPv4 = self._IPv4)
self._NX_TTL = other_TTL if NX_TTL is None else NX_TTL
self._A_TTL = other_TTL if A_TTL is None else A_TTL
self._other_TTL = other_TTL
+
+ def write(self, file):
+ raise NotImplementedError()