@Override protected DockerfileEnvironment doCreate( @Nullable InternalRecipe recipe, Map<String, InternalMachineConfig> machines, List<Warning> warnings) throws InfrastructureException, ValidationException { checkNotNull(recipe, "Null recipe is not supported by docker file environment factory"); if (!DockerfileEnvironment.TYPE.equals(recipe.getType())) { throw new ValidationException( format( "Dockerfile environment parser doesn't support recipe type '%s'", recipe.getType())); } String dockerfile = recipe.getContent(); checkArgument(dockerfile != null, "Dockerfile content should not be null."); addRamAttributes(machines); return new DockerfileEnvironment(dockerfile, recipe, machines, warnings); }
checkNotNull(contentType, "Recipe content type should not be null"); String recipeContent = recipe.getContent();
warnings.addAll(sourceWarnings); String content = recipe.getContent(); String contentType = recipe.getContentType(); checkNotNull(contentType, "OpenShift Recipe content type should not be null");
@Override protected DockerImageEnvironment doCreate( @Nullable InternalRecipe recipe, Map<String, InternalMachineConfig> machines, List<Warning> warnings) throws InfrastructureException, ValidationException { checkNotNull(recipe, "Null recipe is not supported by docker image environment factory"); if (!DockerImageEnvironment.TYPE.equals(recipe.getType())) { throw new ValidationException( format( "Docker image environment parser doesn't support recipe type '%s'", recipe.getType())); } String dockerImage = recipe.getContent(); checkArgument(dockerImage != null, "Docker image should not be null."); addRamAttributes(machines); return new DockerImageEnvironment(dockerImage, recipe, machines, warnings); }