Search in sources :

Example 6 with PlatformInput

use of org.opentosca.toscana.core.transformation.properties.PlatformInput in project TOSCAna by StuPro-TOSCAna.

the class KubernetesPlugin method getPlatformDetails.

/**
 *     Constructs the Platform Object for the Kubernetes Plugin
 */
private static Platform getPlatformDetails() {
    String platformId = "kubernetes";
    String platformName = "Kubernetes";
    Set<PlatformInput> platformProperties = new HashSet<>();
    // Create the "Property Schema" for the Kubernetes Plugin
    // Add the Push Flag (has to be set to true to push)
    platformProperties.add(new PlatformInput(DOCKER_PUSH_TO_REGISTRY_PROPERTY_KEY, PropertyType.BOOLEAN, "Set this to true if the created docker images should be pushed to the given docker registry", true, "false"));
    // Add the Registry URL Property (if the value is empty DockerHub gets used internally)
    platformProperties.add(new PlatformInput(DOCKER_REGISTRY_URL_PROPERTY_KEY, PropertyType.TEXT, "The URL To the docker Registry. (Will default to DockerHub if empty)", false, ""));
    platformProperties.add(new PlatformInput(DOCKER_REGISTRY_USERNAME_PROPERTY_KEY, PropertyType.TEXT, "The Username of the user, used to push to the regsitry", false));
    platformProperties.add(new PlatformInput(DOCKER_REGISTRY_PASSWORD_PROPERTY_KEY, PropertyType.SECRET, "The password of the registry user", false));
    platformProperties.add(new PlatformInput(DOCKER_REGISTRY_REPOSITORY_PROPERTY_KEY, PropertyType.TEXT, "The name of the repository used to push the images onto.", false));
    return new Platform(platformId, platformName, platformProperties);
}
Also used : Platform(org.opentosca.toscana.core.transformation.platform.Platform) PlatformInput(org.opentosca.toscana.core.transformation.properties.PlatformInput) HashSet(java.util.HashSet)

Aggregations

PlatformInput (org.opentosca.toscana.core.transformation.properties.PlatformInput)6 HashSet (java.util.HashSet)5 Platform (org.opentosca.toscana.core.transformation.platform.Platform)5 AWSCredentials (com.amazonaws.auth.AWSCredentials)1 ProfileCredentialsProvider (com.amazonaws.auth.profile.ProfileCredentialsProvider)1 File (java.io.File)1 Before (org.junit.Before)1 Test (org.junit.Test)1 ArgumentMatchers.anyString (org.mockito.ArgumentMatchers.anyString)1 BaseSpringTest (org.opentosca.toscana.core.BaseSpringTest)1 Csar (org.opentosca.toscana.core.csar.Csar)1 CsarImpl (org.opentosca.toscana.core.csar.CsarImpl)1 Transformation (org.opentosca.toscana.core.transformation.Transformation)1 PlatformService (org.opentosca.toscana.core.transformation.platform.PlatformService)1 OutputProperty (org.opentosca.toscana.core.transformation.properties.OutputProperty)1 PropertyType (org.opentosca.toscana.core.transformation.properties.PropertyType)1 MockMvcResultHandlers.print (org.springframework.test.web.servlet.result.MockMvcResultHandlers.print)1