Fix error message in Pure driver with correct text
The error message was specifically mentioning the PureISCSIDriver but now there is a PureFCDriver which could call the error message. This change gets the name of the driver and uses that to ensure the error message refers to the correct driver. Closes-Bug: #1469523 Change-Id: Ib724073ea352dadfbe7ddcf4ee4ceedd5d2c7c41
This commit is contained in:
@@ -481,10 +481,10 @@ class PureBaseVolumeDriver(san.SanDriver):
|
||||
if len(connected_hosts) > 0:
|
||||
raise exception.ManageExistingInvalidReference(
|
||||
existing_ref=existing_ref,
|
||||
reason=_("PureISCSIDriver manage_existing cannot manage a "
|
||||
"volume connected to hosts. Please disconnect the "
|
||||
"volume from existing hosts before importing."))
|
||||
|
||||
reason=_("%(driver)s manage_existing cannot manage a volume "
|
||||
"connected to hosts. Please disconnect this volume "
|
||||
"from existing hosts before importing"
|
||||
) % {'driver': self.__class__.__name__})
|
||||
new_vol_name = self._get_vol_name(volume)
|
||||
LOG.info(_LI("Renaming existing volume %(ref_name)s to %(new_name)s"),
|
||||
{"ref_name": ref_vol_name, "new_name": new_vol_name})
|
||||
|
||||
Reference in New Issue
Block a user