Only map nicira_nvp_plugin module if installed

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
This commit is contained in:
Matt Riedemann 2013-05-01 04:05:07 -07:00
parent 740d7185f4
commit a2bdb161a5

View File

@ -17,8 +17,12 @@
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