> +
> +/**
> + * Helper methods for autoscale examples
> + * 
> + * @author Zack Shoylev
> + */
> +public class Utils {
> +   public static String getGroupId(GroupApi groupApi) {
> +      for ( GroupState state : groupApi.listGroupStates() ) {
> +         Group g = groupApi.get(state.getId());
> +         for ( ScalingPolicyResponse policy : g.getScalingPolicies() ) {
> +            if (policy.getName().equals(NAME)) return g.getId();
> +         }
> +      }
> +
> +      throw new RuntimeException("Group not found");

[minor] IllegalArgException?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-examples/pull/24/files#r7656425

Reply via email to