'Add lun to QoS.'

def add_lun_to_qos(self, qos_id, lun_id, lun_list):

    url = ('/ioclass/' + qos_id)
    new_lun_list = []
    lun_list_string = lun_list[1:(-1)]
    for lun_string in lun_list_string.split(','):
        tmp_lun_id = lun_string[1:(-1)]
        if (('' != tmp_lun_id) and (tmp_lun_id != lun_id)):
            new_lun_list.append(tmp_lun_id)
    new_lun_list.append(lun_id)
    data = {'LUNLIST': new_lun_list, 'TYPE': 230, 'ID': qos_id}
    result = self.call(url, data, 'PUT')
    msg = _('Associate    lun    to    QoS    error.')
    self._assert_rest_result(result, msg)
    self._assert_data_in_result(result, msg)
