org.jclouds.compute.domain
Interface TemplateBuilder

All Known Implementing Classes:
AWSEC2TemplateBuilderImpl, EC2TemplateBuilderImpl, TemplateBuilderImpl, VCloudTemplateBuilderImpl

public interface TemplateBuilder

Creates a customized template based on requirements.

Author:
Adrian Cole

Method Summary
 TemplateBuilder any()
          prime this builder with parameters known to work on the current compute provider.
 TemplateBuilder biggest()
          configure this template to the largest hardware, based on cores, ram, then disk
 Template build()
          Generate an immutable template from the current builder.
 TemplateBuilder fastest()
          configure this template to the fastest hardware, based on cpu
 TemplateBuilder fromHardware(Hardware hardware)
          Configure this template to require the minimum hardware of the parameter.
 TemplateBuilder fromImage(Image image)
          Configure this template to fuzzy-match on the image parameter
 TemplateBuilder fromTemplate(Template image)
          Configure this template to match the resources of the template parameter.
 TemplateBuilder hardwareId(String hardwareId)
          Configure this template to require a specific hardwareId.
 TemplateBuilder imageDescriptionMatches(String imageDescriptionRegex)
          Configure this template to have an image description that matches the regular expression
 TemplateBuilder imageId(String imageId)
          Configure this template to require a specific imageId.
 TemplateBuilder imageMatches(com.google.common.base.Predicate<Image> condition)
          Configure this template to have an image description that matches the supplied condition
 TemplateBuilder imageNameMatches(String imageNameRegex)
          Configure this template to have an image name that matches the regular expression
 TemplateBuilder imageVersionMatches(String imageVersionRegex)
          Configure this template to have an image version that matches the regular expression
 TemplateBuilder locationId(String locationId)
          Configure this template to start in a specific location
 TemplateBuilder minCores(double minCores)
          Configure this template to require the minimum cores below
 TemplateBuilder minRam(int megabytes)
          Configure this template to require the minimum ram in megabytes below
 TemplateBuilder options(TemplateOptions options)
          options such as inbound ports and run scripts.
 TemplateBuilder os64Bit(boolean is64bit)
          Configure this template to require a 64 bit operating system.
 TemplateBuilder osArchMatches(String architecture)
          Configure this template to require a specific architecture.
 TemplateBuilder osDescriptionMatches(String osDescriptionRegex)
          Configure this template to have an operating system description that matches the regular expression
 TemplateBuilder osFamily(OsFamily os)
          Configure this template to use a specific operating system image.
 TemplateBuilder osNameMatches(String osNameRegex)
          Configure this template to have an operating system name that matches the regular expression
 TemplateBuilder osVersionMatches(String osVersionRegex)
          Configure this template to have an os version that matches the regular expression
 TemplateBuilder smallest()
          configure this template to the smallest hardware, based on cores, ram, then disk
 

Method Detail

any

TemplateBuilder any()
prime this builder with parameters known to work on the current compute provider.


fromHardware

TemplateBuilder fromHardware(Hardware hardware)
Configure this template to require the minimum hardware of the parameter.


fromImage

TemplateBuilder fromImage(Image image)
Configure this template to fuzzy-match on the image parameter


fromTemplate

TemplateBuilder fromTemplate(Template image)
Configure this template to match the resources of the template parameter.


smallest

TemplateBuilder smallest()
configure this template to the smallest hardware, based on cores, ram, then disk


fastest

TemplateBuilder fastest()
configure this template to the fastest hardware, based on cpu


biggest

TemplateBuilder biggest()
configure this template to the largest hardware, based on cores, ram, then disk


osFamily

TemplateBuilder osFamily(OsFamily os)
Configure this template to use a specific operating system image.


locationId

TemplateBuilder locationId(String locationId)
Configure this template to start in a specific location

Throws:
NoSuchElementException - if no location matches the id specified

imageId

TemplateBuilder imageId(String imageId)
Configure this template to require a specific imageId.

Note that image Ids are often scoped to location


hardwareId

TemplateBuilder hardwareId(String hardwareId)
Configure this template to require a specific hardwareId.


osNameMatches

TemplateBuilder osNameMatches(String osNameRegex)
Configure this template to have an operating system name that matches the regular expression


osDescriptionMatches

TemplateBuilder osDescriptionMatches(String osDescriptionRegex)
Configure this template to have an operating system description that matches the regular expression


osVersionMatches

TemplateBuilder osVersionMatches(String osVersionRegex)
Configure this template to have an os version that matches the regular expression


osArchMatches

TemplateBuilder osArchMatches(String architecture)
Configure this template to require a specific architecture. ex. virtualizationType or


os64Bit

TemplateBuilder os64Bit(boolean is64bit)
Configure this template to require a 64 bit operating system.


imageNameMatches

TemplateBuilder imageNameMatches(String imageNameRegex)
Configure this template to have an image name that matches the regular expression


imageVersionMatches

TemplateBuilder imageVersionMatches(String imageVersionRegex)
Configure this template to have an image version that matches the regular expression


imageDescriptionMatches

TemplateBuilder imageDescriptionMatches(String imageDescriptionRegex)
Configure this template to have an image description that matches the regular expression


imageMatches

TemplateBuilder imageMatches(com.google.common.base.Predicate<Image> condition)
Configure this template to have an image description that matches the supplied condition


minCores

TemplateBuilder minCores(double minCores)
Configure this template to require the minimum cores below


minRam

TemplateBuilder minRam(int megabytes)
Configure this template to require the minimum ram in megabytes below


build

Template build()
Generate an immutable template from the current builder.


options

TemplateBuilder options(TemplateOptions options)
options such as inbound ports and run scripts.



Copyright © 2009-2011 jclouds. All Rights Reserved.