Checks if all the proper config has been prvided.
7625
private function _checkLayerConfig()
    {
        $errorString = array();
        if ($this->_providerID == '') {
            array_push($errorString, 'LAYER_PROVIDER_ID');
        }

        if ($this->_keyID == '') {
            array_push($errorString, 'LAYER_PRIVATE_KEY_ID');
        }

        if ($this->_privateKey == '') {
            array_push($errorString, 'LAYER_PRIVATE_KEY');
        }

        if (count($errorString) > 0) {
            $joined = implode(',', $errorString);
            trigger_error("$joined  not configured. See README.md", E_USER_ERROR);
        }
    }
377938
def check_config(data):
    

    is_right = True

    if "title" not in data:
        logging.error("No 'title' in _config.yml")
        is_right = False

    return is_right
836598
def _all(confs=None, **kwargs):
    

    result = False

    if confs is not None:
        # ensure confs is a list
        if isinstance(confs, string_types) or isinstance(confs, dict):
            confs = [confs]
        # if at least one conf exists, result is True by default
        result = True
        for conf in confs:
            result = run(conf, **kwargs)
            # stop when a result is False
            if not result:
                break

    return result
259482
def validate_required_all(required_configs)
      required_configs.each do |config|
        unless config_set?(config)
          message = "Configuration value `#{config}` is required."
          raise ConfigurationError, message
        end
      end
    end
504078
def has_config(config_fname):
    '''
    
    '''
    config = RawConfigParser()
    try:
        config.readfp(open(config_fname))
        return True
    except IOError:
        return False
398312
public function isConfigured()
    {
        if (!empty($this->urlParts) && isset($this->solrMap[$this->className])) {
            return true;
        }
        return false;
    }
1362247
private function hasConfig($config, $attr)
    {
        return (isset($attr[self::CONFIG_ALL]) && $attr[self::CONFIG_ALL]) || (isset($attr[$config]) && $attr[$config]);
    }
542727
public function checkSetConfigInput()
    {
        
        $availableParameters = array('loaded', 'loadAtStartup', 'ghost');
        $defaults = array('extension' => null,
                          'configParameter' => null,
                          'configValue' => null);
                          
        $this->options = array_merge($defaults, $this->options);
        
        if ($this->options['configParameter'] == null){
            $this->error("Please provide the 'configParam' parameter.", true);
        }
        else if (!in_array($this->options['configParameter'], $availableParameters)){
            $this->error("Please provide a valid 'configParam' parameter value (" . implode("|", $availableParameters) . ").", true);
        }
        else if ($this->options['configValue'] === null){
            $this->error("Please provide the 'configValue' parameter.", true);
        }
        else if ($this->options['extension'] == null){
            $this->error("Please provide the 'extension' parameter.", true);
        }
    }
28758
def check_config(db, level):
    """"""
    if level == 'global':
        configuration = config.read(config.HOMEDIR, '.passpierc')
    elif level == 'local':
        configuration = config.read(os.path.join(db.path))
    elif level == 'current':
        configuration = db.config

    if configuration:
        click.echo(yaml.safe_dump(configuration, default_flow_style=False))
950751
def is_default(name=None, index=None):
    

    if not is_configured():
        raise JutException('No configurations available, please run `jut config add`')

    count = 1
    for configuration in _CONFIG.sections():

        if index != None:
            if _CONFIG.has_option(configuration, 'default') and count == index:
                return True

        if name != None:
            if _CONFIG.has_option(configuration, 'default') and configuration == name:
                return True

        count += 1

    return False
51000
public function checkTryToSaveConfig()
    {
        $uri = Request::getInstance()->getRequestUri();
        $method = Request::getInstance()->getMethod();
        return (preg_match('/^\/admin\/(config|setup)$/', $uri) !== false && strtoupper($method) === 'POST');
    }
709314
def check_config(self, config):
        
        validation = ""
        required = ["name", "currency", "IBAN", "BIC"]

        for config_item in required:
            if config_item not in config:
                validation += config_item.upper() + "_MISSING "

        if not validation:
            return True
        else:
            raise Exception("Config file did not validate. " + validation)
109172
def apply_check_config(self, config):
        
        self.uri = config["uri"]
        self.use_https = config.get("https", False)
        self.method = config.get("method", "GET")
448756
def check_for_preliminary_config(self):
        
        if any([self.model.preliminary_config, self.gui_config_model.preliminary_config]):
            self.view['apply_button'].set_sensitive(True)
        else:
            self.view['apply_button'].set_sensitive(False)
988561
private function _checkConfig() {
        // Check each configuration entry
        if (empty($this->_config) || !is_array($this->_config))
            throw new \InvalidArgumentException("Empty configuration or invalid configuration format");
        else if (empty($this->_config['app']))
            throw new \InvalidArgumentException("Application configuration not specified");
        else if (empty($this->_config['app']['name']))
            throw new \InvalidArgumentException("No application name specified under application configuration");
        else if (empty($this->_config['api']))
            throw new \InvalidArgumentException("Api configuration not specified");
        else if (empty($this->_config['api']['url']))
            throw new \InvalidArgumentException("No url specified under api configuration");
        else if (empty($this->_config['api']['sharedKey']))
            throw new \InvalidArgumentException("No shared key specified under api configuration");
        else if (empty($this->_config['api']['secretKey']))
            throw new \InvalidArgumentException("No secret key specified under api configuration");
    }
953238
def _check_config(self):
        """"""
        required_data = ['creation_date',
                         'author',
                         'status',
                         'lang',
                         'tags',
                         'title',
                         'slug',
                         'theme',
                         'template',
                         'page_id']
        isok = True
        # exclude some statements from coverage analysis. I would need to
        # refactor how the config is loaded/handled etc. It's not worth
        # to do that now. Maybe when I change yaml for the markdwn extension.
        for e in self._config.keys():
            if not e in required_data: # pragma: no cover
                print "The configuration in page '" + \
                      self._slug + "' is corrupt."
                isok = False
            # check that the theme and template exist, even if they're default.
        (pthemedir, ptemplatefname) = self._theme_and_template_fp()
        if not os.path.isdir(pthemedir): # pragma: no cover
            print "Theme " + self._config['theme'][0] + \
                  " specified in page '" + \
                  self._slug + "' does not exist."
            isok = False
        if not os.path.isfile(ptemplatefname): # pragma: no cover
            print "Template " + self._config['template'][0] + \
                  " specified in page '" + self._slug + \
                  "' does not exist."
            isok = False
        return isok
950867
def config(check):
    """"""
    if check:
        checks = [check]
    else:
        checks = sorted(get_valid_checks())

    files_failed = {}
    files_warned = {}
    num_files = 0

    echo_waiting('Validating default configuration files...')
    for check in checks:
        check_display_queue = []

        config_files = get_config_files(check)
        for config_file in config_files:
            num_files += 1
            file_display_queue = []
            file_name = basepath(config_file)

            try:
                config_data = yaml.safe_load(read_file(config_file))
            except Exception as e:
                files_failed[config_file] = True

                # We must convert to text here to free Exception object before it goes out of scope
                error = str(e)

                check_display_queue.append(lambda: echo_info('{}:'.format(file_name), indent=True))
                check_display_queue.append(lambda: echo_failure('Invalid YAML -', indent=FILE_INDENT))
                check_display_queue.append(lambda: echo_info(error, indent=FILE_INDENT * 2))
                continue

            # Verify there is an `instances` section
            if 'instances' not in config_data:
                files_failed[config_file] = True
                file_display_queue.append(lambda: echo_failure('Missing `instances` section', indent=FILE_INDENT))

            # Verify there is a default instance
            else:
                instances = config_data['instances']
                if check not in IGNORE_DEFAULT_INSTANCE and not isinstance(instances, list):
                    files_failed[config_file] = True
                    file_display_queue.append(lambda: echo_failure('No default instance', indent=FILE_INDENT))

            if file_display_queue:
                check_display_queue.append(lambda: echo_info('{}:'.format(file_name), indent=True))
                check_display_queue.extend(file_display_queue)

        if check_display_queue:
            echo_success('{}:'.format(check))
            for display in check_display_queue:
                display()

    files_failed = len(files_failed)
    files_warned = len(files_warned)
    files_passed = num_files - (files_failed + files_warned)

    if files_failed or files_warned:
        click.echo()

    if files_failed:
        echo_failure('Files with errors: {}'.format(files_failed))

    if files_warned:
        echo_warning('Files with warnings: {}'.format(files_warned))

    if files_passed:
        if files_failed or files_warned:
            echo_success('Files valid: {}'.format(files_passed))
        else:
            echo_success('All {} configuration files are valid!'.format(num_files))

    if files_failed:
        abort()