Remove a MongoDB database

    CLI Example:

    .. code-block:: bash

        salt '*' mongodb.db_remove <name> <user> <password> <host> <port>

def db_remove(name, user=None, password=None, host=None, port=None, authdb=None):
    '''
    Remove a MongoDB database

    CLI Example:

    .. code-block:: bash

        salt '*' mongodb.db_remove <name> <user> <password> <host> <port>
    '''
    conn = _connect(user, password, host, port, authdb=authdb)
    if not conn:
        return 'Failed to connect to mongo database'

    try:
        log.info('Removing database %s', name)
        conn.drop_database(name)
    except pymongo.errors.PyMongoError as err:
        log.error('Removing database %s failed with error: %s', name, err)
        return six.text_type(err)

    return True