added configuration for loading custom config services

This commit is contained in:
Blake Harnden 2020-01-29 17:08:36 -08:00
parent 6aa7d2175d
commit a8a1643ee0
2 changed files with 4 additions and 0 deletions

View file

@ -61,6 +61,9 @@ class CoreEmu:
self.service_manager = ConfigServiceManager() self.service_manager = ConfigServiceManager()
config_services_path = os.path.abspath(os.path.dirname(configservices.__file__)) config_services_path = os.path.abspath(os.path.dirname(configservices.__file__))
self.service_manager.load(config_services_path) self.service_manager.load(config_services_path)
custom_dir = self.config.get("custom_config_services_dir")
if custom_dir:
self.service_manager.load(custom_dir)
# catch exit event # catch exit event
atexit.register(self.shutdown) atexit.register(self.shutdown)

View file

@ -14,6 +14,7 @@ frr_sbin_search = "/usr/local/sbin /usr/sbin /usr/lib/frr"
# this may be a comma-separated list, and directory names should be unique # this may be a comma-separated list, and directory names should be unique
# and not named 'services' # and not named 'services'
#custom_services_dir = /home/username/.core/myservices #custom_services_dir = /home/username/.core/myservices
#custom_config_services_dir = /home/username/.coretk/custom_services
# uncomment to establish a standalone control backchannel for accessing nodes # uncomment to establish a standalone control backchannel for accessing nodes
# (overriden by the session option of the same name) # (overriden by the session option of the same name)