diff options
| author | Kei Masumoto <masumotok@nttdata.co.jp> | 2011-01-19 08:49:17 +0900 |
|---|---|---|
| committer | Kei Masumoto <masumotok@nttdata.co.jp> | 2011-01-19 08:49:17 +0900 |
| commit | a0779f5df2829f91bdc944e7275f44bd831643cc (patch) | |
| tree | 6aa9e9dff68c696638879c48b3f97c69bc99414f /nova/volume | |
| parent | a56bc070784c7ea23528025463ea7f0bee133150 (diff) | |
| download | nova-a0779f5df2829f91bdc944e7275f44bd831643cc.tar.gz nova-a0779f5df2829f91bdc944e7275f44bd831643cc.tar.xz nova-a0779f5df2829f91bdc944e7275f44bd831643cc.zip | |
fixed based on reviewer's comment
Diffstat (limited to 'nova/volume')
| -rw-r--r-- | nova/volume/driver.py | 9 | ||||
| -rw-r--r-- | nova/volume/manager.py | 2 |
2 files changed, 4 insertions, 7 deletions
diff --git a/nova/volume/driver.py b/nova/volume/driver.py index 09b93ae91..0d7ad37d5 100644 --- a/nova/volume/driver.py +++ b/nova/volume/driver.py @@ -122,7 +122,7 @@ class VolumeDriver(object): """Removes an export for a logical volume.""" raise NotImplementedError() - def discover_volume(self, context, volume): + def discover_volume(self, volume): """Discover volume on a remote host.""" raise NotImplementedError() @@ -184,13 +184,10 @@ class AOEDriver(VolumeDriver): self._try_execute("sudo vblade-persist destroy %s %s" % (shelf_id, blade_id)) - def discover_volume(self, context, volume): + def discover_volume(self, volume): """Discover volume on a remote host.""" self._execute("sudo aoe-discover") self._execute("sudo aoe-stat", check_exit_code=False) - shelf_id, blade_id = self.db.volume_get_shelf_and_blade(context, - volume['id']) - return "/dev/etherd/e%s.%s" % (shelf_id, blade_id) def undiscover_volume(self, _volume): """Undiscover volume on a remote host.""" @@ -296,7 +293,7 @@ class ISCSIDriver(VolumeDriver): iscsi_portal = location.split(",")[0] return (iscsi_name, iscsi_portal) - def discover_volume(self, _context, volume): + def discover_volume(self, volume): """Discover volume on a remote host.""" iscsi_name, iscsi_portal = self._get_name_and_portal(volume['name'], volume['host']) diff --git a/nova/volume/manager.py b/nova/volume/manager.py index a568e75f2..da750ab42 100644 --- a/nova/volume/manager.py +++ b/nova/volume/manager.py @@ -138,7 +138,7 @@ class VolumeManager(manager.Manager): if volume_ref['host'] == self.host and FLAGS.use_local_volumes: path = self.driver.local_path(volume_ref) else: - path = self.driver.discover_volume(context, volume_ref) + path = self.driver.discover_volume(volume_ref) return path def remove_compute_volume(self, context, volume_id): |
