Browse Source

[train-only] Fix mock import for infinidat driver

Infinidat wrongfully imports mock but it should be imported from
unittest. This was fixed during the Ussuri cycle via the mammoth commit
[1].

I'm not sure we want to backport this whole commit down to train but we
certainly want to fix this bug.

[1] https://review.opendev.org/c/openstack/cinder/+/700253

Change-Id: I6f5443417b7b07c648b81fddcda430496078573c
changes/63/790963/4
David Vallee Delisle 1 month ago
parent
commit
574221a9bc
1 changed files with 5 additions and 4 deletions
  1. +5
    -4
      cinder/volume/drivers/infinidat.py

+ 5
- 4
cinder/volume/drivers/infinidat.py View File

@ -12,16 +12,17 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
"""
INFINIDAT InfiniBox Volume Driver
"""
""" INFINIDAT InfiniBox Volume Driver."""
from contextlib import contextmanager
import functools
import platform
import socket
try:
from unittest import mock
except ImportError:
import mock
import mock
from oslo_config import cfg
from oslo_log import log as logging
from oslo_utils import units


Loading…
Cancel
Save