public class ProvisioningTemplate extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
ProvisioningTemplate.Builder
A builder for constructing
ProvisioningTemplates. |
| Constructor and Description |
|---|
ProvisioningTemplate(String size,
String image,
String keyPair,
List<String> securityGroups,
String encodedUserData)
Creates a new
ProvisioningTemplate. |
ProvisioningTemplate(String size,
String image,
String keyPair,
List<String> securityGroups,
String encodedUserData,
List<String> networks,
Boolean assignFloatingIp)
Creates a new
ProvisioningTemplate. |
| Modifier and Type | Method and Description |
|---|---|
static ProvisioningTemplate.Builder |
builder(String size,
String image) |
boolean |
equals(Object obj) |
String |
getEncodedUserData()
A base 64-encoded blob
of data used to pass custom data to started machines.
|
String |
getImage()
The name of the machine image used to boot new servers.
|
String |
getKeyPair()
The name of the key pair to use for new machine instances.
|
List<String> |
getNetworks()
The names of the networks to attach launched servers to (for example,
private). |
List<String> |
getSecurityGroups()
The security group(s) to use for new machine instances.
|
String |
getSize()
The name of the server type to launch.
|
int |
hashCode() |
Boolean |
isAssignFloatingIp()
Returns
true if a floating IP address should be allocated to
launched servers. |
com.google.gson.JsonObject |
toJson() |
String |
toString() |
void |
validate()
Validates that this
ProvisioningTemplate contains all mandatory
field. |
public ProvisioningTemplate(String size, String image, String keyPair, List<String> securityGroups, String encodedUserData)
ProvisioningTemplate.size - The name of the server type to launch. For example, m1.medium.image - The name of the machine image used to boot new servers.keyPair - The name of the key pair to use for new machine instances. May
be null.securityGroups - The security group(s) to use for new machine instances. May be
null.encodedUserData - A base
64-encoded blob of data used to pass custom data to
started machines. It is supported by many cloud providers and
is typically used to pass a boot-up shell script or cloud-init
parameters to launched machines. May be null.public ProvisioningTemplate(String size, String image, String keyPair, List<String> securityGroups, String encodedUserData, List<String> networks, Boolean assignFloatingIp)
ProvisioningTemplate.size - The name of the server type to launch. For example, m1.medium.image - The name of the machine image used to boot new servers.keyPair - The name of the key pair to use for new machine instances. May
be null.securityGroups - The security group(s) to use for new machine instances. May be
null.encodedUserData - A base
64-encoded blob of data used to pass custom data to
started machines. It is supported by many cloud providers and
is typically used to pass a boot-up shell script or cloud-init
parameters to launched machines. May be null.networks - The names of the networks to attach launched servers to (for
example, private). Each network creates a separate
network interface controller (NIC) on a created server.
Typically, this option can be left out, but in rare cases,
when an account has more than one network to choose from, the
OpenStack API forces us to be explicit about the network(s) we
want to use.
If set to null or left empty, the default
behavior is to use which ever network is configured by the
cloud provider for the user/project. However, if there are
multiple choices, this will cause server boot requests to
fail.assignFloatingIp - Set to true if a floating IP address should be
allocated to launched servers. Default: false.public String getSize()
public String getImage()
public String getKeyPair()
null.public List<String> getSecurityGroups()
null.public String getEncodedUserData()
null.public List<String> getNetworks()
private). Each network creates a separate network interface
controller (NIC) on a created server. Typically, this option can be left
out, but in rare cases, when an account has more than one network to
choose from, the OpenStack API forces us to be explicit about the
network(s) we want to use.
If set to null or left empty, the default behavior is to use
which ever network is configured by the cloud provider for the
user/project. However, if there are multiple choices, this will cause
server boot requests to fail.public Boolean isAssignFloatingIp()
true if a floating IP address should be allocated to
launched servers.public void validate()
throws IllegalArgumentException
ProvisioningTemplate contains all mandatory
field.IllegalArgumentExceptionpublic com.google.gson.JsonObject toJson()
public static ProvisioningTemplate.Builder builder(String size, String image)
Copyright © 2011–2017 Elastisys. All rights reserved.