From fc4d4fcd2c7577c05764ac677822cb035b4e6c70 Mon Sep 17 00:00:00 2001 From: Adrian Cole Date: Sun, 27 Nov 2011 18:45:52 -0500 Subject: [PATCH] block on job complete --- .../compute/strategy/CloudStackComputeServiceAdapter.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/compute/strategy/CloudStackComputeServiceAdapter.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/compute/strategy/CloudStackComputeServiceAdapter.java index 23bf9d0893..40bb47501e 100644 --- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/compute/strategy/CloudStackComputeServiceAdapter.java +++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/compute/strategy/CloudStackComputeServiceAdapter.java @@ -228,11 +228,10 @@ public class CloudStackComputeServiceAdapter implements } public void deleteIPForwardingRuleAndDisableStaticNAT(IPForwardingRule rule) { - boolean completed; Long job = client.getNATClient().deleteIPForwardingRule(rule.getId()); if (job != null) { logger.debug(">> deleting IPForwardingRule(%s)", rule.getId()); - completed = jobComplete.apply(job); + boolean completed = jobComplete.apply(job); logger.trace("<< IPForwardingRule(%s) deleted(%s)", rule.getId(), completed); disableStaticNATOnPublicIP(rule.getIPAddressId()); } @@ -242,7 +241,8 @@ public class CloudStackComputeServiceAdapter implements Long job = client.getNATClient().disableStaticNATOnPublicIP(IPAddressId); if (job != null) { logger.debug(">> disabling static nat IPAddress(%s)", IPAddressId); - logger.trace("<< IPAddress(%s) static nat disabled", IPAddressId); + boolean completed = jobComplete.apply(job); + logger.trace("<< IPAddress(%s) static nat disabled(%s)", IPAddressId, completed); } }