]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Remove unused volume API method - remove_from_compute()
authorZhiteng Huang <zhiteng.huang@intel.com>
Fri, 9 Nov 2012 06:37:21 +0000 (14:37 +0800)
committerZhiteng Huang <zhiteng.huang@intel.com>
Fri, 9 Nov 2012 06:37:21 +0000 (14:37 +0800)
remove_from_compute() method in cinder.volume.api is never used
by others and it is also broken since the interface in Nova has
been changed to remove_volume_connection(), thus it should be
removed from Cinder.

Change-Id: Ibcb2cf7f88606d9a540cc9a03b5c95990fca8c3e

cinder/volume/api.py

index c4bc66e67590f7b684b80c6e162c555025e45a79..b0af133f4aed98a93f855a8d7e3d5ddc974486f5 100644 (file)
@@ -368,14 +368,6 @@ class API(base.Base):
             msg = _("already detached")
             raise exception.InvalidVolume(reason=msg)
 
-    def remove_from_compute(self, context, volume, instance_id, host):
-        """Remove volume from specified compute host."""
-        rpc.call(context,
-                 rpc.queue_get_for(context, FLAGS.compute_topic, host),
-                 {"method": "remove_volume_connection",
-                  "args": {'instance_id': instance_id,
-                           'volume_id': volume['id']}})
-
     @wrap_check_policy
     def reserve_volume(self, context, volume):
         self.update(context, volume, {"status": "attaching"})