]> git.llucax.com Git - software/pymin.git/commitdiff
Remove plug-in code from handler module in services (refs #27).
authorLeandro Lucarella <llucax@gmail.com>
Mon, 16 Jun 2008 20:03:41 +0000 (17:03 -0300)
committerLeandro Lucarella <llucax@gmail.com>
Mon, 16 Jun 2008 20:03:41 +0000 (17:03 -0300)
services/dhcp/handler.py
services/dns/handler.py
services/firewall/handler.py
services/ip/handler.py
services/nat/handler.py
services/ppp/handler.py
services/proxy/handler.py
services/qos/handler.py
services/vpn/handler.py
services/vrrp/handler.py

index c33a555ab31c4fcc989e67456b4f619efd0c0800..f27f984d66a3d643a717ccd89d7740ae9dc5930f 100644 (file)
@@ -9,11 +9,7 @@ from pymin.service.util import Restorable, ConfigWriter, InitdHandler, \
                                TransactionalHandler, ParametersHandler, \
                                DictSubHandler, ReloadHandler
 
-__all__ = ('DhcpHandler', 'get_service')
-
-
-def get_service(config):
-    return DhcpHandler(config.dhcp.pickle_dir, config.dhcp.config_dir)
+__all__ = ('DhcpHandler')
 
 
 class Host(Sequence):
index 23046c5645172df432c01975be70a75a59a2065c..fb6692373a4fb05affc1400901cff270d270a072 100644 (file)
@@ -11,11 +11,7 @@ from pymin.service.util import Restorable, ConfigWriter, InitdHandler, \
                                TransactionalHandler, ParametersHandler, \
                                DictComposedSubHandler, DictSubHandler, call
 
-__all__ = ('DnsHandler', 'get_service')
-
-
-def get_service(config):
-    return DnsHandler(config.dns.pickle_dir, config.dns.config_dir)
+__all__ = ('DnsHandler')
 
 
 class Host(Sequence):
index 50a8dfb10683a2418b317186d05373faa7932d1a..b2341675a0881f5360d8d4e4ba2dee0a3ba6a318 100644 (file)
@@ -14,11 +14,7 @@ from pymin.dispatcher import Handler, handler, HandlerError
 from pymin.service.util import Restorable, ConfigWriter, ServiceHandler, \
                                TransactionalHandler, ListSubHandler
 
-__all__ = ('FirewallHandler', 'get_service')
-
-
-def get_service(config):
-    return FirewallHandler(config.firewall.pickle_dir, config.firewall.config_dir)
+__all__ = ('FirewallHandler')
 
 
 class UpOneOf(OneOf):
index 2bbc288cf665cbef39859b056a2af9c7cbdae9f6..cf2c18bdb60dee8ed1678850a685c861221d1552 100644 (file)
@@ -12,11 +12,7 @@ from pymin.service.util import Restorable, ConfigWriter, InitdHandler, \
                                DictComposedSubHandler, ListSubHandler, \
                                Device, Address, ExecutionError
 
-__all__ = ('IpHandler', 'get_service')
-
-
-def get_service(config):
-    return IpHandler(config.ip.pickle_dir, config.ip.config_dir)
+__all__ = ('IpHandler')
 
 
 class Hop(Sequence):
index 32e2608b930c11f2ddc3f65e3a3294c036377bc1..042a23c290c7997a910ddd05a8cc832a62b556bf 100644 (file)
@@ -9,11 +9,7 @@ from pymin.service.util import Restorable, ConfigWriter, RestartHandler, \
                                ReloadHandler, TransactionalHandler, \
                                ServiceHandler, ListSubHandler, call
 
-__all__ = ('NatHandler', 'get_service')
-
-
-def get_service(config):
-    return NatHandler(config.nat.pickle_dir)
+__all__ = ('NatHandler')
 
 
 class PortForward(Sequence):
index 9c6bdff6db22d31a1e8372bf31e7e381035ba845..6dc835f967df61ff41258cd0fcc45e7daa38bc8f 100644 (file)
@@ -11,11 +11,7 @@ from pymin.dispatcher import Handler, handler, HandlerError
 from pymin.service.util import Restorable, ConfigWriter, ReloadHandler, \
                                TransactionalHandler, DictSubHandler, call
 
-__all__ = ('PppHandler', 'get_service')
-
-
-def get_service(config):
-    return PppHandler(config.ppp.pickle_dir, config.ppp.config_dir)
+__all__ = ('PppHandler')
 
 
 class ConnectionError(HandlerError, KeyError):
index 63237e1ab5ca3a571089932efa6023f949fb558b..a2e86e51e6442898bf97ce1f420fa68e3e9a51a4 100644 (file)
@@ -10,11 +10,7 @@ from pymin.service.util import Restorable, ConfigWriter, InitdHandler, \
                                TransactionalHandler, ParametersHandler, \
                                DictSubHandler
 
-__all__ = ('ProxyHandler', 'get_service')
-
-
-def get_service(config):
-    return ProxyHandler(config.proxy.pickle_dir, config.proxy.config_dir)
+__all__ = ('ProxyHandler')
 
 
 class Host(Sequence):
index c17504951f96e88fd5070030f7c892c90df2e838..9b07bb044ae49f7aeade9836c33af898bccc3050 100644 (file)
@@ -10,11 +10,7 @@ from pymin.service.util import Restorable, ConfigWriter, InitdHandler, \
                                get_network_devices, ListComposedSubHandler, \
                                DictComposedSubHandler, ExecutionError
 
-__all__ = ('QoSHandler', 'get_service')
-
-
-def get_service(config):
-    return QoSHandler(config.qos.pickle_dir, config.qos.config_dir)
+__all__ = ('QoSHandler')
 
 
 class DeviceError(HandlerError):
index 4f0e04ba31d01a597ad6a004b726093e67367105..802e089393ac6f9eb3c31e8760292baafeecc478 100644 (file)
@@ -11,11 +11,7 @@ from pymin.dispatcher import Handler, handler, HandlerError
 from pymin.service.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)
+__all__ = ('VpnHandler')
 
 
 class Host(Sequence):
index 2f51263a6886fd8e8b50076d36ca21bb3cf9ecca..9d8e5b5dbaa3e7f151116f6501f72098e3fb2dc4 100644 (file)
@@ -7,11 +7,7 @@ from pymin.service.util import Restorable, TransactionalHandler, \
                                ReloadHandler, RestartHandler, \
                                ServiceHandler, ParametersHandler
 
-__all__ = ('VrrpHandler', 'get_service')
-
-
-def get_service(config):
-    return VrrpHandler(config.vrrp.pickle_dir, config.vrrp.config_dir)
+__all__ = ('VrrpHandler')
 
 
 # FIXME the the command should not use new parameters unless commit where called