diff --git a/app/models/manageiq/providers/openstack/cloud_manager.rb b/app/models/manageiq/providers/openstack/cloud_manager.rb index 2fd8eaafd..df0187c87 100644 --- a/app/models/manageiq/providers/openstack/cloud_manager.rb +++ b/app/models/manageiq/providers/openstack/cloud_manager.rb @@ -342,13 +342,13 @@ def vm_delete_evm_snapshot(vm, image_id) raise end - def vm_attach_volume(vm, volume_id, device = nil) - volume = find_by_id_filtered(CloudVolume, volume_id) - volume.raw_attach_volume(vm.ems_ref, device) + def vm_attach_volume(vm, options) + volume = CloudVolume.find_by(:id => options[:volume_id]) + volume.raw_attach_volume(vm.ems_ref, options[:device]) end - def vm_detach_volume(vm, volume_id) - volume = find_by_id_filtered(CloudVolume, volume_id) + def vm_detach_volume(vm, options) + volume = CloudVolume.find_by(:id => options[:volume_id]) volume.raw_detach_volume(vm.ems_ref) end