@Beta public final class JcloudsLocationSecurityGroupCustomizer extends BasicJcloudsLocationCustomizer
SecurityGroupDefinition
instances to be appliedModifier and Type | Method and Description |
---|---|
void |
addPermissionsToLocation(JcloudsSshMachineLocation location,
java.util.Collection<org.jclouds.net.domain.IpPermission> permissions)
Applies the given security group permissions to the given location.
|
void |
addPermissionsToLocation(JcloudsSshMachineLocation location,
org.jclouds.net.domain.IpPermission... permissions) |
void |
customize(JcloudsLocation location,
org.jclouds.compute.ComputeService computeService,
org.jclouds.compute.domain.Template template)
Replaces security groups configured on the given template with one that allows
SSH access on port 22 and allows communication on all ports between machines in
the same group.
|
java.lang.String |
getBrooklynCidrBlock() |
static JcloudsLocationSecurityGroupCustomizer |
getInstance(Entity entity)
Gets a customizer for the given entity's application.
|
static JcloudsLocationSecurityGroupCustomizer |
getInstance(java.lang.String applicationId)
Gets the customizer for the given applicationId.
|
customize, customize, customize
public static JcloudsLocationSecurityGroupCustomizer getInstance(java.lang.String applicationId)
applicationId
- An identifier for the application the customizer is to be used forpublic static JcloudsLocationSecurityGroupCustomizer getInstance(Entity entity)
entity
- The entity the customizer is to be used forpublic void addPermissionsToLocation(JcloudsSshMachineLocation location, org.jclouds.net.domain.IpPermission... permissions)
public void addPermissionsToLocation(JcloudsSshMachineLocation location, java.util.Collection<org.jclouds.net.domain.IpPermission> permissions)
permissions
- The set of permissions to be applied to the locationlocation
- Location to gain permissionspublic void customize(JcloudsLocation location, org.jclouds.compute.ComputeService computeService, org.jclouds.compute.domain.Template template)
locations
.
This method is called by Brooklyn when obtaining machines, as part of the
JcloudsLocationCustomizer
contract. It
should not be called from anywhere else.customize
in interface JcloudsLocationCustomizer
customize
in class BasicJcloudsLocationCustomizer
location
- The Brooklyn location that has called this method while obtaining a machinecomputeService
- The compute service being used by the location argument to provision a machinetemplate
- The machine template created by the location argumentpublic java.lang.String getBrooklynCidrBlock()