]> git.llucax.com Git - software/pymin.git/commitdiff
Move services outside the "static" pymin modules structure (refs #27).
authorLeandro Lucarella <llucax@gmail.com>
Mon, 16 Jun 2008 19:26:44 +0000 (16:26 -0300)
committerLeandro Lucarella <llucax@gmail.com>
Mon, 16 Jun 2008 19:45:00 +0000 (16:45 -0300)
39 files changed:
config.py
pymin/service/__init__.py [moved from pymin/services/__init__.py with 100% similarity]
pymin/service/util.py [moved from pymin/services/util.py with 99% similarity]
pymind
services/dhcp/__init__.py [moved from pymin/services/dhcp/__init__.py with 95% similarity]
services/dhcp/templates/dhcpd.conf [moved from pymin/services/dhcp/templates/dhcpd.conf with 100% similarity]
services/dns/__init__.py [moved from pymin/services/dns/__init__.py with 97% similarity]
services/dns/templates/named.conf [moved from pymin/services/dns/templates/named.conf with 100% similarity]
services/dns/templates/zoneX.zone [moved from pymin/services/dns/templates/zoneX.zone with 100% similarity]
services/firewall/__init__.py [moved from pymin/services/firewall/__init__.py with 97% similarity]
services/firewall/templates/iptables.sh [moved from pymin/services/firewall/templates/iptables.sh with 100% similarity]
services/ip/__init__.py [moved from pymin/services/ip/__init__.py with 97% similarity]
services/ip/templates/device [moved from pymin/services/ip/templates/device with 100% similarity]
services/ip/templates/hop [moved from pymin/services/ip/templates/hop with 100% similarity]
services/ip/templates/ip_add [moved from pymin/services/ip/templates/ip_add with 100% similarity]
services/ip/templates/ip_del [moved from pymin/services/ip/templates/ip_del with 100% similarity]
services/ip/templates/ip_flush [moved from pymin/services/ip/templates/ip_flush with 100% similarity]
services/ip/templates/route_add [moved from pymin/services/ip/templates/route_add with 100% similarity]
services/ip/templates/route_del [moved from pymin/services/ip/templates/route_del with 100% similarity]
services/ip/templates/route_flush [moved from pymin/services/ip/templates/route_flush with 100% similarity]
services/nat/__init__.py [moved from pymin/services/nat/__init__.py with 97% similarity]
services/ppp/__init__.py [moved from pymin/services/ppp/__init__.py with 98% similarity]
services/ppp/templates/chap-secrets [moved from pymin/services/ppp/templates/chap-secrets with 100% similarity]
services/ppp/templates/nameX [moved from pymin/services/ppp/templates/nameX with 100% similarity]
services/ppp/templates/options.X [moved from pymin/services/ppp/templates/options.X with 100% similarity]
services/ppp/templates/pap-secrets [moved from pymin/services/ppp/templates/pap-secrets with 100% similarity]
services/proxy/__init__.py [moved from pymin/services/proxy/__init__.py with 93% similarity]
services/proxy/templates/squid.conf [moved from pymin/services/proxy/templates/squid.conf with 100% similarity]
services/proxy/templates/users.conf [moved from pymin/services/proxy/templates/users.conf with 100% similarity]
services/qos/__init__.py [moved from pymin/services/qos/__init__.py with 96% similarity]
services/qos/templates/class_add [moved from pymin/services/qos/templates/class_add with 100% similarity]
services/qos/templates/class_del [moved from pymin/services/qos/templates/class_del with 100% similarity]
services/qos/templates/device [moved from pymin/services/qos/templates/device with 100% similarity]
services/qos/templates/host_add [moved from pymin/services/qos/templates/host_add with 100% similarity]
services/vpn/__init__.py [moved from pymin/services/vpn/__init__.py with 97% similarity]
services/vpn/templates/host [moved from pymin/services/vpn/templates/host with 100% similarity]
services/vpn/templates/tinc-up [moved from pymin/services/vpn/templates/tinc-up with 100% similarity]
services/vpn/templates/tinc.conf [moved from pymin/services/vpn/templates/tinc.conf with 100% similarity]
services/vrrp/__init__.py [moved from pymin/services/vrrp/__init__.py with 92% similarity]

index aa3e5ebc92c472f452c114abc43c119e070838be..26f84428ef7cca0e89bc300e013b771831b6e265 100644 (file)
--- a/config.py
+++ b/config.py
@@ -83,5 +83,5 @@ bind_addr = \
 
 services = 'firewall nat ppp vpn ip dns dhcp proxy vrrp qos'.split()
 
-services_dirs = ['pymin/services']
+services_dirs = ['services']
 
similarity index 99%
rename from pymin/services/util.py
rename to pymin/service/util.py
index 00f238535416dbb8b14947fc5fae2d26c26c45d4..cdea1a09aa1d22a391e7176b3fd096795e6e9eb9 100644 (file)
@@ -8,7 +8,7 @@ try:
     import cPickle as pickle
 except ImportError:
     import pickle
-import logging ; log = logging.getLogger('pymin.services.util')
+import logging ; log = logging.getLogger('pymin.service.util')
 
 from pymin.dispatcher import Handler, handler, HandlerError, \
                                 CommandNotFoundError
diff --git a/pymind b/pymind
index 2f428b52deda71afee4fbf3294dd0099ef973547..c29dabb4b7acc9391408f055861044ceb9bc0682 100755 (executable)
--- a/pymind
+++ b/pymind
@@ -4,7 +4,7 @@
 import sys
 from pymin.pymindaemon import PyminDaemon
 from pymin.dispatcher import Handler
-from pymin.services import load_service, LoadError
+from pymin.service import load_service, LoadError
 import config
 
 class Root(Handler):
similarity index 95%
rename from pymin/services/dhcp/__init__.py
rename to services/dhcp/__init__.py
index 1c6a91960a0544c73d339031f0265cb500b33670..c33a555ab31c4fcc989e67456b4f619efd0c0800 100644 (file)
@@ -5,9 +5,9 @@ import logging ; log = logging.getLogger('pymin.services.dhcp')
 
 from pymin.seqtools import Sequence
 from pymin.dispatcher import Handler, handler, HandlerError
-from pymin.services.util import Restorable, ConfigWriter, InitdHandler, \
-                                TransactionalHandler, ParametersHandler, \
-                                DictSubHandler, ReloadHandler
+from pymin.service.util import Restorable, ConfigWriter, InitdHandler, \
+                               TransactionalHandler, ParametersHandler, \
+                               DictSubHandler, ReloadHandler
 
 __all__ = ('DhcpHandler', 'get_service')
 
similarity index 97%
rename from pymin/services/dns/__init__.py
rename to services/dns/__init__.py
index c3cf03e68632b6a2aa7bd9f1496d139c0c70fe47..23046c5645172df432c01975be70a75a59a2065c 100644 (file)
@@ -7,9 +7,9 @@ import logging ; log = logging.getLogger('pymin.services.dns')
 
 from pymin.seqtools import Sequence
 from pymin.dispatcher import handler, HandlerError, Handler
-from pymin.services.util import Restorable, ConfigWriter, InitdHandler, \
-                                TransactionalHandler, ParametersHandler, \
-                                DictComposedSubHandler, DictSubHandler, call
+from pymin.service.util import Restorable, ConfigWriter, InitdHandler, \
+                               TransactionalHandler, ParametersHandler, \
+                               DictComposedSubHandler, DictSubHandler, call
 
 __all__ = ('DnsHandler', 'get_service')
 
similarity index 97%
rename from pymin/services/firewall/__init__.py
rename to services/firewall/__init__.py
index 7b17c23f0de25c138c667214c345f129369c6342..50a8dfb10683a2418b317186d05373faa7932d1a 100644 (file)
@@ -11,8 +11,8 @@ import logging ; log = logging.getLogger('pymin.services.firewall')
 from pymin.item import Item
 from pymin.validatedclass import Field
 from pymin.dispatcher import Handler, handler, HandlerError
-from pymin.services.util import Restorable, ConfigWriter, ServiceHandler, \
-                                TransactionalHandler, ListSubHandler
+from pymin.service.util import Restorable, ConfigWriter, ServiceHandler, \
+                               TransactionalHandler, ListSubHandler
 
 __all__ = ('FirewallHandler', 'get_service')
 
similarity index 97%
rename from pymin/services/ip/__init__.py
rename to services/ip/__init__.py
index 54ee30b020ab0e1b4045adf5772c35837ed205cf..2bbc288cf665cbef39859b056a2af9c7cbdae9f6 100644 (file)
@@ -6,11 +6,11 @@ import logging ; log = logging.getLogger('pymin.services.ip')
 
 from pymin.seqtools import Sequence
 from pymin.dispatcher import handler, HandlerError, Handler
-from pymin.services.util import Restorable, ConfigWriter, InitdHandler, \
-                                TransactionalHandler, SubHandler, call, \
-                                get_network_devices, ListComposedSubHandler, \
-                                DictComposedSubHandler, ListSubHandler, \
-                                Device, Address, ExecutionError
+from pymin.service.util import Restorable, ConfigWriter, InitdHandler, \
+                               TransactionalHandler, SubHandler, call, \
+                               get_network_devices, ListComposedSubHandler, \
+                               DictComposedSubHandler, ListSubHandler, \
+                               Device, Address, ExecutionError
 
 __all__ = ('IpHandler', 'get_service')
 
similarity index 97%
rename from pymin/services/nat/__init__.py
rename to services/nat/__init__.py
index 3afc997de8830b8939106474bd1d7b22a8a405e1..32e2608b930c11f2ddc3f65e3a3294c036377bc1 100644 (file)
@@ -5,9 +5,9 @@ import logging ; log = logging.getLogger('pymin.services.nat')
 
 from pymin.seqtools import Sequence
 from pymin.dispatcher import Handler, handler, HandlerError
-from pymin.services.util import Restorable, ConfigWriter, RestartHandler, \
-                                ReloadHandler, TransactionalHandler, \
-                                ServiceHandler, ListSubHandler, call
+from pymin.service.util import Restorable, ConfigWriter, RestartHandler, \
+                               ReloadHandler, TransactionalHandler, \
+                               ServiceHandler, ListSubHandler, call
 
 __all__ = ('NatHandler', 'get_service')
 
similarity index 98%
rename from pymin/services/ppp/__init__.py
rename to services/ppp/__init__.py
index 7f5a143162d9aee2335b3af44f8815e02c60372d..9c6bdff6db22d31a1e8372bf31e7e381035ba845 100644 (file)
@@ -8,8 +8,8 @@ import logging ; log = logging.getLogger('pymin.services.ppp')
 
 from pymin.seqtools import Sequence
 from pymin.dispatcher import Handler, handler, HandlerError
-from pymin.services.util import Restorable, ConfigWriter, ReloadHandler, \
-                                TransactionalHandler, DictSubHandler, call
+from pymin.service.util import Restorable, ConfigWriter, ReloadHandler, \
+                               TransactionalHandler, DictSubHandler, call
 
 __all__ = ('PppHandler', 'get_service')
 
similarity index 93%
rename from pymin/services/proxy/__init__.py
rename to services/proxy/__init__.py
index 448f568fec488d9e13dccaa7a4449f0e05274965..7a5272476bf4f9a0a27fcc2910931b32af2f9cfc 100644 (file)
@@ -5,9 +5,9 @@ import logging ; log = logging.getLogger('pymin.services.proxy')
 
 from pymin.seqtools import Sequence
 from pymin.dispatcher import Handler, handler, HandlerError
-from pymin.services.util import Restorable, ConfigWriter, InitdHandler, \
-                                TransactionalHandler, ParametersHandler, \
-                                DictSubHandler
+from pymin.service.util import Restorable, ConfigWriter, InitdHandler, \
+                               TransactionalHandler, ParametersHandler, \
+                               DictSubHandler
 
 import crypt
 
similarity index 96%
rename from pymin/services/qos/__init__.py
rename to services/qos/__init__.py
index d021d68e5a7d430bbb91e1501e9a245a91fe33d8..c17504951f96e88fd5070030f7c892c90df2e838 100644 (file)
@@ -5,10 +5,10 @@ from os import path
 
 from pymin.seqtools import Sequence
 from pymin.dispatcher import handler, HandlerError, Handler
-from pymin.services.util import Restorable, ConfigWriter, InitdHandler, \
-                                TransactionalHandler, SubHandler, call, \
-                                get_network_devices, ListComposedSubHandler, \
-                                DictComposedSubHandler, ExecutionError
+from pymin.service.util import Restorable, ConfigWriter, InitdHandler, \
+                               TransactionalHandler, SubHandler, call, \
+                               get_network_devices, ListComposedSubHandler, \
+                               DictComposedSubHandler, ExecutionError
 
 __all__ = ('QoSHandler', 'get_service')
 
similarity index 97%
rename from pymin/services/vpn/__init__.py
rename to services/vpn/__init__.py
index 066e8fc42d8f2aeaa34e5752a7578edc9533b114..ebfa0ab433663dea3edc87b4a9194c11738b178f 100644 (file)
@@ -9,9 +9,8 @@ import logging ; log = logging.getLogger('pymin.services.vpn')
 
 from pymin.seqtools import Sequence
 from pymin.dispatcher import Handler, handler, HandlerError
-from pymin.services.util import Restorable, ConfigWriter, InitdHandler, \
-                                TransactionalHandler, DictSubHandler, DictComposedSubHandler, call, ExecutionError
-
+from pymin.service.util import Restorable, ConfigWriter, InitdHandler, \
+                               TransactionalHandler, DictSubHandler, DictComposedSubHandler, call, ExecutionError
 
 __all__ = ('VpnHandler', 'get_service')
 
similarity index 92%
rename from pymin/services/vrrp/__init__.py
rename to services/vrrp/__init__.py
index 9b4c0e6254ad3b22a8f853f6b9160b6df26d26c4..5ddbbafbc8716f66387941a10d80dc07cdc44801 100644 (file)
@@ -1,9 +1,9 @@
 # vim: set encoding=utf-8 et sw=4 sts=4 :
 
 from pymin import procman
-from pymin.services.util import Restorable, TransactionalHandler, \
-                                ReloadHandler, RestartHandler, \
-                                ServiceHandler, ParametersHandler
+from pymin.service.util import Restorable, TransactionalHandler, \
+                               ReloadHandler, RestartHandler, \
+                               ServiceHandler, ParametersHandler
 
 # Logger
 import logging ; log = logging.getLogger('pymin.services.vrrp')