> +
> + @BeforeClass(groups = { "integration", "live" })
> + public void setupContext() {
> + super.setupContext();
> +
> + CloudStackApi api = view.unwrapApi(CloudStackApi.class);
> + zone = Iterables.find(api.getZoneApi().listZones(), new
> Predicate<Zone>() {
> +
> + @Override
> + public boolean apply(Zone arg0) {
> + return arg0.isSecurityGroupsEnabled();
> + }
> +
> + });
> + if (zone == null)
> + securityGroupsSupported = false;
I know it's evil and all, but...
```
for (Zone zone : api.getZoneApi().listZones()) {
if (zone.isSecurityGroupsEnabled()) {
return true;
}
}
return false;
```
seems a little easier to read and understand?
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/152/files#r7377803