> + @Override
> + public Set<SecurityGroup> listSecurityGroupsForNode(String id) {
> + checkNotNull(id, "id");
> + ZoneAndId zoneAndId = ZoneAndId.fromSlashEncoded(id);
> + String zone = zoneAndId.getZone();
> + String instanceId = zoneAndId.getId();
> +
> + Optional<? extends ServerWithSecurityGroupsApi> serverApi =
> client.getServerWithSecurityGroupsExtensionForZone(zone);
> + Optional<? extends SecurityGroupApi> sgApi =
> client.getSecurityGroupExtensionForZone(zone);
> +
> + if (!serverApi.isPresent() || !sgApi.isPresent()) {
> + return ImmutableSet.of();
> + }
> +
> + ServerWithSecurityGroups instance = serverApi.get().get(instanceId);
> + if (instance == null) {
I'm not sure. I think we don't need to bother warning, since if someone's
trying to open ports on a cloud that doesn't have security groups, well, they
don't need to worry about opening ports. =)
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/144/files#r6353332