From 89a14034dda08de99de44b053ff7946af52b3b28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89douard=20Thuleau?= Date: Tue, 20 Dec 2016 15:14:56 +0100 Subject: [PATCH] [VNC OpenStack] Support the neutron lib decomposition From recent neutron release (since newton), a reusable library code for neutron names 'neutron-lib' was introduced to stabalize some of the common interfaces. That patch permits to support that new library. Change-Id: I0993a8da25bd8c38826c3b0d8f86ff3a0e667586 Closes-Bug: #1650339 --- .../vnc_openstack/vnc_openstack/neutron_plugin_db.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/config/vnc_openstack/vnc_openstack/neutron_plugin_db.py b/src/config/vnc_openstack/vnc_openstack/neutron_plugin_db.py index 37b513570c0..d297be2d193 100644 --- a/src/config/vnc_openstack/vnc_openstack/neutron_plugin_db.py +++ b/src/config/vnc_openstack/vnc_openstack/neutron_plugin_db.py @@ -17,7 +17,10 @@ import gevent import bottle -from neutron.common import constants +try: + from neutron_lib import constants +except ImportError: + from neutron.common import constants from cfgm_common import exceptions as vnc_exc from vnc_api.vnc_api import * @@ -129,7 +132,7 @@ class DBInterface(object): Q_URL_PREFIX = '/extensions/ct' def __init__(self, manager, admin_name, admin_password, admin_tenant_name, - api_srvr_ip, api_srvr_port, + api_srvr_ip, api_srvr_port, api_server_obj=None, user_info=None, contrail_extensions_enabled=True, list_optimization_enabled=False,