// AttachDrive attaches a new drive to this SCSI controller. The slot is the first free slot
// available. If no slot is available, an error is returned.
AttachDrive attaches a new drive to this SCSI controller. The slot is the first free slot
available. If no slot is available, an error is returned.
// AttachDrive attaches a new drive to this SCSI controller . The slot is the first free slot // available . If no slot is available an error is returned .
func (s *SCSIController) AttachDrive(path string, driveType DriveType) (string, error) {
	slots, err := s.EmptySlots()
	if err != nil {
		return "", errors.Wrap(err, "EmptySlots")
	}
	if len(slots) == 0 {
		return "", fmt.Errorf("no empty slots available on controller")
	}
	slot := slots[0]
	return s.AttachDriveToAddress(path, driveType, slot)
}
func ( s * SCSIController ) AttachDrive ( path string , driveType DriveType ) ( string , error ) { slots , err := s . EmptySlots ( ) if err != nil { return " " , errors . Wrap ( err , " " ) } if len ( slots ) == 0 { return " " , fmt . Errorf ( " " ) } slot := slots [ 0 ] return s . AttachDriveToAddress ( path , driveType , slot ) }
AttachDrive attaches a new drive to this SCSI controller.
AttachDrive attaches a new drive to this SCSI controller .