trevorflanagan commented on this pull request.
> +{% highlight java %}
+ /*
+ * Deploy Network Domain to the Zone / Datacenter we wish to operate
on. The response from this API is the Network Domain Identifier.
+ */
+ String networkDomainId = api.getNetworkApi().deployNetworkDomain(AU9,
"jclouds-example", "jclouds-example", "ESSENTIALS");
+{% endhighlight %}
+
+A Network Domain deployment is an asynchronous process. We need to wait for it
to complete. The Dimension Data provider
+has built in google guice predicates that will block execution and check that
the Network Domain's State has moved from PENDING_ADD to NORMAL.
+
+Following is some example code that shows how the to use predicate suitable
for asserting a Network Domain state has transitioned to the NORMAL state. The
predicate uses the Network Domain Identifier we wish to check the state of.
+{% highlight java %}
+ Injector injector = contextBuilder.buildInjector();
+ Predicate<String> networkDomainNormalPredicate =
injector.getInstance(Key.get(new TypeLiteral<Predicate<String>>()
+ {
+ }, Names.named("NETWORK_DOMAIN_NORMAL_PREDICATE")));
Done
--
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-site/pull/220#discussion_r224152328