Validate the queues configuration.

    Raises:
        exceptions.ConfigurationException: If the configuration provided is of an
            invalid format.
978265
def validate_queues(queues):
    
    if not isinstance(queues, dict):
        raise exceptions.ConfigurationException(
            "'queues' must be a dictionary mapping queue names to settings."
        )

    for queue, settings in queues.items():
        if not isinstance(settings, dict):
            raise exceptions.ConfigurationException(
                "the {} queue in the 'queues' setting has a value of type {}, but it "
                "should be a dictionary of settings.".format(queue, type(settings))
            )
        missing_keys = []
        for key in ("durable", "auto_delete", "exclusive", "arguments"):
            if key not in settings:
                missing_keys.append(key)
        if missing_keys:
            raise exceptions.ConfigurationException(
                "the {} queue is missing the following keys from its settings "
                "value: {}".format(queue, missing_keys)
            )
115534
protected function validateConfig()
    {
        $this->queueDriver = $this->createQueueDriver();
        $this->requiredFields = $this->queueDriver->getRequiredConfig();
        $this->config = array_merge($this->queueDriver->getDefaultConfig(), $this->config);
        parent::validateConfig();
    }
1201758
def _validate_config(self):
        
        # while set().issubset() is easier, we want to tell the user the names
        # of any invalid keys
        bad_keys = []
        for k in self._config.keys():
            if k not in self._example.keys():
                bad_keys.append(k)
        if len(bad_keys) > 0:
            raise InvalidConfigError('Invalid keys: %s' % bad_keys)
        # endpoints
        if 'endpoints' not in self._config or len(
                self._config['endpoints']) < 1:
            raise InvalidConfigError('configuration must have '
                                     'at least one endpoint')
        for ep in self._config['endpoints']:
            if sorted(
                    self._config['endpoints'][ep].keys()
            ) != ['method', 'queues']:
                raise InvalidConfigError('Endpoint %s configuration keys must '
                                         'be "method" and "queues".' % ep)
            meth = self._config['endpoints'][ep]['method']
            if meth not in self._allowed_methods:
                raise InvalidConfigError('Endpoint %s method %s not allowed '
                                         '(allowed methods: %s'
                                         ')' % (ep, meth,
                                                self._allowed_methods))
        levels = ['CRITICAL', 'ERROR', 'WARNING', 'INFO', 'DEBUG', 'NOTSET']
        if ('logging_level' in self._config and
                self._config['logging_level'] not in levels):
            raise InvalidConfigError('logging_level must be one of %s' % levels)
        """
        'api_gateway_method_settings': {
            'throttlingBurstLimit': None,
            'throttlingRateLimit': None
        },
        """
        if 'api_gateway_method_settings' not in self._config:
            return
        ms = self._config['api_gateway_method_settings']
        bad_keys = []
        for k in ms.keys():
            if k not in self._example['api_gateway_method_settings'].keys():
                bad_keys.append(k)
        if len(bad_keys) > 0:
            raise InvalidConfigError(
                'Invalid keys in "api_gateway_method_settings": %s' % bad_keys)
        if 'metricsEnabled' in ms and ms['metricsEnabled'] not in [True, False]:
            raise InvalidConfigError(
                'api_gateway_method_settings metricsEnabled key must be omitted'
                ' or a boolean')
        if ('loggingLevel' in ms and
                ms['loggingLevel'] not in ['OFF', 'INFO', 'ERROR']):
            raise InvalidConfigError(
                'api_gateway_method_settings loggingLevel must be omitted or '
                'one of "OFF", "INFO" or "ERROR"'
            )
        if ('metricsEnabled' in ms and
                ms['dataTraceEnabled'] not in [True, False]):
            raise InvalidConfigError(
                'api_gateway_method_settings dataTraceEnabled key must be '
                'omitted or a boolean')
        if ('throttlingBurstLimit' in ms and
                ms['throttlingBurstLimit'] is not None):
            try:
                assert ms['throttlingBurstLimit'] == int(
                    ms['throttlingBurstLimit'])
            except (AssertionError, ValueError, TypeError):
                raise InvalidConfigError(
                    'api_gateway_method_settings throttlingBurstLimit key must '
                    'be omitted, null or an integer'
                )
        if ('throttlingRateLimit' in ms and
                ms['throttlingRateLimit'] is not None):
            try:
                assert ms['throttlingRateLimit'] == float(
                    ms['throttlingRateLimit'])
            except (AssertionError, ValueError, TypeError):
                raise InvalidConfigError(
                    'api_gateway_method_settings throttlingRateLimit key must '
                    'be omitted, null or a Number (float/double)'
                )
592260
def _validate(self):
        
        if self.data_format is FormatType.PYTHON:
            self.data = self.raw_data
        elif self.data_format is FormatType.JSON:
            self._validate_json()
        elif self.data_format is FormatType.YAML:
            self._validate_yaml()
1105167
def validate_config(config):
        
        non_null_params = ['space_id', 'access_token']
        for param in non_null_params:
            if getattr(config, param) is None:
                raise Exception('Configuration for \"{0}\" must not be empty.'.format(param))

        for clazz in config.custom_entries:
            if not issubclass(clazz, Entry):
                raise Exception(
                    'Provided class \"{0}\" must be a subclass of Entry.'.format(clazz.__name__))
            elif clazz is Entry:
                raise Exception('Cannot register "Entry" as a custom entry class.')
1094604
def _validate_config(self, config):
        
        if config is None:
            raise ValueError("OIDCFrontend conf can't be 'None'.")

        for k in {"signing_key_path", "provider"}:
            if k not in config:
                raise ValueError("Missing configuration parameter '{}' for OpenID Connect frontend.".format(k))
995842
def validate_capacity(self, servers):
        
        try:
            return self.manager.validate_capacity(servers)
        except packet.baseapi.Error as msg:
            raise PacketManagerException(msg)
1162038
def validate(self):
        
        validator = Draft7Validator(self.SCHEMA)

        errors = set()  # make errors a set to avoid duplicates

        for error in validator.iter_errors(self.serialize()):
            errors.add('.'.join(
                list(map(str, error.path)) + [error.message]
            ))

        if errors:
            raise JSONValidationException(type(self).__name__, errors)
949405
def validate(self):
        """"""
        missing = []
        for k, v in self._map.items():
            attr = getattr(self, k, False)
            if not attr or attr == CONFIG_PLACEHOLDER:
                missing.append(v)
        if missing:
            return "Missing or invalid config values: {}".format(
                ", ".join(sorted(missing))
            )
878666
def validate_storage_settings(storage_class, settings):
  
  if not isinstance(settings, dict):
    raise ImproperlyConfigured(
        '{}: storage class settings must be a dict'.format(storage_class))

  if not hasattr(storage_class, 'SETTINGS_VALIDATORS'):
    raise NotImplementedError(
      '{}: storage class must define `SETTINGS_VALIDATORS`'.format(
        storage_class))

  settings_validators = getattr(storage_class, 'SETTINGS_VALIDATORS')
  settings = settings.copy()
  settings.pop('backend', None)  # No need to validate the `backend` key.
  invalid_settings = set(settings.keys()) - set(settings_validators.keys())
  if invalid_settings:
    raise ImproperlyConfigured(
        '{}: invalid settings: {}'.format(storage_class, invalid_settings))

  for setting, value in settings.iteritems():
    if not settings_validators[setting](value):
      raise ImproperlyConfigured(
          '{}: invalid value for {}'.format(storage_class, setting))
74927
public void validate()
    throws ConfigException
  {
    loadManifest();
    
    if (_manifest != null)
      validateManifest(_jarPath.getContainer().getURL(), _manifest);
  }
213376
def configuration_is_valid?(configuration)
      required_parameters = ['file_name', 'standard_stream']
      required_parameters.each { |parameter| return false unless configuration.include?(parameter) }
      return false if configuration['file_name'].empty?
      return false unless ['stdout', 'stderr', 'none'].include?(configuration['standard_stream'])
      return true
    end
591004
def validate(self, config):
        
        if not isinstance(config, ConfigObject):
            raise Exception("Config object expected")

        if config["output"]["componants"] not in ("local", "remote", "embedded", "without"):
            raise ValueError("Unknown componant \"%s\"." % config["output"]["componants"])

        if config["output"]["layout"] not in ("default", "content-only"):
            raise ValueError("Unknown layout \"%s\"." % config["output"]["layout"])

        if config["input"]["locations"] is not None:
            unknown_locations = [x for x in config["input"]["locations"] if not os.path.exists(x)]
            if len(unknown_locations) > 0:
                raise ValueError(
                    "Location%s \"%s\" does not exists"
                    % ("s" if len(unknown_locations) > 1 else "", ("\" and \"").join(unknown_locations))
                )

            config["input"]["locations"] = [os.path.realpath(x) for x in config["input"]["locations"]]

        if config["input"]["arguments"] is not None:
            if not isinstance(config["input"]["arguments"], dict):
                raise ValueError(
                    "Sources arguments \"%s\" are not a dict" % config["input"]["arguments"]
                )
823274
def _validate_config(self, config):
        
        required_keys = [
            self.KEY_IDP_CONFIG,
            self.KEY_ENDPOINTS,
        ]

        if not config:
            raise ValueError("No configuration given")

        for key in required_keys:
            try:
                _val = config[key]
            except KeyError as e:
                raise ValueError("Missing configuration key: %s" % key) from e
947435
def validate_sort_fields(self):
        
        sort_fields = ','.join(self.options.sort_fields)
        if sort_fields == '*':
            sort_fields = self.get_output_fields()

        return formatting.validate_sort_fields(sort_fields or config.sort_fields)
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
712350
def validate(config):
    '''
    
    '''

    VALID_ITEMS = [
        'type', 'bytes_sent', 'bytes_recv', 'packets_sent',
        'packets_recv', 'errin', 'errout', 'dropin',
        'dropout'
    ]

    # Configuration for load beacon should be a list of dicts
    if not isinstance(config, list):
        return False, ('Configuration for network_info beacon must be a list.')
    else:

        _config = {}
        list(map(_config.update, config))

        for item in _config.get('interfaces', {}):
            if not isinstance(_config['interfaces'][item], dict):
                return False, ('Configuration for network_info beacon must '
                               'be a list of dictionaries.')
            else:
                if not any(j in VALID_ITEMS for j in _config['interfaces'][item]):
                    return False, ('Invalid configuration item in '
                                   'Beacon configuration.')
    return True, 'Valid beacon configuration'