pvl.hosts.config: add top-level host to includes.test
authorTero Marttila <tero.marttila@aalto.fi>
Thu, 26 Feb 2015 17:40:12 +0200
changeset 509 ae53114766fc
parent 508 a47849709cbf
child 510 368a568412ed
pvl.hosts.config: add top-level host to includes.test
README
etc/hosts/includes.test
pvl/hosts/tests.py
--- a/README	Thu Feb 26 17:39:51 2015 +0200
+++ b/README	Thu Feb 26 17:40:12 2015 +0200
@@ -42,12 +42,15 @@
         fixed-address 127.0.0.2;
     }
 
-=== Include confs ===
+=== Includes ===
 Host configs can be included:
 
     $ cat etc/hosts/includes.test
     include = includes.test.d/
 
+    [quux]
+        ip  = 192.0.2.3
+
     $ cat etc/hosts/includes.test.d/foo 
     ip = 192.0.2.1
 
@@ -57,6 +60,7 @@
     $ ./opt/bin/python bin/pvl.hosts-forward --forward-zone test etc/hosts/includes.test
     foo.includes                      A     192.0.2.1
     bar.includes                      A     192.0.2.2
+    quux.includes                     A     192.0.2.3
 
 === Host aliases ===
 Hosts can specify DNS aliases:
--- a/etc/hosts/includes.test	Thu Feb 26 17:39:51 2015 +0200
+++ b/etc/hosts/includes.test	Thu Feb 26 17:40:12 2015 +0200
@@ -1,1 +1,4 @@
 include = includes.test.d/
+
+[quux]
+    ip  = 192.0.2.3
--- a/pvl/hosts/tests.py	Thu Feb 26 17:39:51 2015 +0200
+++ b/pvl/hosts/tests.py	Thu Feb 26 17:40:12 2015 +0200
@@ -122,6 +122,9 @@
                 ('bar@includes.test', dict(
                     ip          = ipaddr.IPAddress('192.0.2.2'),
                 )),
+                ('quux@includes.test', dict(
+                    ip          = ipaddr.IPAddress('192.0.2.3'),
+                )),
         ])
 
     def testApply(self):