From 12f3d782e6eebc35d9bbde2624ca0d5f10927f27 Mon Sep 17 00:00:00 2001 From: "Walter A. Boring IV" Date: Thu, 5 Sep 2013 10:00:13 -0700 Subject: [PATCH] Fix brick remotefs dependency on cinder This patch moves an exception from cinder.exception into brick.exception to fix an import in remotefs. Fixes Bug #1221309 Change-Id: I9b060c1e1129b3fe30145227712d0234e0f42504 --- cinder/brick/exception.py | 4 ++++ cinder/brick/remotefs/remotefs.py | 2 +- cinder/exception.py | 4 ---- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cinder/brick/exception.py b/cinder/brick/exception.py index 74ad7a836..6995923f6 100644 --- a/cinder/brick/exception.py +++ b/cinder/brick/exception.py @@ -126,3 +126,7 @@ class ISCSITargetRemoveFailed(BrickException): class ISCSITargetAttachFailed(BrickException): message = _("Failed to attach iSCSI target for volume %(volume_id)s.") + + +class ProtocolNotSupported(BrickException): + message = _("Connect to volume via protocol %(protocol)s not supported.") diff --git a/cinder/brick/remotefs/remotefs.py b/cinder/brick/remotefs/remotefs.py index 5cbc016a7..8812bd6ed 100644 --- a/cinder/brick/remotefs/remotefs.py +++ b/cinder/brick/remotefs/remotefs.py @@ -22,7 +22,7 @@ import os from oslo.config import cfg -from cinder import exception +from cinder.brick import exception from cinder.openstack.common.gettextutils import _ from cinder.openstack.common import log as logging from cinder.openstack.common import processutils as putils diff --git a/cinder/exception.py b/cinder/exception.py index 3b5adc167..e28a104f8 100644 --- a/cinder/exception.py +++ b/cinder/exception.py @@ -609,10 +609,6 @@ class VolumeMigrationFailed(CinderException): message = _("Volume migration failed") + ": %(reason)s" -class ProtocolNotSupported(CinderException): - message = _("Connect to volume via protocol %(protocol)s not supported.") - - class SSHInjectionThreat(CinderException): message = _("SSH command injection detected") + ": %(command)s" -- 2.45.2