public class OpenStackPoolDriverConfig extends Object
OpenStackPoolDriver, which declares how
to authenticate and what OpenStack region to operate against.
The OpenStackPoolDriver can be configured to use either use version 2
or version 3 of the
identity HTTP API.| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_CONNECTION_TIMEOUT
The default timeout in milliseconds until a connection is established.
|
static int |
DEFAULT_SOCKET_TIMEOUT
The default socket timeout (
SO_TIMEOUT) in milliseconds, which is
the timeout for waiting for data or, put differently, a maximum period
inactivity between two consecutive data packets). |
| Constructor and Description |
|---|
OpenStackPoolDriverConfig(com.elastisys.scale.commons.openstack.AuthConfig auth,
String region,
List<String> networks,
Boolean assignFloatingIp)
Creates a new
OpenStackPoolDriverConfig. |
OpenStackPoolDriverConfig(com.elastisys.scale.commons.openstack.AuthConfig auth,
String region,
List<String> networks,
Boolean assignFloatingIp,
Integer connectionTimeout,
Integer socketTimeout)
Creates a new
OpenStackPoolDriverConfig. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
com.elastisys.scale.commons.openstack.AuthConfig |
getAuth()
Returns a description of how to authenticate with the OpenStack identity
service (Keystone).
|
Integer |
getConnectionTimeout()
The timeout in milliseconds until a connection is established.
|
List<String> |
getNetworks()
The names of the networks to attach launched servers to (for example,
private). |
String |
getRegion()
Returns the particular OpenStack region (out of the ones available in
Keystone's service catalog) to connect to.
|
Integer |
getSocketTimeout()
The socket timeout (
SO_TIMEOUT) in milliseconds, which is the
timeout for waiting for data or, put differently, a maximum period
inactivity between two consecutive data packets. |
int |
hashCode() |
Boolean |
isAssignFloatingIp()
Returns
true if a floating IP address should be allocated to
launched servers. |
com.elastisys.scale.commons.openstack.ApiAccessConfig |
toApiAccessConfig()
Returns an
ApiAccessConfig that can be used with an
OSClientFactory and corresponds to this
OpenStackPoolDriverConfig. |
String |
toString() |
void |
validate()
Performs basic validation of this configuration.
|
public static final int DEFAULT_CONNECTION_TIMEOUT
public static final int DEFAULT_SOCKET_TIMEOUT
SO_TIMEOUT) in milliseconds, which is
the timeout for waiting for data or, put differently, a maximum period
inactivity between two consecutive data packets).public OpenStackPoolDriverConfig(com.elastisys.scale.commons.openstack.AuthConfig auth,
String region,
List<String> networks,
Boolean assignFloatingIp)
OpenStackPoolDriverConfig.auth - Declares how to authenticate with the OpenStack identity
service (Keystone).region - The particular OpenStack region (out of the ones available in
Keystone's service catalog) to connect to. For example,
RegionOne.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: true.public OpenStackPoolDriverConfig(com.elastisys.scale.commons.openstack.AuthConfig auth,
String region,
List<String> networks,
Boolean assignFloatingIp,
Integer connectionTimeout,
Integer socketTimeout)
OpenStackPoolDriverConfig.auth - Declares how to authenticate with the OpenStack identity
service (Keystone).region - The particular OpenStack region (out of the ones available in
Keystone's service catalog) to connect to. For example,
RegionOne.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: true.connectionTimeout - The timeout in milliseconds until a connection is established.
May be null. Default:
10000 ms.socketTimeout - The socket timeout (SO_TIMEOUT) in milliseconds, which
is the timeout for waiting for data or, put differently, a
maximum period inactivity between two consecutive data
packets. May be null. Default:
10000 ms.public com.elastisys.scale.commons.openstack.AuthConfig getAuth()
public String getRegion()
RegionOne
.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 Integer getConnectionTimeout()
public Integer getSocketTimeout()
SO_TIMEOUT) in milliseconds, which is the
timeout for waiting for data or, put differently, a maximum period
inactivity between two consecutive data packets.public com.elastisys.scale.commons.openstack.ApiAccessConfig toApiAccessConfig()
ApiAccessConfig that can be used with an
OSClientFactory and corresponds to this
OpenStackPoolDriverConfig.public void validate()
throws IllegalArgumentException
IllegalArgumentException on failure to validate the
configuration.IllegalArgumentExceptionCopyright © 2011–2016 elastisys. All rights reserved.