@ThreadSafe public class SoftLayerSameVlanLocationCustomizer extends BasicJcloudsLocationCustomizer
machines
in SoftLayer to use
the same VLANs across an application, or other named scope
Define the scope by setting the scopeUid
(softlayer.vlan.scopeUid
)
option. Set scopeTimeout
(softlayer.vlan.timeout
) to change
the length of time the customizer will wait for VLAN information; normally 15 minutes.
The VLAN IDs and latches are stored as configuration
on
the location
provisioning the VMs, in a map keyed
on the scope.
BasicConfigurableObject.BasicConfigurationSupport
Configurable.ConfigurationSupport
Modifier and Type | Field and Description |
---|---|
static ConfigKey<java.util.Map<java.lang.String,java.util.concurrent.CountDownLatch>> |
COUNTDOWN_LATCH_MAP |
static AttributeSensor<java.lang.Integer> |
PRIVATE_VLAN_ID |
static ConfigKey<java.util.Map<java.lang.String,java.lang.Integer>> |
PRIVATE_VLAN_ID_MAP |
static AttributeSensor<java.lang.Integer> |
PUBLIC_VLAN_ID |
static ConfigKey<java.util.Map<java.lang.String,java.lang.Integer>> |
PUBLIC_VLAN_ID_MAP |
static ConfigKey<Duration> |
SCOPE_TIMEOUT |
static ConfigKey<java.lang.String> |
SCOPE_UID |
Constructor and Description |
---|
SoftLayerSameVlanLocationCustomizer() |
Modifier and Type | Method and Description |
---|---|
void |
customize(JcloudsLocation location,
org.jclouds.compute.ComputeService computeService,
JcloudsMachineLocation machine)
After provisioning, if it's the first created
JcloudsMachineLocation then get and cache the VLAN info |
void |
customize(JcloudsLocation location,
org.jclouds.compute.ComputeService computeService,
org.jclouds.compute.options.TemplateOptions templateOptions)
Update the
TemplateOptions that will
be used by JcloudsLocation to obtain machines. |
static SoftLayerSameVlanLocationCustomizer |
forScope(java.lang.String scopeUid)
Convenience creation method.
|
apply, customize, customize, customize, postRelease, postReleaseOnObtainError, preRelease, preReleaseOnObtainError
config, getBrooklynManagementContext, getConfig, getId, setManagementContext
public static final ConfigKey<java.lang.String> SCOPE_UID
public static final ConfigKey<java.util.Map<java.lang.String,java.util.concurrent.CountDownLatch>> COUNTDOWN_LATCH_MAP
public static final ConfigKey<java.util.Map<java.lang.String,java.lang.Integer>> PUBLIC_VLAN_ID_MAP
public static final ConfigKey<java.util.Map<java.lang.String,java.lang.Integer>> PRIVATE_VLAN_ID_MAP
public static final AttributeSensor<java.lang.Integer> PUBLIC_VLAN_ID
public static final AttributeSensor<java.lang.Integer> PRIVATE_VLAN_ID
public static SoftLayerSameVlanLocationCustomizer forScope(java.lang.String scopeUid)
public void customize(JcloudsLocation location, org.jclouds.compute.ComputeService computeService, org.jclouds.compute.options.TemplateOptions templateOptions)
TemplateOptions
that will
be used by JcloudsLocation
to obtain machines. Uses the VLAN
numbers configured on an existing machine, as saved in the configuration
maps for public
and private
VLAN numbers.
If no such numbers, this either returns (if no one else is creating) or blocks (waiting on someone else who is creating).
customize
in interface JcloudsLocationCustomizer
customize
in class BasicJcloudsLocationCustomizer
JcloudsLocationCustomizer#customize(JcloudsLocation, ComputeService, TemplateOptions)}
public void customize(JcloudsLocation location, org.jclouds.compute.ComputeService computeService, JcloudsMachineLocation machine)
JcloudsMachineLocation
then get and cache the VLAN infocustomize
in interface JcloudsLocationCustomizer
customize
in class BasicJcloudsLocationCustomizer
JcloudsLocationCustomizer#customize(JcloudsLocation, ComputeService, JcloudsMachineLocation)}