]> git.llucax.com Git - software/pymin.git/blobdiff - pymin/services/dns/__init__.py
Use a plug-in architecture for services (refs #27).
[software/pymin.git] / pymin / services / dns / __init__.py
index 0576cd05721b28f0770e0be88021c09cfceb430f..c3cf03e68632b6a2aa7bd9f1496d139c0c70fe47 100644 (file)
@@ -11,7 +11,12 @@ from pymin.services.util import Restorable, ConfigWriter, InitdHandler, \
                                 TransactionalHandler, ParametersHandler, \
                                 DictComposedSubHandler, DictSubHandler, call
 
-__all__ = ('DnsHandler',)
+__all__ = ('DnsHandler', 'get_service')
+
+
+def get_service(config):
+    return DnsHandler(config.dns.pickle_dir, config.dns.config_dir)
+
 
 class Host(Sequence):
     def __init__(self, name, ip):