host.py
changeset 5 86b05c0ab5cd
parent 1 2223ade4f259
--- a/host.py	Thu Apr 02 22:52:26 2009 +0300
+++ b/host.py	Thu Apr 02 23:59:31 2009 +0300
@@ -3,6 +3,7 @@
 """
 
 import dhcp
+import bind_conf as bindc
 
 class Interface (object) :
     """
@@ -50,3 +51,10 @@
             # build it
             yield dhcp.Host(name, iface.addr, self.address)
 
+    def build_bind_domain_records (self, origin) :
+        """
+            Build and yield one or more forward records (A/AAAA) for the host, with the given domain as the origin
+        """
+
+        yield bindc.A(self.hostname, self.address)
+