verifyEsmExistsInCluster();
<BUG>if (isLocalCloud()) {
deployment.scale(new ManualCapacityScaleConfigurer().memoryCapacity(</BUG>
containerMemoryInMB * numberOfInstances, MemoryUnit.MEGABYTES).create());
<BUG>} else {
deployment.scale(ElasticScaleConfigFactory.createEagerScaleConfig());</BUG>
}
} else {
final CloudTemplate template = getComputeTemplate(cloud, templateName);
validateAndPrepareStatelessSla(puConfig.getSla(), cloud, template);

verifyEsmExistsInCluster();
if (isLocalCloud()) {
setPublicMachineProvisioning(deployment, agentZones, reservedMemoryCapacityPerMachineInMB);
deployment.scale(new ManualCapacityScaleConfigurer().memoryCapacity(
containerMemoryInMB * numberOfInstances, MemoryUnit.MEGABYTES).create());
} else {
setSharedMachineProvisioning(deployment, agentZones, reservedMemoryCapacityPerMachineInMB);
deployment.scale(ElasticScaleConfigFactory.createEagerScaleConfig());
}
} else {
final CloudTemplate template = getComputeTemplate(cloud, templateName);
validateAndPrepareStatelessSla(puConfig.getSla(), cloud, template);
