From eac97df4dd0c3937afaf38583ee53b6bbf4bfd7d Mon Sep 17 00:00:00 2001 From: John Griffith Date: Mon, 15 Dec 2014 22:59:12 +0000 Subject: [PATCH] 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 --- cinder/volume/driver.py | 2 ++ 1 file changed, 2 insertions(+) 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 -- 2.45.2