try {
if (computeServiceContext.getComputeService().getSecurityGroupExtension().isPresent()) {
SecurityGroupExtension securityGroupExtension = computeServiceContext.getComputeService().getSecurityGroupExtension().get();
Instance instance = Iterables.getFirst(instances, null);
if (instance != null) {
SecurityGroup group = Iterables.find(securityGroupExtension.listSecurityGroupsForNode(instance.getNodeMetadata().getId()),
new Predicate<SecurityGroup>() {
@Override
public boolean apply(SecurityGroup input) {
if (input.getName().contains(clusterSpec.getClusterName()) ||
input.getId().contains(clusterSpec.getClusterName())) {