Browse Source

[Fix Gate] The Gate have issues along with neutron-lib package

please see gate logs:

    ImportError: cannot import name driver_api
    Non-zero exit code (2) from test listing.
    error: testr failed (3)
    ERROR: InvocationError: '/home/zuul/src/git.openstack.org/openstack/networking-vsphere/.tox/py27/bin/python setup.py testr --slowest --testr-args='

Change-Id: I8d2022b975e2c3b96f15203fda677e8608b96009
Nguyen Van Trung 1 year ago
parent
commit
0c196dfa78

+ 2
- 2
networking_vsphere/ml2/dvs_mechanism_driver.py View File

@@ -17,11 +17,11 @@ import six
17 17
 from time import sleep
18 18
 
19 19
 from neutron.agent import securitygroups_rpc
20
-from neutron.plugins.ml2 import driver_api
21 20
 from neutron.plugins.ml2.drivers import mech_agent
22 21
 from neutron_lib.api.definitions import portbindings
23 22
 from neutron_lib import constants as n_const
24 23
 from neutron_lib import context
24
+from neutron_lib.plugins.ml2 import api
25 25
 from oslo_log import log
26 26
 
27 27
 from networking_vsphere._i18n import _LI
@@ -121,7 +121,7 @@ class VMwareDVSMechanismDriver(mech_agent.SimpleAgentMechanismDriverBase):
121 121
             })
122 122
             for segment in context.network.network_segments:
123 123
                 context.set_binding(
124
-                    segment[driver_api.ID],
124
+                    segment[api.ID],
125 125
                     self.vif_type,
126 126
                     vif_details,
127 127
                     status=n_const.PORT_STATUS_ACTIVE)

+ 1
- 1
networking_vsphere/ml2/ovsvapp_mech_driver.py View File

@@ -24,11 +24,11 @@ from oslo_utils import timeutils
24 24
 from neutron.common import rpc as n_rpc
25 25
 from neutron.common import topics
26 26
 from neutron import manager
27
-from neutron.plugins.ml2 import driver_api as api
28 27
 from neutron.plugins.ml2.drivers import mech_agent
29 28
 from neutron_lib.api.definitions import portbindings
30 29
 from neutron_lib import constants as n_const
31 30
 from neutron_lib import context as neutron_context
31
+from neutron_lib.plugins.ml2 import api
32 32
 
33 33
 from networking_vsphere._i18n import _LE, _LI
34 34
 from networking_vsphere.common import constants as ovsvapp_const

+ 1
- 1
networking_vsphere/ml2/ovsvapp_rpc.py View File

@@ -30,12 +30,12 @@ from neutron.common import topics
30 30
 from neutron.db import models_v2
31 31
 from neutron.db import securitygroups_rpc_base as sg_rpc_base
32 32
 from neutron.plugins.ml2 import db
33
-from neutron.plugins.ml2 import driver_api as api
34 33
 from neutron.plugins.ml2 import driver_context
35 34
 from neutron.plugins.ml2 import managers
36 35
 from neutron.plugins.ml2 import rpc as plugin_rpc
37 36
 from neutron_lib.api.definitions import portbindings
38 37
 from neutron_lib import constants as common_const
38
+from neutron_lib.plugins.ml2 import api
39 39
 
40 40
 LOG = log.getLogger(__name__)
41 41
 

+ 1
- 1
networking_vsphere/tests/unit/ml2/test_ovsvapp_mech_driver.py View File

@@ -18,8 +18,8 @@
18 18
 import mock
19 19
 
20 20
 from neutron_lib.api.definitions import portbindings
21
+from neutron_lib.plugins.ml2 import api
21 22
 
22
-from neutron.plugins.ml2 import driver_api as api
23 23
 from neutron.tests.unit.plugins.ml2 import _test_mech_agent as base
24 24
 # TODO(romilg): Revisit to minimize dependency on ML2 tests.
25 25
 

+ 1
- 1
networking_vsphere/tests/unit/ml2/test_ovsvapp_rpc.py View File

@@ -18,10 +18,10 @@ import collections
18 18
 import mock
19 19
 from neutron_lib.api.definitions import portbindings
20 20
 from neutron_lib.plugins import directory
21
+from neutron_lib.plugins.ml2 import api
21 22
 from oslo_config import cfg
22 23
 
23 24
 from neutron.common import topics
24
-from neutron.plugins.ml2 import driver_api as api
25 25
 from neutron.plugins.ml2 import rpc as plugin_rpc
26 26
 from neutron.tests.unit.plugins.ml2 import _test_mech_agent as base
27 27
 from neutron.tests.unit.plugins.ml2 import test_rpc

Loading…
Cancel
Save