When starting any quantum plugin agent service, only map the
nicira_nvp_plugin module if nicira is installed and configured for
quantum.
fixes bug
1175750
Change-Id: I7f2c40011363e2579d4c35716f5a7d413663a698
import sys
-from quantum.plugins import nicira
+# catch an import error if nicira is not the configured plugin
+try:
+ from quantum.plugins import nicira
-# Provide a mapping for the nicira_nvp_plugin package to ensure
-# backwards compatibilty for configuration.
-sys.modules['quantum.plugins.nicira.nicira_nvp_plugin'] = nicira
+ # Provide a mapping for the nicira_nvp_plugin package to ensure
+ # backwards compatibility for configuration.
+ sys.modules['quantum.plugins.nicira.nicira_nvp_plugin'] = nicira
+except ImportError:
+ pass