Add a new mapping to given kb.

    :param kb_name: the name of the kb where to insert the new value
    :param key: the key of the mapping
    :param value: the value of the mapping

def add_kb_mapping(kb_name, key, value=""):
    """Add a new mapping to given kb.

    :param kb_name: the name of the kb where to insert the new value
    :param key: the key of the mapping
    :param value: the value of the mapping
    """
    kb = get_kb_by_name(kb_name)
    if key in kb.kbrvals:
        # update
        kb.kbrvals[key].m_value = value
    else:
        # insert
        kb.kbrvals.set(models.KnwKBRVAL(m_key=key, m_value=value))