当前位置: 首页>>代码示例>>Java>>正文


Java EnvironmentImpl.setMachines方法代码示例

本文整理汇总了Java中org.eclipse.che.api.workspace.server.model.impl.EnvironmentImpl.setMachines方法的典型用法代码示例。如果您正苦于以下问题:Java EnvironmentImpl.setMachines方法的具体用法?Java EnvironmentImpl.setMachines怎么用?Java EnvironmentImpl.setMachines使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.eclipse.che.api.workspace.server.model.impl.EnvironmentImpl的用法示例。


在下文中一共展示了EnvironmentImpl.setMachines方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setUp

import org.eclipse.che.api.workspace.server.model.impl.EnvironmentImpl; //导入方法依赖的package包/类
@BeforeMethod
public void setUp() throws Exception {
  devExtendedMachine = new ExtendedMachineImpl();
  extendedMachine = new ExtendedMachineImpl();
  environment = new EnvironmentImpl();
  cheService = new CheServiceImpl();
  CheServiceImpl devCheService = new CheServiceImpl();
  internalEnv = new CheServicesEnvironmentImpl();

  provisioner =
      new CodenvyInContainerInfrastructureProvisioner(
          agentConfigApplier, SYNC_KEY, TEST_PROJECTS_FOLDER);

  Map<String, ExtendedMachineImpl> extendedMachines = new HashMap<>();
  extendedMachines.put(NON_DEV_MACHINE_NAME, extendedMachine);
  extendedMachines.put(DEV_MACHINE_NAME, devExtendedMachine);
  environment.setMachines(extendedMachines);
  Map<String, CheServiceImpl> services = new HashMap<>();
  services.put(NON_DEV_MACHINE_NAME, cheService);
  services.put(DEV_MACHINE_NAME, devCheService);
  internalEnv.setServices(services);
  devExtendedMachine.setAgents(
      asList("org.eclipse.che.exec", "org.eclipse.che.terminal", "org.eclipse.che.ws-agent"));
  extendedMachine.setAgents(
      asList("org.eclipse.che.ws-agent2", "not.che.ws-agent", "org.eclipse.che.terminal"));
}
 
开发者ID:codenvy,项目名称:codenvy,代码行数:27,代码来源:CodenvyInContainerInfrastructureProvisionerTest.java

示例2: createEnv

import org.eclipse.che.api.workspace.server.model.impl.EnvironmentImpl; //导入方法依赖的package包/类
public static EnvironmentImpl createEnv() {
  final RecipeImpl newRecipe = new RecipeImpl();
  newRecipe.setLocation("new-location");
  newRecipe.setType("new-type");
  newRecipe.setContentType("new-content-type");
  newRecipe.setContent("new-content");

  final MachineConfigImpl newMachine = new MachineConfigImpl();
  final ServerConfigImpl serverConf1 =
      new ServerConfigImpl("2265", "http", "/path1", singletonMap("key", "value"));
  final ServerConfigImpl serverConf2 =
      new ServerConfigImpl("2266", "ftp", "/path2", singletonMap("key", "value"));
  newMachine.setServers(ImmutableMap.of("ref1", serverConf1, "ref2", serverConf2));
  newMachine.setInstallers(ImmutableList.of("agent5", "agent4"));
  newMachine.setAttributes(singletonMap("att1", "val"));
  newMachine.setEnv(singletonMap("CHE_ENV", "value"));

  final EnvironmentImpl newEnv = new EnvironmentImpl();
  newEnv.setMachines(ImmutableMap.of("new-machine", newMachine));
  newEnv.setRecipe(newRecipe);
  return newEnv;
}
 
开发者ID:eclipse,项目名称:che,代码行数:23,代码来源:TestObjectsFactory.java

示例3: createEnvDto

import org.eclipse.che.api.workspace.server.model.impl.EnvironmentImpl; //导入方法依赖的package包/类
private static EnvironmentDto createEnvDto() {
  final RecipeImpl environmentRecipe = new RecipeImpl();
  environmentRecipe.setType("type");
  environmentRecipe.setContent("content");
  environmentRecipe.setContentType("compose");
  environmentRecipe.setLocation("location");
  final EnvironmentImpl env = new EnvironmentImpl();
  final MachineConfigImpl extendedMachine = new MachineConfigImpl();
  extendedMachine.setInstallers(singletonList("agent"));
  extendedMachine.setAttributes(singletonMap("att1", "value"));
  extendedMachine.setServers(
      singletonMap(
          "agent", new ServerConfigImpl("5555", "https", "path", singletonMap("key", "value"))));
  env.setRecipe(environmentRecipe);
  env.setMachines(singletonMap("machine1", extendedMachine));
  return org.eclipse.che.api.workspace.server.DtoConverter.asDto(env);
}
 
开发者ID:eclipse,项目名称:che,代码行数:18,代码来源:FactoryServiceTest.java


注:本文中的org.eclipse.che.api.workspace.server.model.impl.EnvironmentImpl.setMachines方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。