def attach_device_without_medium(self, name, controller_port, device, type_p):
        """Attaches a device and optionally mounts a medium to the given storage
        controller (:py:class:`IStorageController` , identified by @a name),
        at the indicated port and device.
        
        This method is intended for managing storage devices in general while a
        machine is powered off. It can be used to attach and detach fixed
        and removable media. The following kind of media can be attached
        to a machine:
        
        
        For fixed and removable media, you can pass in a medium that was
        previously opened using :py:func:`IVirtualBox.open_medium` .
        
        
        Only for storage devices supporting removable media (such as
        DVDs and floppies) with an empty drive or one of the medium objects listed
        in the :py:func:`IHost.dvd_drives`  and :py:func:`IHost.floppy_drives` 
        arrays to indicate a host drive.
        For removable devices, you can also use :py:func:`IMachine.mount_medium` 
        to change the media while the machine is running.
        
        
        
        In a VM's default configuration of virtual machines, the secondary
        master of the IDE controller is used for a CD/DVD drive.
        :py:class:`IMediumAttachment`  will appear in the machine's list of medium
        attachments (see :py:func:`IMachine.medium_attachments` ).
        
        See :py:class:`IMedium`  and :py:class:`IMediumAttachment`  for more
        information about attaching media.
        
        The specified device slot must not have a device attached to it,
        or this method will fail.
        
        You cannot attach a device to a newly created machine until
        this machine's settings are saved to disk using
        :py:func:`save_settings` .
        
        
        If the medium is being attached indirectly, a new differencing medium
        will implicitly be created for it and attached instead. If the
        changes made to the machine settings (including this indirect
        attachment) are later cancelled using :py:func:`discard_settings` ,
        this implicitly created differencing medium will implicitly
        be deleted.

        in name of type str
            Name of the storage controller to attach the device to.

        in controller_port of type int
            Port to attach the device to. For an IDE controller, 0 specifies
            the primary controller and 1 specifies the secondary controller.
            For a SCSI controller, this must range from 0 to 15; for a SATA controller,
            from 0 to 29; for an SAS controller, from 0 to 7.

        in device of type int
            Device slot in the given port to attach the device to. This is only
            relevant for IDE controllers, for which 0 specifies the master device and
            1 specifies the slave device. For all other controller types, this must
            be 0.

        in type_p of type :class:`DeviceType`
            Device type of the attached device. For media opened by
            :py:func:`IVirtualBox.open_medium` , this must match the device type
            specified there.

        raises :class:`OleErrorInvalidarg`
            SATA device, SATA port, IDE port or IDE slot out of range, or
file or UUID not found.
        
        raises :class:`VBoxErrorInvalidObjectState`
            Machine must be registered before media can be attached.
        
        raises :class:`VBoxErrorInvalidVmState`
            Invalid machine state.
        
        raises :class:`VBoxErrorObjectInUse`
            A medium is already attached to this or another virtual machine.
        
        """
        if not isinstance(name, basestring):
            raise TypeError("name can only be an instance of type basestring")
        if not isinstance(controller_port, baseinteger):
            raise TypeError("controller_port can only be an instance of type baseinteger")
        if not isinstance(device, baseinteger):
            raise TypeError("device can only be an instance of type baseinteger")
        if not isinstance(type_p, DeviceType):
            raise TypeError("type_p can only be an instance of type DeviceType")
        self._call("attachDeviceWithoutMedium",
                     in_p=[name, controller_port, device, type_p])