use of org.opentosca.toscana.core.transformation.properties.InputProperty in project TOSCAna by StuPro-TOSCAna.
the class CloudFoundryLampIT method getInputs.
protected PropertyInstance getInputs(EffectiveModel model) throws NoSuchPropertyException {
Set<InputProperty> prop = new HashSet<>(plugin.getPlatform().properties);
prop.addAll(model.getInputs().values());
PropertyInstance props = new PropertyInstance(prop, mock(Transformation.class));
props.set(CF_PROPERTY_KEY_USERNAME, envUser);
props.set(CF_PROPERTY_KEY_PASSWORD, envPw);
props.set(CF_PROPERTY_KEY_API, envHost);
props.set(CF_PROPERTY_KEY_ORGANIZATION, envOrga);
props.set(CF_PROPERTY_KEY_SPACE, envSpace);
return props;
}
use of org.opentosca.toscana.core.transformation.properties.InputProperty in project TOSCAna by StuPro-TOSCAna.
the class KubernetesLampIT method getInputs.
@Override
protected PropertyInstance getInputs(EffectiveModel model) throws NoSuchPropertyException {
Set<InputProperty> prop = new HashSet<>(plugin.getPlatform().properties);
prop.addAll(model.getInputs().values());
PropertyInstance instance = new PropertyInstance(prop, mock(Transformation.class));
if (System.getenv("DH_USERNAME") != null) {
// This Transformation is performed by pushing to a registry
instance.set(DOCKER_PUSH_TO_REGISTRY_PROPERTY_KEY, "true");
instance.set(DOCKER_REGISTRY_USERNAME_PROPERTY_KEY, System.getenv("DH_USERNAME"));
instance.set(DOCKER_REGISTRY_PASSWORD_PROPERTY_KEY, System.getenv("DH_PASSWORD"));
instance.set(DOCKER_REGISTRY_URL_PROPERTY_KEY, System.getenv("DH_URL"));
instance.set(DOCKER_REGISTRY_REPOSITORY_PROPERTY_KEY, System.getenv("DH_REPOSITORY"));
} else {
// This Transformation is performed by storing the files in Tar archives
instance.set(DOCKER_PUSH_TO_REGISTRY_PROPERTY_KEY, "false");
}
return instance;
}
use of org.opentosca.toscana.core.transformation.properties.InputProperty in project TOSCAna by StuPro-TOSCAna.
the class EffectiveModelTest method inputTest.
@Test
public void inputTest() {
EffectiveModel model = new EffectiveModelFactory().create(TestCsars.Testing.INPUTS_TEMPLATE, logMock());
Map<String, InputProperty> inputs = model.getInputs();
assertNotNull(inputs);
assertEquals(4, inputs.size());
InputProperty input = inputs.get("string-input");
assertNotNull(input);
assertTrue(input.getDescription().isPresent());
assertEquals("description1", input.getDescription().get());
assertTrue(input.isRequired());
}
use of org.opentosca.toscana.core.transformation.properties.InputProperty in project TOSCAna by StuPro-TOSCAna.
the class CloudFoundryLampITinput method getInputs.
protected PropertyInstance getInputs(EffectiveModel model) throws NoSuchPropertyException {
Set<InputProperty> prop = new HashSet<>(plugin.getPlatform().properties);
prop.addAll(model.getInputs().values());
PropertyInstance props = new PropertyInstance(prop, mock(Transformation.class));
props.set("database_name", "name");
props.set("database_user", "user");
props.set("database_port", "3333");
props.set("database_password", "secrets");
props.set(CF_PROPERTY_KEY_USERNAME, envUser);
props.set(CF_PROPERTY_KEY_PASSWORD, envPw);
props.set(CF_PROPERTY_KEY_API, envHost);
props.set(CF_PROPERTY_KEY_ORGANIZATION, envOrga);
props.set(CF_PROPERTY_KEY_SPACE, envSpace);
return props;
}
use of org.opentosca.toscana.core.transformation.properties.InputProperty in project TOSCAna by StuPro-TOSCAna.
the class CloudFoundryLampMultiNode method getInputs.
protected PropertyInstance getInputs(EffectiveModel model) throws NoSuchPropertyException {
Set<InputProperty> prop = new HashSet<>(plugin.getPlatform().properties);
prop.addAll(model.getInputs().values());
PropertyInstance props = new PropertyInstance(prop, mock(Transformation.class));
props.set(CF_PROPERTY_KEY_USERNAME, envUser);
props.set(CF_PROPERTY_KEY_PASSWORD, envPw);
props.set(CF_PROPERTY_KEY_API, envHost);
props.set(CF_PROPERTY_KEY_ORGANIZATION, envOrga);
props.set(CF_PROPERTY_KEY_SPACE, envSpace);
return props;
}
Aggregations