Configure and enable an integration.
542174
def configure_integration(path):
    """"""
    integration = register_integration(path)
    integration_args = {}
    try:
        with open(os.path.join(path, ARGS_JSON)) as f:
            integration_args = json.loads(f.read())
    except Exception as exc:
        logger.debug(str(exc), exc_info=True)
        raise click.ClickException("Cannot load {} integration args, please configure it first."
                                   .format(os.path.basename(path)))

    click.secho("[*] Adding integration {}".format(integration.name))
    logger.debug("Adding integration %s", integration.name,
                 extra={"integration": integration.name, "args": integration_args})
    configured_integration = ConfiguredIntegration(name=integration.name, integration=integration, path=path)
    configured_integration.data = integration_args
    configured_integration.integration.module = get_integration_module(path).IntegrationActionsClass(integration_args)

    configured_integrations.append(configured_integration)
1288601
def _set_slave_enabled(self, dpid, port, enabled):
        """"""
        slave = self._get_slave(dpid, port)
        if slave:
            slave['enabled'] = enabled
519743
protected function configure()
    {

        // configure the command
        $this->addOption(InputOptionKeys::PID_FILENAME, null, InputOption::VALUE_REQUIRED, 'The explicit PID filename to use', sprintf('%s/%s', sys_get_temp_dir(), Configuration::PID_FILENAME))
             ->addOption(InputOptionKeys::INSTALLATION_DIR, null, InputOption::VALUE_REQUIRED, 'The Magento installation directory to which the files has to be imported', $installationDir = getcwd())
             ->addOption(InputOptionKeys::SYSTEM_NAME, null, InputOption::VALUE_REQUIRED, 'Specify the system name to use', gethostname())
             ->addOption(InputOptionKeys::SOURCE_DIR, null, InputOption::VALUE_REQUIRED, 'The directory that has to be watched for new files', sprintf('%s/var/importexport', $installationDir))
             ->addOption(InputOptionKeys::ENTITY_TYPE_CODE, null, InputOption::VALUE_REQUIRED, 'Specify the entity type code to use, either one of "catalog_product", "catalog_category" or "eav_attribute"')
             ->addOption(InputOptionKeys::MAGENTO_EDITION, null, InputOption::VALUE_REQUIRED, 'The Magento edition to be used, either one of "CE" or "EE"', 'CE')
             ->addOption(InputOptionKeys::CONFIGURATION, null, InputOption::VALUE_REQUIRED, 'Specify the pathname to the configuration file to use')
             ->addOption(InputOptionKeys::LOG_LEVEL, null, InputOption::VALUE_REQUIRED, 'The log level to use');
    }
966123
protected function configure() : void
    {
        $this->setName('configure')
             ->setDescription('Configure your hooks')
             ->setHelp('This command creates or updates your captainhook configuration')
             ->addOption('extend', 'e', InputOption::VALUE_NONE, 'Extend existing configuration file')
             ->addOption('force', 'f', InputOption::VALUE_NONE, 'Overwrite existing configuration file')
             ->addOption('advanced', 'a', InputOption::VALUE_NONE, 'More options, but more to type')
             ->addOption(
                 'configuration',
                 'c',
                 InputOption::VALUE_OPTIONAL,
                 'Path to your json configuration',
                 './' . CH::CONFIG
             );
    }
164627
private void configureFromBundles() {
        context.lifecycle().runPhase(context.getConfiguration(), context.getConfigurationTree(),
                context.getEnvironment());
        final Stopwatch timer = context.stat().timer(BundleTime);
        final Stopwatch resolutionTimer = context.stat().timer(BundleResolutionTime);
        if (context.option(ConfigureFromDropwizardBundles)) {
            context.registerDwBundles(BundleSupport.findBundles(context.getBootstrap(), GuiceyBundle.class));
        }
        context.registerLookupBundles(bundleLookup.lookup());
        resolutionTimer.stop();
        BundleSupport.processBundles(context);
        timer.stop();
    }
555554
def connect(self, protocol=None, mode=None, disposition=None):
        """"""
        self.component.connect(protocol, mode, disposition)
485868
public function integration()
    {
        $this->yell('Starting continuous integration build');
        $this->dirRemove();
        $this->dirPrepare();
        $this->phpLint();
        $this->phpTestComplete();
        $this->phpCodeStyle();
        $this->yell('Build complete');
    }
680813
def enable(self):
        
        core_napps_manager = CoreNAppsManager(base_path=self._enabled)
        core_napps_manager.enable(self.user, self.napp)
1030615
public function enable()
    {
        if (! $this->config instanceof ConfigContract) {
            throw new SandboxException('Please initialize after setting base app.');
        }

        $this->setInstance($app = $this->getApplication());
        $this->resetApp($app);
    }
1289133
private function setup()
    {
        if ($this->started) {
            return;
        }

        if ($this->app['extend.writeable']) {
            // Do required JSON update/set up
            try {
                $this->updateJson();
            } catch (ParseException $e) {
                $this->app['logger.flash']->danger(Trans::__('Error reading extensions/composer.json file: %ERROR%', ['%ERROR%' => $e->getMessage()]));
                $this->started = false;

                return;
            }
        }

        $this->started = true;
    }
201921
def configure(self, options, conf):
        
        self.conf = conf
        if hasattr(options, self.enable_opt):
            self.enabled = getattr(options, self.enable_opt)
376781
@Override
    protected void configure() {

        bind(ChannelService.class).to(ChannelServiceImpl.class);
        bind(MonitoringService.class).to(MonitoringServiceImpl.class);

        bind(TimestampProvider.class).to(SystemTimeProvider.class);

        bind(ChannelAssignmentStrategy.class).to(RoundRobinAssignmentStrategy.class);
    }
1173397
def setup(app):
    """"""
    app.add_config_value('jsdoc_source_root', '..', 'env')
    app.add_config_value('jsdoc_output_root', 'javascript', 'env')
    app.add_config_value('jsdoc_exclude', [], 'env')
    app.connect('builder-inited', generate_docs)
896144
def create_integration_alert_and_call_send(alert, configured_integration):
    """"""
    integration_alert = IntegrationAlert(
        alert=alert,
        configured_integration=configured_integration,
        status=IntegrationAlertStatuses.PENDING.name,
        retries=configured_integration.integration.max_send_retries
    )

    send_alert_to_configured_integration(integration_alert)
526728
function install()
    {
        $this->createConfigurationDirectory();
        $this->createDriversDirectory();
        $this->createSitesDirectory();
        $this->createExtensionsDirectory();
        $this->createLogDirectory();
        $this->createCertificatesDirectory();
        $this->writeBaseConfiguration();

        $this->files->chown($this->path(), user());
    }
557781
public void activateOptions() {
    if (!isActive()) {
      setActive(true);
      if (advertiseViaMulticastDNS) {
        zeroConf = new ZeroConfSupport(ZONE, port, getName());
        zeroConf.advertise();
      }

      fireConnector(false);
    }
  }
671254
protected function configure()
    {
        $this->bind()->annotatedWith(ImportAppConfig::class)->toInstance($this->importAppConfig);
        $this->bind(SchemeCollectionInterface::class)->toProvider(ImportSchemeCollectionProvider::class);
    }