Please note that the support for BlueLock vCloud Director is not complete
org.jclouds.provider/bluelock-vcdirector
using jclouds Installation.{% highlight java %}
ComputeServiceContext context = ContextBuilder.newBuilder(“bluelock-vcdirector”) .credentials(“username@orgname”, password) .modules(ImmutableSet. of(new Log4JLoggingModule(), new SshjSshClientModule())) .buildView(ComputeServiceContext.class);
// create a customization script to run when the machine starts up String script = “cat > /root/foo.txt<<EOF\nI love candy\nEOF\n”; TemplateOptions options = client.templateOptions(); options.as(VCloudTemplateOptions.class).customizationScript(script);
// run a couple nodes accessible via group nodes = context.getComputeService().createNodesInGroup(“webserver”, 2, options);
// get a synchronous object to use for manipulating vcloud objects in BlueLock VCloudClient client = VCloudClient.class.cast(context.getProviderSpecificContext().getApi());
// look at all the thumbnails of my vApps VApp app = client.getVApp(vApp.getHref());
for (Vm vm : app.getChildren()) { assert client.getThumbnailOfVm(vm.getHref()) != null; }
// release resources context.close();
{% endhighlight %}