Creates a new SagaEnvironment instance.
174569
public static SagaEnvironment create(
            final TimeoutManager timeoutManager,
            final StateStorage storage,
            final Provider<CurrentExecutionContext> contextProvider,
            final Set<SagaModule> modules,
            final Set<SagaLifetimeInterceptor> interceptors,
            final InstanceResolver sagaInstanceResolver,
            final ModuleCoordinatorFactory coordinatorFactory) {
        return new SagaEnvironment(timeoutManager, storage, contextProvider, modules, interceptors, sagaInstanceResolver, coordinatorFactory);
    }
1078371
function getOrCreateEnvironmentDatabase(req, res, next){

  var models = mbaas.getModels();

  log.logger.debug('process getOrCreateEnvironmentDatabase request', req.originalUrl , req.body, req.method, req.params);

  var domain = req.params.domain;
  var env = req.params.environment;
  log.logger.debug('process db create request', {domain: domain, env: env} );

  _getEnvironmentDatabase({
    domain: domain,
    environment: env
  }, function(err, found){
    if(err){
      return next(common.buildErrorObject({
        err: err,
        msg: 'Failed to get mbaas instance',
        httpCode: 500
      }));
    }

    log.logger.debug('process db create request AFTER', {domain: domain, env: env} );

    if(found){
      req.mongoUrl = common.formatDbUri(found.dbConf);
      return next();
    } else {
      // because of the composite unique index on the collection, only the first creation call will succeed.
      // NB the req.params should have the mongo.host and mongo.port set !!
      var cfg = config.getConfig();

      models.Mbaas.createModel(domain, env, cfg, function(err, created){
        if(err){
          return next(common.buildErrorObject({
            err: err,
            msg: 'Failed to create mbaas instance',
            httpCode: 500
          }));
        }
        created.createDb(cfg, function(err, dbConf){
          if(err){
            log.logger.error('Failed to create db, delete model');
            created.remove(function(removeErr){
              if(removeErr){
                log.logger.error(removeErr, 'Failed to remove model');
              }
              return next(common.buildErrorObject({
                err: err,
                msg: 'Failed to create db for domain ' + domain + ' and env ' + env,
                httpCode: 500
              }));
            });
          } else {
            req.mongoUrl = common.formatDbUri(dbConf);
            next();
          }
        });
      });
    }
  });
}
67533
public static function createFromEnvironment()
    {
        // Clean and update live global variables
        $variables = static::cleanEnvironment(Environment::getVariables());
        Environment::setVariables($variables); // Currently necessary for SSViewer, etc to work

        // Health-check prior to creating environment
        return static::createFromVariables($variables, @file_get_contents('php://input'));
    }
172324
function(config) {
			if (config.env && typeof config.env === "object") {
				return this.merge(this.createEnvironmentConfig(config.env), config);
			}

			return config;
		}
117146
function createRootSaga(sagas: Array<any> = []): any {
  return function*() {
    yield all(sagas.map(saga => call(saga)));
  };
}
282985
def make_env(env_type, real_env, sim_env_kwargs):
  """"""
  return {
      "real": lambda: real_env.new_like(  # pylint: disable=g-long-lambda
          batch_size=sim_env_kwargs["batch_size"],
          store_rollouts=False,
      ),
      "simulated": lambda: rl_utils.SimulatedBatchGymEnvWithFixedInitialFrames(  # pylint: disable=g-long-lambda
          **sim_env_kwargs
      ),
  }[env_type]()
950797
@Deprecated
    protected @Nonnull DefaultEnvironment createEnvironment(@Nonnull String... environmentNames) {
        return createEnvironment(() -> Arrays.asList(environmentNames));
    }
903762
def create_instance(self, credentials, name, **kwargs):
        """"""
        op_name = create_instance(
            credentials, self.project, self.zone, name,
            machine_type=self.machine_type,
            disk_size_gb=self.disk_size_gb,
            **kwargs)
        
        return op_name
602943
private Collection<SagaInstanceInfo> continueExistingSaga(final SagaType sagaType, final Object instanceKey) {
        Collection<SagaInstanceInfo> sagas = new ArrayList<>();

        Collection<? extends SagaState> sagaStates = stateStorage.load(sagaType.getSagaClass().getName(), instanceKey);
        for (SagaState sagaState : sagaStates) {
            try {
                Saga saga = instanceFactory.continueExisting(sagaType.getSagaClass(), sagaState);
                sagas.add(SagaInstanceInfo.define(saga, false));
            } catch (ExecutionException e) {
                Throwables.propagate(e);
            }
        }

        return sagas;
    }
41092
def create_bulk(cls, name, interfaces=None, nodes=2, cluster_mode='balancing',
            primary_mgt=None, backup_mgt=None, primary_heartbeat=None,
            log_server_ref=None, domain_server_address=None, location_ref=None,
            default_nat=False, enable_antivirus=False, enable_gti=False, comment=None,
            snmp=None, **kw):
        
        primary_heartbeat = primary_mgt if not primary_heartbeat else primary_heartbeat
        
        physical_interfaces = []
        for interface in interfaces:
            if 'interface_id' not in interface:
                raise CreateEngineFailed('Interface definitions must contain the interface_id '
                    'field. Failed to create engine: %s' % name)
            if interface.get('type', None) == 'tunnel_interface':
                tunnel_interface = TunnelInterface(**interface)
                physical_interfaces.append(
                    {'tunnel_interface': tunnel_interface})
            else:
                cluster_interface = ClusterPhysicalInterface(
                    primary_mgt=primary_mgt, backup_mgt=backup_mgt,
                    primary_heartbeat=primary_heartbeat, **interface)
                physical_interfaces.append(
                    {'physical_interface': cluster_interface})

        if snmp:
            snmp_agent = dict(
                snmp_agent_ref=snmp.get('snmp_agent', ''),
                snmp_location=snmp.get('snmp_location', ''))
            
            snmp_agent.update(
                snmp_interface=add_snmp(
                    interfaces,
                    snmp.get('snmp_interface', [])))
    
        try:
            engine = super(FirewallCluster, cls)._create(
                name=name,
                node_type='firewall_node',
                physical_interfaces=physical_interfaces,
                domain_server_address=domain_server_address,
                log_server_ref=log_server_ref,
                location_ref=location_ref,
                nodes=nodes, enable_gti=enable_gti,
                enable_antivirus=enable_antivirus,
                default_nat=default_nat,
                snmp_agent=snmp_agent if snmp else None,
                comment=comment)
            engine.update(cluster_mode=cluster_mode)
            
            return ElementCreator(cls, json=engine)
    
        except (ElementNotFound, CreateElementFailed) as e:
            raise CreateEngineFailed(e)
670655
public static function createFromEnvironment($env = [])
    {
        if (!($env instanceof Environment)) {
            $env = new Environment($env);
        }

        // Headers from environment
        $data = [];
        foreach($env as $k=>$v) {
            $k = strtoupper($k);
            if (strpos($k, 'HTTP_') === 0) {
                $k = substr($k, 5);
            } else {
                if (!isset(static::$special[$k]))
                    continue;
            }

            // normalize key
            $k = str_replace(
                ' ',
                '-',
                ucwords(strtolower(str_replace('_', ' ', $k)))
            );

            $data[$k] = $v;
        }

        return new static($data);
    }
758531
def create_api_environment_vip(self):
        """"""
        return ApiEnvironmentVip(
            self.networkapi_url,
            self.user,
            self.password,
            self.user_ldap)
642707
def create(python, env_dir, system, prompt, bare, virtualenv_py=None):
    
    if not python or python == sys.executable:
        _create_with_this(
            env_dir=env_dir, system=system, prompt=prompt,
            bare=bare, virtualenv_py=virtualenv_py,
        )
    else:
        _create_with_python(
            python=python,
            env_dir=env_dir, system=system, prompt=prompt,
            bare=bare, virtualenv_py=virtualenv_py,
        )
131589
def create(self, **kwargs):
        
        self.service.create(**kwargs)

        predix.config.set_env_value(self.use_class, 'url',
                self.service.settings.data['url'])
        predix.config.set_env_value(self.use_class, 'access_key_id',
                self.service.settings.data['access_key_id'])
        predix.config.set_env_value(self.use_class, 'bucket_name',
                self.service.settings.data['bucket_name'])
        predix.config.set_env_value(self.use_class, 'host',
                self.service.settings.data['host'])
        predix.config.set_env_value(self.use_class, 'secret_access_key',
                self.service.settings.data['secret_access_key'])
924225
def create_environment(self, name, default=False, zone=None):
        
        from qubell.api.private.environment import Environment
        return Environment.new(organization=self, name=name, zone_id=zone, default=default, router=self._router)
1140529
def create(cls, path_name=None, name=None, project_id=None,
               log_modified_at=None, crawlable=True):
        """"""
        result = cls(path_name, name, project_id, log_modified_at, crawlable)

        db.session.add(result)
        db.session.commit()

        crawl_result(result, True)

        return result
1375057
public CreateBranchRequest withEnvironmentVariables(java.util.Map<String, String> environmentVariables) {
        setEnvironmentVariables(environmentVariables);
        return this;
    }