});
}
}, 30000, 100, 500, MILLISECONDS);
try {
SecurityGroup securityGroup = sgApi().createWithNameAndDescription(name, "jclouds");
Logger.getAnonymousLogger().info("created securityGroup: " + securityGroup);
// we could look up our IP address alternatively
securityGroup = sgApi().authorizeIngressToIPRange(name, "0.0.0.0/0");
assertTrue(ipRangesAuthorized.apply(securityGroup), securityGroup.toString());
securityGroup = sgApi().get(securityGroup.getName());
Logger.getAnonymousLogger().info("ip range authorized: " + securityGroup);
return securityGroup;
} catch (RuntimeException e) {
sgApi().delete(name);
throw e;