From: John Griffith Date: Mon, 15 Dec 2014 22:59:12 +0000 (+0000) Subject: Isolate Cinder Attach and Connect in Base Driver X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=eac97df4dd0c3937afaf38583ee53b6bbf4bfd7d;p=openstack-build%2Fcinder-build.git Isolate Cinder Attach and Connect in Base Driver The base Cinder Driver combines the Attach process and the actual Connect process all under the Attach method. This makes sense, but the method can be split between the parts that perform things like DB updates and RPC calls and those that just take iqn info and actually make connections to the Cinder Volume Node. This would allow Drivers to utilize the connector portion of the code to add enhancements of their own. Change-Id: I9e3cd24dc978e7c7672bf1eb09626428d2ba144d --- diff --git a/cinder/volume/driver.py b/cinder/volume/driver.py index 48611512f..cbe98e701 100755 --- a/cinder/volume/driver.py +++ b/cinder/volume/driver.py @@ -496,7 +496,9 @@ class VolumeDriver(object): LOG.error(err_msg) raise exception.VolumeBackendAPIException(data=ex_msg) raise exception.VolumeBackendAPIException(data=err_msg) + return self._connect_device(conn) + def _connect_device(self, conn): # Use Brick's code to do attach/detach use_multipath = self.configuration.use_multipath_for_image_xfer device_scan_attempts = self.configuration.num_volume_device_scan_tries