use of org.jclouds.scriptbuilder.statements.login.AdminAccess in project fabric8 by jboss-fuse.
the class ToTemplate method apply.
public static Template apply(CreateJCloudsContainerOptions options) {
ComputeService service = options.getComputeService();
TemplateOptions templateOptions = service.templateOptions();
TemplateBuilder builder = service.templateBuilder().any();
applyInstanceType(builder, options);
applyImageType(builder, options);
applyLocation(builder, options);
applyProviderSpecificOptions(templateOptions, options);
Optional<AdminAccess> adminAccess = ToAdminAccess.apply(options);
if (adminAccess.isPresent()) {
templateOptions.runScript(adminAccess.get());
}
builder = builder.options(templateOptions);
return builder.build();
}
Aggregations