- Some users get a `DependencyVioloation`, rather than `InvalidGroup.InUse`, 
when attempting to delete the security group. This caused 
`cleanupIncidentalResources` to propagate an exception.
- Fixes it by converting this to an `IllegalStateException` (in same way as is 
done for `InUse`)
- Adds tests (using `MockWebServer`) for happy-path and for failing to delete 
the security group with each of `InUse` and `DependencyViolation` responses.
You can merge this Pull Request by running:

  git pull https://github.com/aledsage/jclouds fix/jclouds-529

Or you can view, comment on it, or merge it online at:

  https://github.com/jclouds/jclouds/pull/629

-- Commit Summary --

  * JCLOUDS-529: fix aws-ec2 cleanupIncidentalResources

-- File Changes --

    A apis/ec2/src/test/resources/delete_keypair.xml (4)
    A apis/ec2/src/test/resources/delete_placementgroup.xml (4)
    A apis/ec2/src/test/resources/describe_instances_empty.xml (15)
    A apis/ec2/src/test/resources/describe_keypairs_jcloudssingle.xml (8)
    M 
apis/sts/src/main/java/org/jclouds/aws/handlers/ParseAWSErrorFromXmlContent.java
 (4)
    M 
providers/aws-ec2/src/test/java/org/jclouds/aws/ec2/compute/AWSEC2ComputeServiceApiMockTest.java
 (104)
    M 
providers/aws-ec2/src/test/java/org/jclouds/aws/ec2/internal/BaseAWSEC2ApiMockTest.java
 (11)

-- Patch Links --

https://github.com/jclouds/jclouds/pull/629.patch
https://github.com/jclouds/jclouds/pull/629.diff

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/629

Reply via email to