|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.norbl.cbp.ppe.SecurityGroupFactory
public class SecurityGroupFactory
Constructor Summary | |
---|---|
SecurityGroupFactory(ParamsEc2 params,
com.amazonaws.services.ec2.AmazonEC2Client ec2Client)
|
Method Summary | |
---|---|
java.lang.String |
createOneTimeSecurityGroup()
Creates an ec2 security group that works for mpi. |
java.lang.String |
createStandardSecurityGroup(java.lang.String groupName,
java.lang.String description)
Creates a group with ssh (tcp port 22) open to the world and everything else open to group members only. |
void |
deleteOneTimeSecurityGroup(java.lang.String securityGroupName)
If the specified group is not a 'one time' group, this method does nothing. |
int |
deleteOneTimeSecurityGroups()
This method deletes all security groups owned by the user that have names starting with "<User name>_mpi_ec2_", where <User name> is the value of the system property user.name. |
java.util.List<com.amazonaws.services.ec2.model.SecurityGroup> |
getExtantSecurityGroups()
|
java.lang.String |
getOneTimeSecurityGroupName()
Gets the name of a security group that has prefix "<User name>_mpi_ec2_", (where <User name> is the value of the system property user.name), if one exists. |
java.util.List<java.lang.String> |
getOneTimeSecurityGroups(NetworkInfo ni)
|
java.util.List<java.lang.String> |
getSecurityGroups(NetworkInfo ni)
Gets a unique list of all security groups to which instances with the networkID belong. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SecurityGroupFactory(ParamsEc2 params, com.amazonaws.services.ec2.AmazonEC2Client ec2Client)
Method Detail |
---|
public java.lang.String createOneTimeSecurityGroup() throws MissingParamsException
#terminateInstances()
.
If you terminate you ec2 instances any other way (e.g. using the
AWS Management Console),
you should delete this security group.
MissingParamsException
public java.lang.String createStandardSecurityGroup(java.lang.String groupName, java.lang.String description) throws MissingParamsException
groupName
-
MissingParamsException
public java.lang.String getOneTimeSecurityGroupName() throws MissingParamsException
If more than one security group meets the criteria, the first one encountered is return.
MissingParamsException
public int deleteOneTimeSecurityGroups() throws MissingParamsException
MissingParamsException
public java.util.List<com.amazonaws.services.ec2.model.SecurityGroup> getExtantSecurityGroups()
public void deleteOneTimeSecurityGroup(java.lang.String securityGroupName)
buildSecurityGroupNamePrefix()
.
securityGroupName
- public java.util.List<java.lang.String> getSecurityGroups(NetworkInfo ni)
networkID
-
public java.util.List<java.lang.String> getOneTimeSecurityGroups(NetworkInfo ni)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |