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:
Blake J. Harnden 2018-04-20 21:40:55 -07:00
parent ac2b64aaaf
commit c65baa9298
7 changed files with 8 additions and 6 deletions

View file

@ -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)

View file

@ -90,7 +90,7 @@ class BirdService(CoreService):
common to Bird's routing daemons.
"""
_name = "BirdDaemon"
_name = None
_group = "BIRD"
_depends = ("bird",)
_dirs = ()

View file

@ -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 = ()

View file

@ -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 = ()

View file

@ -11,7 +11,7 @@ class SdnService(CoreService):
"""
Parent class for SDN services.
"""
_name = "SdnProcess"
_name = None
_group = "SDN"
_depends = ()
_dirs = ()

View file

@ -16,7 +16,7 @@ class UtilService(CoreService):
"""
Parent class for utility services.
"""
_name = "UtilityProcess"
_name = None
_group = "Utility"
_depends = ()
_dirs = ()

View file

@ -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 = ()