summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--conf/00_common.conf10
-rw-r--r--core/loader/loader_servant.py5
2 files changed, 15 insertions, 0 deletions
diff --git a/conf/00_common.conf b/conf/00_common.conf
index ef1c6280..51dceb32 100644
--- a/conf/00_common.conf
+++ b/conf/00_common.conf
@@ -59,3 +59,13 @@ VERBOSITY = 'debug'
# from anywhere in the test framework so be careful with naming
# conventions
TEST_PARAMS = {}
+
+# ############################
+# Modules
+# ############################
+
+# following modules will be excluded from automatic load by LoaderServant
+# it can be used to suppress automatic load of obsoleted or abstract modules
+# Example:
+# EXCLUDE_MODULES = ['ovs_vanilla', 'qemu_virtio_net', 'pidstat']
+EXCLUDE_MODULES = []
diff --git a/core/loader/loader_servant.py b/core/loader/loader_servant.py
index 3b729c23..dc6353ff 100644
--- a/core/loader/loader_servant.py
+++ b/core/loader/loader_servant.py
@@ -26,6 +26,7 @@ from os import sys
import imp
import fnmatch
import logging
+from conf import settings
class LoaderServant(object):
@@ -167,6 +168,10 @@ class LoaderServant(object):
for filename in fnmatch.filter(filenames, '[!.]*.py'):
modname = os.path.splitext(os.path.basename(filename))[0]
+ # skip module load if it is excluded by configuration
+ if modname in settings.getValue('EXCLUDE_MODULES'):
+ continue
+
try:
if modname in sys.modules:
mod = sys.modules[modname]