class CreateIndexCommand extends GfshCommand {

  Set<String> getGroupsContainingRegion(ConfigurationPersistenceService cps,
      String regionName) {
    Set<String> foundGroups = new HashSet<>();
    for (String group : cps.getGroups()) {
      CacheConfig cacheConfig = cps.getCacheConfig(group, true);
      if (cacheConfig.findRegionConfiguration(regionName) != null) {
        foundGroups.add(group);
      }
    }
    return foundGroups;
  }

}