Class LaunchConfiguration.Builder
- java.lang.Object
-
- org.jclouds.rackspace.autoscale.v1.domain.LaunchConfiguration.Builder
-
- Enclosing class:
- LaunchConfiguration
public static class LaunchConfiguration.Builder extends Object
-
-
Field Summary
Fields Modifier and Type Field Description protected List<LoadBalancer>
loadBalancers
protected List<String>
networks
protected List<Personality>
personalities
protected String
serverDiskConfig
protected String
serverFlavorRef
protected String
serverImageRef
protected com.google.common.collect.ImmutableMap<String,String>
serverMetadata
protected String
serverName
protected LaunchConfiguration.LaunchConfigurationType
type
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LaunchConfiguration
build()
LaunchConfiguration.Builder
fromLaunchConfiguration(LaunchConfiguration in)
LaunchConfiguration.Builder
loadBalancers(List<LoadBalancer> loadBalancers)
Optional.LaunchConfiguration.Builder
networks(List<String> networks)
Optional.LaunchConfiguration.Builder
personalities(List<Personality> personalities)
Optional.LaunchConfiguration.Builder
serverDiskConfig(String serverDiskConfig)
Optional.LaunchConfiguration.Builder
serverFlavorRef(String serverFlavorRef)
Required.LaunchConfiguration.Builder
serverImageRef(String serverImageRef)
Required.LaunchConfiguration.Builder
serverMetadata(Map<String,String> serverMetadata)
Optional.LaunchConfiguration.Builder
serverName(String serverName)
Required.LaunchConfiguration.Builder
type(LaunchConfiguration.LaunchConfigurationType type)
Required.
-
-
-
Field Detail
-
loadBalancers
protected List<LoadBalancer> loadBalancers
-
type
protected LaunchConfiguration.LaunchConfigurationType type
-
personalities
protected List<Personality> personalities
-
serverName
protected String serverName
-
serverImageRef
protected String serverImageRef
-
serverFlavorRef
protected String serverFlavorRef
-
serverDiskConfig
protected String serverDiskConfig
-
-
Method Detail
-
loadBalancers
public LaunchConfiguration.Builder loadBalancers(List<LoadBalancer> loadBalancers)
Optional. Details about one or more load balancers to add new servers to. All servers are added to these load balancers with the IP addresses of their ServiceNet network. All servers are enabled and equally weighted. Any new servers that are not connected to the ServiceNet network are not added to any load balancers.- Parameters:
loadBalancers
- The load balancers of this LaunchConfiguration.- Returns:
- The builder object.
- See Also:
LaunchConfiguration.getLoadBalancers()
-
type
public LaunchConfiguration.Builder type(LaunchConfiguration.LaunchConfigurationType type)
Required. The type of the launch configuration. Currently, this parameter must be set to launch_server.- Parameters:
type
- The type for this LaunchConfiguration.- Returns:
- The builder object.
- See Also:
LaunchConfiguration.getType()
-
networks
public LaunchConfiguration.Builder networks(List<String> networks)
Optional. The networks to which you want to attach the server. This attribute enables you to attach to an isolated network for your tenant ID, the public Internet network, and the private ServiceNet network. If you do not specify any networks, your server is attached to the public Internet and private ServiceNet networks. If you specify one or more networks, your server is attached to only the networks that you specify. If you want to attach to the private ServiceNet or public Internet networks, you must specify them explicitly. The UUID for the private ServiceNet is 11111111-1111-1111-1111-111111111111. The UUID for the public Internet is 00000000-0000-0000-0000-000000000000. You cannot attach a private network to an OnMetal server. Future generations of OnMetal servers will have this capability. Until then, use ServiceNet for internal traffic, and remember to secure your OnMetal server because ServiceNet is open to other Rackspace customers.- Parameters:
networks
- The networks of this LaunchConfiguration.- Returns:
- The builder object.
- See Also:
LaunchConfiguration.getNetworks()
-
personalities
public LaunchConfiguration.Builder personalities(List<Personality> personalities)
Optional. The file path and/or the content that you want to inject into a server image. For more information, see the Server Personality documentation for Rackspace Cloud Servers.- Parameters:
personalities
- The personalities of this LaunchConfiguration.- Returns:
- The builder object.
- See Also:
Personality
,LaunchConfiguration.getPersonalities()
, Server Personality
-
serverName
public LaunchConfiguration.Builder serverName(String serverName)
Required. The server name. The name that you specify in a create request becomes the initial host name of the server. After the server is built, if you change the server name in the API or change the host name directly, the names are not kept in sync. Also, server names are not guaranteed to be unique.- Parameters:
serverName
- The serverName of this LaunchConfiguration.- Returns:
- The builder object.
- See Also:
LaunchConfiguration.getServerName()
-
serverImageRef
public LaunchConfiguration.Builder serverImageRef(String serverImageRef)
Required. The ID of the cloud server image, after which new server images are created.- Parameters:
serverImageRef
- The serverImageRef of this LaunchConfiguration.- Returns:
- The builder object.
- See Also:
LaunchConfiguration.getServerImageRef()
-
serverFlavorRef
public LaunchConfiguration.Builder serverFlavorRef(String serverFlavorRef)
Required. The flavor ID for the server. A flavor is a resource configuration for a server.- Parameters:
serverFlavorRef
- The serverFlavorRef of this LaunchConfiguration.- Returns:
- The builder object.
- See Also:
LaunchConfiguration.getServerFlavorRef()
-
serverDiskConfig
public LaunchConfiguration.Builder serverDiskConfig(String serverDiskConfig)
Optional. The disk configuration value. A server inherits the OS-DCF:diskConfig value from the image used to create it. If an image has OS-DCF:diskConfig value of MANUAL, you cannot create a server from that image with a OS-DCF:diskConfig value of AUTO. Valid values are: AUTO: The server is built with a single partition the size of the target flavor disk. The file system is automatically adjusted to fit the entire partition. This keeps things simple and automated. AUTO is valid only for images and servers with a single partition that use the EXT3 file system. This is the default setting for applicable Rackspace base images. MANUAL: The server is built using whatever partition scheme and file system is in the source image. If the target flavor disk is larger, the remaining disk space is left unpartitioned. This enables images to have non-EXT3 file systems, multiple partitions, and so on, and enables you to manage the disk configuration.- Parameters:
serverDiskConfig
- The serverDiskConfig of this LaunchConfiguration.- Returns:
- The builder object.
- See Also:
LaunchConfiguration.getServerDiskConfig()
-
serverMetadata
public LaunchConfiguration.Builder serverMetadata(Map<String,String> serverMetadata)
Optional. Metadata key and value pairs. The maximum size of the metadata key and value is 255 bytes each.- Parameters:
serverMetadata
- The serverMetadata of this LaunchConfiguration.- Returns:
- The builder object.
- See Also:
LaunchConfiguration.getServerMetadata()
-
build
public LaunchConfiguration build()
- Returns:
- A new LaunchConfiguration object.
-
fromLaunchConfiguration
public LaunchConfiguration.Builder fromLaunchConfiguration(LaunchConfiguration in)
-
-