Catch exceptions while implementing static nat, destroy the already created vm and rethrow the exception. This will keep the concept of a failed operation clear for the api users, they would expect that the vm is not created when the builder throws an exception. You can merge this Pull Request by running:
git pull https://github.com/spark404/jclouds JCLOUDS-347 Or you can view, comment on it, or merge it online at: https://github.com/jclouds/jclouds/pull/184 -- Commit Summary -- * Implement a poor-mans rollback if static nat creation fails -- File Changes -- M apis/cloudstack/src/main/java/org/jclouds/cloudstack/compute/strategy/CloudStackComputeServiceAdapter.java (45) -- Patch Links -- https://github.com/jclouds/jclouds/pull/184.patch https://github.com/jclouds/jclouds/pull/184.diff
