Ensure that all settings required at genesis are set.
423579
def _check_required_settings(batches):
    """"""
    required_settings = [
        'sawtooth.consensus.algorithm.name',
        'sawtooth.consensus.algorithm.version']

    for batch in batches:
        for txn in batch.transactions:
            txn_header = TransactionHeader()
            txn_header.ParseFromString(txn.header)
            if txn_header.family_name == 'sawtooth_settings':
                settings_payload = SettingsPayload()
                settings_payload.ParseFromString(txn.payload)
                if settings_payload.action == SettingsPayload.PROPOSE:
                    proposal = SettingProposal()
                    proposal.ParseFromString(settings_payload.data)
                    if proposal.setting in required_settings:
                        required_settings.remove(proposal.setting)

    if required_settings:
        raise CliException(
            'The following setting(s) are required at genesis, but were not '
            'included in the genesis batches: {}'.format(required_settings))
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
1084636
def _validate_required_settings(
		self, application_id, application_config, required_settings
	):
		""""""

		for setting_key in required_settings:
			if setting_key not in application_config.keys():
				raise ImproperlyConfigured(
					MISSING_SETTING.format(
						application_id=application_id, setting=setting_key
					)
				)
319920
def setup_app(command, conf, vars):
    """"""
    load_environment(conf.global_conf, conf.local_conf)
    setup_schema(command, conf, vars)
    bootstrap.bootstrap(command, conf, vars)
233863
function setup() {
  if (!fileExists(settingsPath)) {
    buildSettings();
  }

  var settings = fs.readFileSync(settingsPath, 'utf8');
  settings = JSON.parse(settings);

  if (!settings.tfPath || !settings.vsArchitecture || !settings.vsVersion) {
    buildSettings();
  }

  // Rebuild settings if TF.exe has been uninstalled/updated
  if (!fileExists(settings.tfPath)) {
    buildSettings();
  }

  return settings;
}
252793
protected function configure()
    {
        $this
            ->setName('homestead')
            ->setDescription('Reads sites/domains from homestead.yaml file and updates hosts file.')
            ->addArgument(
                'folders',
                InputArgument::IS_ARRAY,
                'Folders with valid homestead files');

        $this->sudo = true;
        $this->validate = false;
    }
990289
def require_metadata():
    ""
    egg_info_dir = os.path.join(here, 'setuptools.egg-info')
    if not os.path.exists(egg_info_dir):
        msg = (
            "Cannot build setuptools without metadata. "
            "Run `bootstrap.py`."
        )
        raise RuntimeError(msg)
932740
def ready(self):
        """"""
        super(ElasticAppConfig, self).ready()
        _validate_config(settings.get_setting("strict_validation"))
        _connect_signals()
1011659
def _setup(self):
        """"""
        default_settings.reload()
        environment_variable = self._kwargs.get(
            "ENVVAR_FOR_DYNACONF", default_settings.ENVVAR_FOR_DYNACONF
        )
        settings_module = os.environ.get(environment_variable)
        self._wrapped = Settings(
            settings_module=settings_module, **self._kwargs
        )
        self.logger.debug("Lazy Settings _setup ...")
508364
def _setup_configuration(self):
        
        self.configuration = dict(
            schema_cls=self.schema_cls,
            allowed_actions=self.allowed_actions,
            filter_by_fields=self.filter_by_fields,
            order_by_fields=self.order_by_fields,
            aggregate_by_fields=self.aggregate_by_fields,
            default_offset=self.default_offset,
            default_limit=self.default_limit)

        authentication = self.authentication_cls(schema_cls=self.schema_cls)
        authorization = self.authorization_cls(schema_cls=self.schema_cls)
        request_params_validation = self.request_params_validation_cls(
            schema_cls=self.schema_cls,
            filter_by_fields=self.filter_by_fields,
            order_by_fields=self.order_by_fields,
            aggregate_by_fields=self.aggregate_by_fields
        )
        schema_validation = self.schema_validation_cls(
            schema_cls=self.schema_cls)
        data_cleaner = self.data_cleaner_cls(schema_cls=self.schema_cls)
        entity_actions = self.entity_actions_cls(
            schema_cls=self.schema_cls,
            default_limit=self.default_limit,
            default_offset=self.default_offset)
        post_action_hooks = self.post_action_hooks_cls(
            schema_cls=self.schema_cls)
        response_converter = self.response_converter_cls(
            schema_cls=self.schema_cls)
        serializer = self.serializer_cls(schema_cls=self.schema_cls)

        self.configuration.update(dict(
            authentication=authentication,
            authorization=authorization,
            request_params_validation=request_params_validation,
            schema_validation=schema_validation,
            data_cleaner=data_cleaner,
            entity_actions=entity_actions,
            post_action_hooks=post_action_hooks,
            response_converter=response_converter,
            serializer=serializer))
342286
def setup
      ensure_not_in_dest

      plugin_manager.conscientious_require

      self.converters = instantiate_subclasses(Bunto::Converter)
      self.generators = instantiate_subclasses(Bunto::Generator)
    end
701578
def setup(self):
        """"""
        super().setup()
        self._start_time = self.clock.time
        self.initialize_simulants()
63277
def ready(self):
        """"""

        self.log('Got', len(schemastore), 'data and',
                 len(configschemastore), 'component schemata.', lvl=debug)
281
def require_setting(self, name: str, feature: str = "this feature") -> None:
        """"""
        if not self.application.settings.get(name):
            raise Exception(
                "You must define the '%s' setting in your "
                "application to use %s" % (name, feature)
            )
828218
def setup(app):
    """"""
    app.add_config_value(
        'site_url',
        default=None,
        rebuild=False
    )
    try:
        app.add_config_value(
            'html_baseurl',
            default=None,
            rebuild=False
        )
    except:
        pass

    app.connect('html-page-context', add_html_link)
    app.connect('build-finished', create_sitemap)
    app.sitemap_links = []
    app.locales = []
1108230
def _setup(self):
        
        _ensureDir(self.nonce_dir)
        _ensureDir(self.association_dir)
        _ensureDir(self.temp_dir)
392280
def prepare(self):
        '''
        
        '''
        super(Master, self).prepare()

        try:
            if self.config['verify_env']:
                v_dirs = [
                        self.config['pki_dir'],
                        os.path.join(self.config['pki_dir'], 'minions'),
                        os.path.join(self.config['pki_dir'], 'minions_pre'),
                        os.path.join(self.config['pki_dir'], 'minions_denied'),
                        os.path.join(self.config['pki_dir'],
                                     'minions_autosign'),
                        os.path.join(self.config['pki_dir'],
                                     'minions_rejected'),
                        self.config['cachedir'],
                        os.path.join(self.config['cachedir'], 'jobs'),
                        os.path.join(self.config['cachedir'], 'proc'),
                        self.config['sock_dir'],
                        self.config['token_dir'],
                        self.config['syndic_dir'],
                        self.config['sqlite_queue_dir'],
                    ]
                verify_env(
                    v_dirs,
                    self.config['user'],
                    permissive=self.config['permissive_pki_access'],
                    root_dir=self.config['root_dir'],
                    pki_dir=self.config['pki_dir'],
                )
                # Clear out syndics from cachedir
                for syndic_file in os.listdir(self.config['syndic_dir']):
                    os.remove(os.path.join(self.config['syndic_dir'], syndic_file))
        except OSError as error:
            self.environment_failure(error)

        self.setup_logfile_logger()
        verify_log(self.config)
        self.action_log_info('Setting up')

        # TODO: AIO core is separate from transport
        if not verify_socket(self.config['interface'],
                             self.config['publish_port'],
                             self.config['ret_port']):
            self.shutdown(4, 'The ports are not available to bind')
        self.config['interface'] = ip_bracket(self.config['interface'])
        migrations.migrate_paths(self.config)

        # Late import so logging works correctly
        import salt.master
        self.master = salt.master.Master(self.config)

        self.daemonize_if_required()
        self.set_pidfile()
        salt.utils.process.notify_systemd()