Configures a SWAG manager. Overrides existing configuration.
350723
def configure(self, *args, **kwargs):
        """"""

        self.version = kwargs['schema_version']
        self.namespace = kwargs['namespace']
        self.backend = get(kwargs['type'])(*args, **kwargs)
        self.context = kwargs.pop('schema_context', {})
1184147
def apply_spm_config(overrides, defaults):
    '''
    
    '''
    opts = defaults.copy()
    _adjust_log_file_override(overrides, defaults['log_file'])
    if overrides:
        opts.update(overrides)

    # Prepend root_dir to other paths
    prepend_root_dirs = [
        'formula_path', 'pillar_path', 'reactor_path',
        'spm_cache_dir', 'spm_build_dir'
    ]

    # These can be set to syslog, so, not actual paths on the system
    for config_key in ('spm_logfile',):
        log_setting = opts.get(config_key, '')
        if log_setting is None:
            continue

        if urlparse(log_setting).scheme == '':
            prepend_root_dirs.append(config_key)

    prepend_root_dir(opts, prepend_root_dirs)
    return opts
76664
public static function configure(): void
    {
        $filesystem = new Filesystem();
        $config     = [
            'colors'          => '1',
            'installed_paths' => implode(',', [
                Path::VENDOR_DIR . '/hostnet/phpcs-tool/src/',
                Path::VENDOR_DIR . '/slevomat/coding-standard/SlevomatCodingStandard',
            ]),
        ];

        if (!$filesystem->exists(['phpcs.xml', 'phpcs.xml.dist'])) {
            $config['default_standard'] = 'Hostnet';
        }

        $filesystem->dumpFile(
            Path::VENDOR_DIR . '/squizlabs/php_codesniffer/CodeSniffer.conf',
            sprintf('<?php $phpCodeSnifferConfig = %s;', var_export($config, true))
        );

        $filesystem->dumpFile(__DIR__ . '/../../../HostnetPaths/ruleset.xml', self::generateHostnetPathsXml());
    }
544192
def _configure_manager(self):
        
        self._flavor_manager = CloudCDNFlavorManager(self,
                uri_base="flavors", resource_class=CloudCDNFlavor,
                response_key=None, plural_response_key="flavors")
        self._services_manager = CloudCDNServiceManager(self,
                uri_base="services", resource_class=CloudCDNService,
                response_key=None, plural_response_key="services")
425820
def configure_app(**kwargs):
    """"""
    sys_args = sys.argv
    args, command, command_args = parse_args(sys_args[1:])
    parser = OptionParser()
    parser.add_option('--config', metavar='CONFIG')
    (options, logan_args) = parser.parse_args(args)
    config_path = options.config
    logan_configure(config_path=config_path, **kwargs)
136953
def _configure_manager(self):
        
        self._manager = CloudBlockStorageManager(self,
                resource_class=CloudBlockStorageVolume, response_key="volume",
                uri_base="volumes")
        self._types_manager = BaseManager(self,
                resource_class=CloudBlockStorageVolumeType,
                response_key="volume_type", uri_base="types")
        self._snapshot_manager = CloudBlockStorageSnapshotManager(self,
                resource_class=CloudBlockStorageSnapshot,
                response_key="snapshot", uri_base="snapshots")
45864
public static void setTheManager() {
    if ("true".equalsIgnoreCase(System.getProperty(ACTIVATE_FLAG))) {
      if (!(System.getSecurityManager() instanceof DnsMonitorSecurityManager)) {
        System.setSecurityManager(theManager);
      }
    }
  }
362393
@Override
  protected void configure() {

    // Bind and expose LogWriter (a bit hacky, but needed by MapReduce for now)
    bind(LogWriter.class).to(LocalLogWriter.class);
    expose(LogWriter.class);

    // Bind ServiceAnnouncer for procedure.
    bind(ServiceAnnouncer.class).to(DiscoveryServiceAnnouncer.class);

    // For Binding queue stuff
    bind(QueueReaderFactory.class).in(Scopes.SINGLETON);

    // Bind ProgramRunner
    MapBinder<ProgramRunnerFactory.Type, ProgramRunner> runnerFactoryBinder =
      MapBinder.newMapBinder(binder(), ProgramRunnerFactory.Type.class, ProgramRunner.class);
    runnerFactoryBinder.addBinding(ProgramRunnerFactory.Type.FLOW).to(FlowProgramRunner.class);
    runnerFactoryBinder.addBinding(ProgramRunnerFactory.Type.FLOWLET).to(FlowletProgramRunner.class);

    bind(ProgramRunnerFactory.class).to(InMemoryFlowProgramRunnerFactory.class).in(Scopes.SINGLETON);
    // Note: Expose for test cases. Need to refactor test cases.
    expose(ProgramRunnerFactory.class);

    // For binding DataSet transaction stuff
    install(new DataFabricFacadeModule());
  }
360803
def configure_user(gh_token, repo):
    
    user = user_from_token(gh_token)
    repo.git.config('user.email', user.email or 'aspysdk2@microsoft.com')
    repo.git.config('user.name', user.name or 'SwaggerToSDK Automation')
1097415
protected function setupConfig()
    {
        $path = realpath(__DIR__."/../../config/gravatar-helper.php");

        $this->publishes([$path => config_path("gravatar-helper.php")]);

        $this->mergeConfigFrom($path, 'gravatar-helper');
    }
266727
def configure_owner(self, owner='www-data'):
        
        if owner is not None:
            self.main_process.set_owner_params(uid=owner, gid=owner)

        return self
1332564
private function registerSwaggerConfiguration(ContainerBuilder $container, array $config, XmlFileLoader $loader): void
    {
        if (!$config['enable_swagger']) {
            return;
        }

        $loader->load('swagger.xml');

        if ($config['enable_swagger_ui'] || $config['enable_re_doc']) {
            $loader->load('swagger-ui.xml');
            $container->setParameter('api_platform.enable_swagger_ui', $config['enable_swagger_ui']);
            $container->setParameter('api_platform.enable_re_doc', $config['enable_re_doc']);
        }

        $container->setParameter('api_platform.enable_swagger', $config['enable_swagger']);
        $container->setParameter('api_platform.swagger.api_keys', $config['swagger']['api_keys']);
    }
723522
def _configure_manager(self):
        
        self._manager = CloudDatabaseManager(self,
                resource_class=CloudDatabaseInstance, response_key="instance",
                uri_base="instances")
        self._flavor_manager = BaseManager(self,
                resource_class=CloudDatabaseFlavor, response_key="flavor",
                uri_base="flavors")
        self._backup_manager = CloudDatabaseBackupManager(self,
                resource_class=CloudDatabaseBackup, response_key="backup",
                uri_base="backups")
1069439
protected function configure()
    {
        $this
            ->setName('rollback')
            ->setDescription('Reverts the last change.');

        $this->sudo = true;
        $this->validate = false;
    }
78600
private function configure()
    {
        $analyticsConfig = $this->googleServicesCore->getConfig('analytics');
        
        if (array_key_exists('viewId', $analyticsConfig)) {
            $this->viewId = $analyticsConfig['viewId'];
        }
    }
1138819
@Override
    protected void configure() {

        install(Modules.override(new WhenBinder()).with(new OverridesGuiceWhenBinder()));

        bind(WhenVertx.class).to(DefaultWhenVertx.class).in(Singleton.class);
        bind(WhenEventBus.class).to(DefaultWhenEventBus.class).in(Singleton.class);
        bind(WhenHttpClient.class).to(DefaultWhenHttpClient.class).in(Singleton.class);
        bind(WhenFileSystem.class).to(DefaultWhenFileSystem.class).in(Singleton.class);
        bind(PromiseAdapter.class).to(DefaultPromiseAdapter.class).in(Singleton.class);

    }
1173559
def _configure(self):
        
        path = os.path.join(
            os.path.dirname(os.path.abspath(__file__)), 'config.yml'
        )

        with open(path) as file:
            defaultconfig = yaml.load(file)

        self.config = merge_dict(self.config, defaultconfig)

        if 'logging' in self.config:
            logging.config.dictConfig(self.config['logging'])
        else:
            logging.getLogger('sirbot').setLevel('INFO')