]> git.llucax.com Git - software/pymin.git/blobdiff - config.py
Use a handler object as the root dispatcher handler instead of a dict.
[software/pymin.git] / config.py
index f433170dae6664ee393ad2e20a2f7bc232a33bcf..5ae043d9ac0f3aa10f308c04590d3aed6a8b8f0e 100644 (file)
--- a/config.py
+++ b/config.py
@@ -1,19 +1,24 @@
 # vim: set et sts=4 sw=4 encoding=utf-8 :
 
 # vim: set et sts=4 sw=4 encoding=utf-8 :
 
-from services import *
+from pymin.services import *
+from pymin.dispatcher import Handler
 
 
-# XXX for testing only
-def test_func(*args):
-    print 'func:', args
-
-routes = dict \
-(
-    test = test_func,
+class Root(Handler):
     dhcp = DhcpHandler(
         pickle_dir = 'var/lib/pymin/pickle/dhcp',
     dhcp = DhcpHandler(
         pickle_dir = 'var/lib/pymin/pickle/dhcp',
-        config_dir = 'var/lib/pymin/config/dhcp',
-    ),
-)
+        config_dir = 'var/lib/pymin/config/dhcp')
+    dns = DnsHandler(
+        pickle_dir = 'var/lib/pymin/pickle/dns',
+        config_dir = 'var/lib/pymin/config/dns')
+    firewall = FirewallHandler(
+        pickle_dir = 'var/lib/pymin/pickle/firewall',
+        config_dir = 'var/lib/pymin/config/firewall')
+    ip = IpHandler(
+        pickle_dir = 'var/lib/pymin/pickle/ip',
+        config_dir = 'var/lib/pymin/config/ip')
+    proxy = ProxyHandler(
+        pickle_dir = 'var/lib/pymin/pickle/proxy',
+        config_dir = 'var/lib/pymin/config/proxy')
 
 bind_addr = \
 (
 
 bind_addr = \
 (