use of org.eclipse.che.api.core.model.workspace.config.MachineConfig in project che-server by eclipse-che.
the class TestObjects method createEnvironment.
public static EnvironmentImpl createEnvironment(String... machineRams) throws Exception {
final Map<String, MachineConfig> machines = new HashMap<>();
for (String machineRam : machineRams) {
final MachineConfigImpl machineConfig = new MachineConfigImpl();
machineConfig.setAttributes(ImmutableMap.of(MachineConfig.MEMORY_LIMIT_ATTRIBUTE, machineRam));
machines.put("dev-machine", machineConfig);
}
final RecipeImpl recipe = new RecipeImpl("compose", "application/x-yaml", "", null);
return new EnvironmentImpl(recipe, machines);
}
Aggregations