> @@ -236,28 +414,34 @@ public void destroyNode(String id) {
>        VirtualGuest guest = getNode(id);
>        if (guest == null)
>           return;
> -
> -      if (guest.getBillingItemId() == -1)
> -         throw new IllegalStateException(String.format("no billing item for 
> guest(%s) so we cannot cancel the order",
> -               id));
> -
> -      logger.debug(">> canceling service for guest(%s) billingItem(%s)", id, 
> guest.getBillingItemId());
> -      client.getVirtualGuestApi().cancelService(guest.getBillingItemId());
> +      logger.debug(">> awaiting virtualGuest(%s) without active 
> transactions", guest.getId());
> +      checkState(retry(new Predicate<VirtualGuest>() {
> +         public boolean apply(VirtualGuest guest) {
> +               guest = getNode(guest.getId() + "");

Can you do the same without re-assigning the variable passed as a parameter?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/296/files#r11138223

Reply via email to