> + String groupId = zoneAndId.getId();
> +
> + Optional<? extends SecurityGroupApi> sgApi =
> client.getSecurityGroupExtensionForZone(zone);
> +
> + if (!sgApi.isPresent()) {
> + return false;
> + }
> +
> + if (sgApi.get().get(groupId) != null) {
> + sgApi.get().delete(groupId);
> + // TODO: test this clear happens
> + groupCreator.invalidate(new ZoneSecurityGroupNameAndPorts(zone,
> groupId, ImmutableSet.<Integer> of()));
> + return true;
> + }
> +
> + return false;
...I can never remember the preferred pattern, y'see... =) Done.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/144/files#r6353397