From 1ace535aa87a348e9a239c30fd4b0e3fdf11a489 Mon Sep 17 00:00:00 2001 From: Adit Sarfaty Date: Thu, 21 Jul 2016 09:29:02 +0300 Subject: [PATCH] Service Insertion remove networking-sfc import The service insertion utils used the networking-sfc for one constant only. Removing this makes NSX|V3 and also NSX|V that doesn't use the service insertion driver to not need to clone the networking-sfc code. Change-Id: Id3cd19e91547b92f90117a716d2f40a835c0922b --- vmware_nsx/services/flowclassifier/nsx_v/utils.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/vmware_nsx/services/flowclassifier/nsx_v/utils.py b/vmware_nsx/services/flowclassifier/nsx_v/utils.py index cf22219501..74c0481e4c 100644 --- a/vmware_nsx/services/flowclassifier/nsx_v/utils.py +++ b/vmware_nsx/services/flowclassifier/nsx_v/utils.py @@ -14,7 +14,6 @@ # License for the specific language governing permissions and limitations # under the License. -from networking_sfc.extensions import flowclassifier from neutron import manager from oslo_log import log as logging @@ -22,6 +21,10 @@ LOG = logging.getLogger(__name__) SERVICE_INSERTION_SG_NAME = 'Service Insertion Security Group' SERVICE_INSERTION_RESOURCE = 'Service Insertion' +# Using the constant defined here to avoid the need to clone networking-sfc +# if the driver is not used. +FLOW_CLASSIFIER_EXT = "flow_classifier" + class NsxvServiceInsertionHandler(object): @@ -42,7 +45,7 @@ class NsxvServiceInsertionHandler(object): def is_service_insertion_enabled(self): # Note - this cannot be called during init, since the manager is busy if (manager.NeutronManager.get_service_plugins().get( - flowclassifier.FLOW_CLASSIFIER_EXT)): + FLOW_CLASSIFIER_EXT)): return True return False