nacx commented on this pull request.


> +      // Make sure the resource is fully provisioned before deleting it
+      waitUntilAvailable(name);
+      URI uri = api().delete(name);
+      assertResourceDeleted(uri);
+   }
+
+   private LocalNetworkGatewayApi api() {
+      return api.getLocalNetworkGatewayApi(resourceGroupName);
+   }
+
+   private boolean waitUntilAvailable(final String name) {
+      return resourceAvailable.apply(new Supplier<Provisionable>() {
+         @Override
+         public Provisionable get() {
+            LocalNetworkGateway gw = api().get(name);
+            return gw == null ? null : gw.properties();

That's actually what it does. The predicate accepts a `Provisionable` object 
which is just an interface that exposes the `provisioningState` and then uses 
that state to check the desired status.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/1216#discussion_r194875133

Reply via email to