]> git.llucax.com Git - software/pymin.git/blobdiff - pymin/services/vpn/__init__.py
Use a plug-in architecture for services (refs #27).
[software/pymin.git] / pymin / services / vpn / __init__.py
index f3b9f95a422f8ffea42df0c4dd64d447f7cdff96..066e8fc42d8f2aeaa34e5752a7578edc9533b114 100644 (file)
@@ -13,6 +13,13 @@ from pymin.services.util import Restorable, ConfigWriter, InitdHandler, \
                                 TransactionalHandler, DictSubHandler, DictComposedSubHandler, call, ExecutionError
 
 
+__all__ = ('VpnHandler', 'get_service')
+
+
+def get_service(config):
+    return VpnHandler(config.vpn.pickle_dir, config.vpn.config_dir)
+
+
 class Host(Sequence):
     def __init__(self, vpn_src, ip, vpn_src_net, key):
         self.name = vpn_src