update to add a way to avoid loading parent service classes, that inherit from CoreService that should not be loaded on their own
This commit is contained in:
parent
ac2b64aaaf
commit
c65baa9298
7 changed files with 8 additions and 6 deletions
|
@ -72,6 +72,8 @@ class ServiceManager(object):
|
|||
"""
|
||||
services = utils.load_classes(path, CoreService)
|
||||
for service in services:
|
||||
if not service._name:
|
||||
continue
|
||||
service.on_load()
|
||||
cls.add(service)
|
||||
|
||||
|
|
|
@ -90,7 +90,7 @@ class BirdService(CoreService):
|
|||
common to Bird's routing daemons.
|
||||
"""
|
||||
|
||||
_name = "BirdDaemon"
|
||||
_name = None
|
||||
_group = "BIRD"
|
||||
_depends = ("bird",)
|
||||
_dirs = ()
|
||||
|
|
|
@ -13,7 +13,7 @@ class NrlService(CoreService):
|
|||
Parent class for NRL services. Defines properties and methods
|
||||
common to NRL's routing daemons.
|
||||
"""""
|
||||
_name = "Protean"
|
||||
_name = None
|
||||
_group = "ProtoSvc"
|
||||
_depends = ()
|
||||
_dirs = ()
|
||||
|
|
|
@ -222,7 +222,7 @@ class QuaggaService(CoreService):
|
|||
Parent class for Quagga services. Defines properties and methods
|
||||
common to Quagga's routing daemons.
|
||||
"""
|
||||
_name = "QuaggaDaemon"
|
||||
_name = None
|
||||
_group = "Quagga"
|
||||
_depends = ("zebra",)
|
||||
_dirs = ()
|
||||
|
|
|
@ -11,7 +11,7 @@ class SdnService(CoreService):
|
|||
"""
|
||||
Parent class for SDN services.
|
||||
"""
|
||||
_name = "SdnProcess"
|
||||
_name = None
|
||||
_group = "SDN"
|
||||
_depends = ()
|
||||
_dirs = ()
|
||||
|
|
|
@ -16,7 +16,7 @@ class UtilService(CoreService):
|
|||
"""
|
||||
Parent class for utility services.
|
||||
"""
|
||||
_name = "UtilityProcess"
|
||||
_name = None
|
||||
_group = "Utility"
|
||||
_depends = ()
|
||||
_dirs = ()
|
||||
|
|
|
@ -74,7 +74,7 @@ class XorpService(CoreService):
|
|||
Parent class for XORP services. Defines properties and methods
|
||||
common to XORP's routing daemons.
|
||||
"""
|
||||
_name = "XorpDaemon"
|
||||
_name = None
|
||||
_group = "XORP"
|
||||
_depends = ("xorp_rtrmgr",)
|
||||
_dirs = ()
|
||||
|
|
Loading…
Reference in a new issue