'Verify configuration is valid.'

def check_for_setup_error(self):

    if (self.configuration.safe_get('blockbridge_api_host') is None):
        raise exception.InvalidInput(reason=_('Blockbridge    api    host    not    configured'))
    auth_scheme = self.configuration.safe_get('blockbridge_auth_scheme')
    if (auth_scheme == 'password'):
        auth_user = self.configuration.safe_get('blockbridge_auth_user')
        auth_pw = self.configuration.safe_get('blockbridge_auth_password')
        if (auth_user is None):
            raise exception.InvalidInput(reason=_("Blockbridge    user    not    configured    (required    for    auth    scheme    'password')"))
        if (auth_pw is None):
            raise exception.InvalidInput(reason=_("Blockbridge    password    not    configured    (required    for    auth    scheme    'password')"))
    elif (auth_scheme == 'token'):
        token = self.configuration.safe_get('blockbridge_auth_token')
        if (token is None):
            raise exception.InvalidInput(reason=_("Blockbridge    token    not    configured    (required    for    auth    scheme    'token')"))
    else:
        raise exception.InvalidInput(reason=(_("Blockbridge    configured    with    invalid    auth    scheme    '%(auth_scheme)s'") % {'auth_scheme': auth_scheme}))
    pools = self.configuration.safe_get('blockbridge_pools')
    if (pools is None):
        raise exception.InvalidInput(reason=_('Blockbridge    pools    not    configured'))
    default_pool = self.configuration.safe_get('blockbridge_default_pool')
    if (default_pool and (default_pool not in pools)):
        raise exception.InvalidInput(reason=_('Blockbridge    default    pool    does    not    exist'))
