org.jclouds.vcloud.compute.strategy
Class InstantiateVAppTemplateWithGroupEncodedIntoNameThenCustomizeDeployAndPowerOn

java.lang.Object
  extended by org.jclouds.vcloud.compute.strategy.InstantiateVAppTemplateWithGroupEncodedIntoNameThenCustomizeDeployAndPowerOn

@Singleton
public class InstantiateVAppTemplateWithGroupEncodedIntoNameThenCustomizeDeployAndPowerOn
extends Object

Author:
Adrian Cole

Nested Class Summary
static class InstantiateVAppTemplateWithGroupEncodedIntoNameThenCustomizeDeployAndPowerOn.ComputerNameValidator
          per john ellis at bluelock, vCloud Director 1.5 is more strict than earlier versions.
 
Field Summary
protected  String buildVersion
           
protected  VCloudClient client
           
protected  NetworkConfig defaultNetworkConfig
           
protected  Logger logger
           
protected  com.google.common.base.Predicate<URI> successTester
           
protected  com.google.common.cache.LoadingCache<URI,VAppTemplate> vAppTemplates
           
 
Constructor Summary
protected InstantiateVAppTemplateWithGroupEncodedIntoNameThenCustomizeDeployAndPowerOn(VCloudClient client, com.google.common.base.Predicate<URI> successTester, com.google.common.cache.LoadingCache<URI,VAppTemplate> vAppTemplates, NetworkConfig defaultNetworkConfig, String buildVersion)
           
 
Method Summary
 ComputeServiceAdapter.NodeAndInitialCredentials<VApp> createNodeWithGroupEncodedIntoName(String group, String name, Template template)
           
 void ensureVmHasAllocationModeOrPooled(VApp vApp, IpAddressAllocationMode ipAllocationMode)
           
 Task updateCPUCountOfVm(Vm vm, int cpuCount)
           
 Task updateMemoryMBOfVm(Vm vm, int memoryInMB)
           
 Task updateVmWithNameAndCustomizationScript(Vm vm, String name, String customizationScript)
          Naming constraints modifying a VM on a VApp in vCloud Director (at least v1.5) can be more strict than those in a vAppTemplate.
 void waitForTask(Task task)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

@Named(value="jclouds.compute")
protected Logger logger

client

protected final VCloudClient client

successTester

protected final com.google.common.base.Predicate<URI> successTester

vAppTemplates

protected final com.google.common.cache.LoadingCache<URI,VAppTemplate> vAppTemplates

defaultNetworkConfig

protected final NetworkConfig defaultNetworkConfig

buildVersion

protected final String buildVersion
Constructor Detail

InstantiateVAppTemplateWithGroupEncodedIntoNameThenCustomizeDeployAndPowerOn

@Inject
protected InstantiateVAppTemplateWithGroupEncodedIntoNameThenCustomizeDeployAndPowerOn(VCloudClient client,
                                                                                              com.google.common.base.Predicate<URI> successTester,
                                                                                              com.google.common.cache.LoadingCache<URI,VAppTemplate> vAppTemplates,
                                                                                              NetworkConfig defaultNetworkConfig,
                                                                                              @Named(value="jclouds.build-version")
                                                                                              String buildVersion)
Method Detail

createNodeWithGroupEncodedIntoName

public ComputeServiceAdapter.NodeAndInitialCredentials<VApp> createNodeWithGroupEncodedIntoName(String group,
                                                                                                String name,
                                                                                                Template template)

waitForTask

public void waitForTask(Task task)

updateVmWithNameAndCustomizationScript

public Task updateVmWithNameAndCustomizationScript(Vm vm,
                                                   String name,
                                                   @Nullable
                                                   String customizationScript)
Naming constraints modifying a VM on a VApp in vCloud Director (at least v1.5) can be more strict than those in a vAppTemplate. For example, while it is possible to instantiate a vAppTemplate with a VM named (incorrectly) Ubuntu_10.04, you must change the name to a valid (alphanumeric underscore) name before you can update it.


ensureVmHasAllocationModeOrPooled

public void ensureVmHasAllocationModeOrPooled(VApp vApp,
                                              @Nullable
                                              IpAddressAllocationMode ipAllocationMode)

updateCPUCountOfVm

public Task updateCPUCountOfVm(Vm vm,
                               int cpuCount)

updateMemoryMBOfVm

public Task updateMemoryMBOfVm(Vm vm,
                               int memoryInMB)


Copyright © 2009-2012 jclouds. All Rights Reserved.