use of org.opentosca.toscana.model.capability.ScalableCapability in project TOSCAna by StuPro-TOSCAna.
the class EffectiveModelSetterTest method setDefaultTest.
/**
* Tests the generic functionality of automatic setting the default value upon element creation
*/
@Test
public void setDefaultTest() {
ScalableCapability scalable = compute.getScalable();
assertNotNull(scalable);
}
use of org.opentosca.toscana.model.capability.ScalableCapability in project TOSCAna by StuPro-TOSCAna.
the class ScalableCapabilityTest method scalableTest.
@Test
public void scalableTest() {
EffectiveModel model = new EffectiveModelFactory().create(TestTemplates.Capabilities.SCALABLE, logMock());
Compute compute = (Compute) model.getNodes().iterator().next();
ScalableCapability scalable = compute.getScalable();
assertEquals(5, (int) scalable.getMinInstances());
assertEquals(7, (int) scalable.getDefaultInstances().get());
assertEquals(Integer.MAX_VALUE, (int) scalable.getMaxInstances());
}
use of org.opentosca.toscana.model.capability.ScalableCapability in project TOSCAna by StuPro-TOSCAna.
the class Compute method init.
private void init() {
setDefault(HOST, new ContainerCapability(getChildEntity(HOST)));
setDefault(OS, new OsCapability(getChildEntity(OS)));
setDefault(ENDPOINT, new AdminEndpointCapability(getChildEntity(ENDPOINT)));
setDefault(SCALABLE, new ScalableCapability(getChildEntity(SCALABLE)));
setDefault(BINDING, new BindableCapability(getChildEntity(BINDING)));
setDefault(LOCAL_STORAGE, new BlockStorageRequirement(getChildEntity(LOCAL_STORAGE)));
}
use of org.opentosca.toscana.model.capability.ScalableCapability in project TOSCAna by StuPro-TOSCAna.
the class ContainerRuntime method init.
private void init() {
setDefault(CONTAINER_HOST, new ContainerCapability(getChildEntity(CONTAINER_HOST)));
setDefault(SCALABLE, new ScalableCapability(getChildEntity(SCALABLE)));
}
Aggregations