public class SharedLocationSecurityGroupCustomizer extends BasicJcloudsLocationCustomizer
Is based on JcloudsLocationSecurityGroupCustomizer
but can be instantiated
in yaml e.g.
services:
- type: org.apache.brooklyn.entity.software.base.EmptySoftwareProcess
brooklyn.config:
provisioning.properties:
customizers:
- $brooklyn:object:
type: org.apache.brooklyn.location.jclouds.networking.SharedLocationSecurityGroupCustomizer
object.fields: {locationName: "test", tcpPortRanges: ["900-910", "915", "22"], cidr: "82.40.153.101/24"}
BasicConfigurableObject.BasicConfigurationSupport
Configurable.ConfigurationSupport
Constructor and Description |
---|
SharedLocationSecurityGroupCustomizer() |
Modifier and Type | Method and Description |
---|---|
java.util.Collection<org.jclouds.compute.domain.SecurityGroup> |
applySecurityGroupCustomizations(JcloudsLocation location,
org.jclouds.compute.ComputeService computeService,
JcloudsMachineLocation machine) |
void |
customize(JcloudsLocation location,
org.jclouds.compute.ComputeService computeService,
JcloudsMachineLocation machine)
Override to configure the given machine once it has been created and started by Jclouds.
|
void |
customize(JcloudsLocation location,
org.jclouds.compute.ComputeService computeService,
org.jclouds.compute.domain.Template template)
Override to configure a subclass of this with the built template, or to configure the built
template's
TemplateOptions . |
void |
setCidr(java.lang.String cidr)
Set to restict the range that the ports that are to be opened can be accessed from
|
void |
setEnabled(boolean enabled) |
void |
setLocationName(java.lang.String locationName)
The location name is appended to the name of the shared SG - use if you need distinct shared SGs within the same location
|
void |
setOpenIcmp(java.lang.Boolean openIcmp) |
void |
setTcpPortRanges(java.util.List<java.lang.String> tcpPortRanges)
Extra ports to be opened on the entities in the SG
|
void |
setUdpPortRanges(java.util.List<java.lang.String> udpPortRanges) |
apply, customize, customize, customize, postRelease, postReleaseOnObtainError, preRelease, preReleaseOnObtainError
config, getBrooklynManagementContext, getConfig, getId, setManagementContext
public SharedLocationSecurityGroupCustomizer()
public void setLocationName(java.lang.String locationName)
locationName
- appended to the name of the SGpublic void setTcpPortRanges(java.util.List<java.lang.String> tcpPortRanges)
tcpPortRanges
- public void setUdpPortRanges(java.util.List<java.lang.String> udpPortRanges)
public void setOpenIcmp(java.lang.Boolean openIcmp)
public void setCidr(java.lang.String cidr)
cidr
- public void setEnabled(boolean enabled)
enabled
- set to false to disable this customizerpublic void customize(JcloudsLocation location, org.jclouds.compute.ComputeService computeService, org.jclouds.compute.domain.Template template)
JcloudsLocationCustomizer
TemplateOptions
.
This method will be called before JcloudsLocationCustomizer.customize(JcloudsLocation, ComputeService, TemplateOptions)
.
customize
in interface JcloudsLocationCustomizer
customize
in class BasicJcloudsLocationCustomizer
public void customize(JcloudsLocation location, org.jclouds.compute.ComputeService computeService, JcloudsMachineLocation machine)
JcloudsLocationCustomizer
If CloudLocationConfig.WAIT_FOR_SSHABLE
is true the machine is guaranteed to be
SSHable when this method is called.
customize
in interface JcloudsLocationCustomizer
customize
in class BasicJcloudsLocationCustomizer
public java.util.Collection<org.jclouds.compute.domain.SecurityGroup> applySecurityGroupCustomizations(JcloudsLocation location, org.jclouds.compute.ComputeService computeService, JcloudsMachineLocation machine)