> @@ -47,11 +72,28 @@ public IpPermission apply(SecurityGroupRule rule) {
> builder.ipProtocol(rule.getIpProtocol());
> builder.fromPort(rule.getFromPort());
> builder.toPort(rule.getToPort());
> - if (rule.getGroup() != null)
> - builder.tenantIdGroupNamePair(rule.getGroup().getTenantId(),
> rule.getGroup().getName());
> + if (rule.getGroup() != null) {
> + String zone = getFirst(filter(locationIndex.get().keySet(),
> isSecurityGroupInZone(rule.getGroup().getName())),
> + null);
Do security groups "switch zones" often? Otherwise, would it be worth creating
a Map or LoadingCache for `zonesForGroup` with the results of this, which could
avoid the filter operation and turn this into
```
String zone = zonesForGroup.getIfPresent(group)
```
or similar?
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/167/files#r6819463