Detaches this volume from any device it may be attached to. If it
        is not attached, nothing happens.
343869
def detach(self):
        
        attachments = self.attachments
        if not attachments:
            # Not attached; no error needed, just return
            return
        # A volume can only be attached to one device at a time, but for some
        # reason this is a list instead of a singular value
        att = attachments[0]
        instance_id = att["server_id"]
        attachment_id = att["id"]
        try:
            self._nova_volumes.delete_server_volume(instance_id, attachment_id)
        except Exception as e:
            raise exc.VolumeDetachmentFailed("%s" % e)
1285532
def attach(self, volume_id, instance_id, device_path):
        """"""
        return self.call("AttachVolume",
                         VolumeId=volume_id, InstanceId=instance_id,
                         Device=device_path)
78537
def close(self):
        
        if self.device:
            usb.util.dispose_resources(self.device)
        self.device = None
67611
def detach_volume(self, volume):
        
        if hasattr(volume, "id"):
            volume_id = volume.id
        else:
            volume_id = volume
        return self.ec2.detach_volume(volume_id=volume_id, instance_id=self.instance_id)
1026602
def attach_volume_to_device(self, volume_id, device_id):
        
        try:
            volume = self.manager.get_volume(volume_id)
            volume.attach(device_id)
        except packet.baseapi.Error as msg:
            raise PacketManagerException(msg)
        return volume
926534
def attach_volume(self, volume, device="/dev/sdp"):
        
        if hasattr(volume, "id"):
            volume_id = volume.id
        else:
            volume_id = volume
        return self.ec2.attach_volume(volume_id=volume_id, instance_id=self.instance_id, device=device)
544411
def stop_volume(name, force=False):
    '''
    
    '''
    volinfo = info()
    if name not in volinfo:
        log.error('Cannot stop non-existing volume %s', name)
        return False
    if int(volinfo[name]['status']) != 1:
        log.warning('Attempt to stop already stopped volume %s', name)
        return True

    cmd = 'volume stop {0}'.format(name)
    if force:
        cmd += ' force'

    return _gluster(cmd)
840236
def release(self):
		
		if self._locked is True:
			self._locked = False
			self._lock.release()
1239260
function _detach() {
  if (win == null) { return; }

  if (win.removeEventListener) {
    win.removeEventListener('message', _onmessage, false);
  } else if (win.detachEvent) {
    win.detachEvent('onmessage', _onmessage);
  } else if (win.onmessage === _onmessage) {
    win.onmessage = null;
  }

  win = null;
  popups = [];
  subscribers = {};
}
901441
def unmount(self):
        """"""

        self.unmount_bindmounts()
        self.unmount_mounts()
        self.unmount_volume_groups()
        self.unmount_loopbacks()
        self.unmount_base_images()
        self.clean_dirs()
1346620
private void detach() {
        // Do not call setVisible(false) here: that would make it invisible by default (detach() is called in attach())

        if (decoratedComponent != null) {
            decoratedComponent.removeComponentListener(decoratedComponentTracker);
            decoratedComponent.removeAncestorListener(decoratedComponentTracker);
            decoratedComponent.removeHierarchyBoundsListener(decoratedComponentTracker);
            decoratedComponent.removeHierarchyListener(decoratedComponentTracker);
            decoratedComponent.removePropertyChangeListener("enabled", decoratedComponentTracker);
            decoratedComponent.removePropertyChangeListener("ancestor", decoratedComponentTracker);
            decoratedComponent = null;

            detachFromLayeredPane();
        }
    }
248029
def Disconnect(self):
    ''' '''
    device_path = self.path

    if device_path not in mockobject.objects:
        raise dbus.exceptions.DBusException('No such device.',
                                            name='org.bluez.Error.NoSuchDevice')

    device = mockobject.objects[device_path]

    try:
        device.props[AUDIO_IFACE]['State'] = dbus.String("disconnected",
                                                         variant_level=1)

        device.EmitSignal(AUDIO_IFACE, 'PropertyChanged', 'sv', [
            'State', dbus.String("disconnected", variant_level=1),
        ])
    except KeyError:
        pass

    device.props[DEVICE_IFACE]['Connected'] = dbus.Boolean(False,
                                                           variant_level=1)
    device.EmitSignal(DEVICE_IFACE, 'PropertyChanged', 'sv', [
        'Connected', dbus.Boolean(False, variant_level=1),
    ])
457886
def _Close(self):
    
    self._vshadow_volume.close()
    self._vshadow_volume = None

    self._file_object.close()
    self._file_object = None
228823
def reset(self):
        
        self.tip_attached = False
        self.placeables = []
        self.previous_placeable = None
        self.current_volume = 0
        self.reset_tip_tracking()
722196
def close(self):
        
        if self.device is not None and self.device.is_open:
            self.device.flush()
            self.device.close()
949139
def delete(self, force=False, volumes=False):
        
        try:
            self.image.rmi()
        except ConuException as ime:
            if not force:
                raise ime
            else:
                pass
1067937
function destroy() {
    this.options.container.removeEventListener('scroll', this._scroll);
    window.removeEventListener('resize', this._scroll);
    this.attached = false;
}