andreaturli commented on this pull request.


> +         return ImmutableSet.of();
+      }
+      return 
getSecurityGroupApi(region).listSecurityGroups().concat().transform(neutronSecurityGroupToSecurityGroup.create(location)).toSet();
+   }
+
+   @Override
+   public Set<SecurityGroup> listSecurityGroupsForNode(String id) {
+      RegionAndId regionAndId = RegionAndId.fromSlashEncoded(checkNotNull(id, 
"id"));
+      String region = regionAndId.getRegion();
+
+      SecurityGroupApi securityGroupApi = getSecurityGroupApi(region);
+
+      final 
FluentIterable<org.jclouds.openstack.neutron.v2.domain.SecurityGroup> allGroups 
= securityGroupApi.listSecurityGroups().concat();
+      Location location = locationIndex.get().get(region);
+      return ImmutableSet.copyOf(transform(filter(allGroups, notNull()), 
neutronSecurityGroupToSecurityGroup.create(location)));
+   }

good point! thanks

unfortunately also `NovaSecurityGroupExtension` is not really reliable as it is 
built on
`Optional<? extends ServerWithSecurityGroupsApi> serverWithSecurityGroupsApi = 
api.getServerWithSecurityGroupsApi(region)` which is most of the time not 
working on recent Openstack installations (they claim the extension is there 
but it is not working!)

We may need to radically change the implementation but not sure how yet


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/1175#discussion_r165008461

Reply via email to