# File lib/rudy/aws/ec2/volume.rb, line 84
84:       def attach(vol_id, inst_id, device)
85:         vol_id = Volumes.get_vol_id(vol_id)
86:         inst_id = inst_id.is_a?(Rudy::AWS::EC2::Instance) ? inst_id.awsid : inst_id
87:         raise NoVolumeID unless vol_id
88:         raise VolumeAlreadyAttached, vol_id if attached?(vol_id)
89:         raise NoInstanceID unless inst_id
90:         raise NoDevice unless device
91:       
92:         opts = {
93:           :volume_id => vol_id, 
94:           :instance_id => inst_id, 
95:           :device => device.to_s    # Solaris devices are numbers
96:         }
97:         ret = Rudy::AWS::EC2.execute_request(false) { @@ec2.attach_volume(opts) }
98:         (ret['status'] == 'attaching')
99:       end