org.jclouds.cloudstack.compute
Class CloudStackComputeService

java.lang.Object
  extended by org.jclouds.compute.internal.BaseComputeService
      extended by org.jclouds.cloudstack.compute.CloudStackComputeService
All Implemented Interfaces:
org.jclouds.compute.ComputeService

@Singleton
public class CloudStackComputeService
extends org.jclouds.compute.internal.BaseComputeService


Field Summary
protected  CloudStackApi client
           
protected  com.google.common.cache.LoadingCache<String,SshKeyPair> keyPairCache
           
protected  org.jclouds.compute.functions.GroupNamingConvention.Factory namingConvention
           
protected  com.google.common.base.Function<Set<? extends org.jclouds.compute.domain.NodeMetadata>,com.google.common.collect.Multimap<String,String>> orphanedGroupsByZoneId
           
protected  com.google.common.cache.LoadingCache<ZoneAndName,SecurityGroup> securityGroupMap
           
protected  com.google.common.base.Supplier<com.google.common.cache.LoadingCache<String,Zone>> zoneIdToZone
           
 
Fields inherited from class org.jclouds.compute.internal.BaseComputeService
context, credentialStore, logger
 
Constructor Summary
protected CloudStackComputeService(org.jclouds.compute.ComputeServiceContext context, Map<String,org.jclouds.domain.Credentials> credentialStore, com.google.common.base.Supplier<Set<? extends org.jclouds.compute.domain.Image>> images, com.google.common.base.Supplier<Set<? extends org.jclouds.compute.domain.Hardware>> sizes, com.google.common.base.Supplier<Set<? extends org.jclouds.domain.Location>> locations, org.jclouds.compute.strategy.ListNodesStrategy listNodesStrategy, org.jclouds.compute.strategy.GetImageStrategy getImageStrategy, org.jclouds.compute.strategy.GetNodeMetadataStrategy getNodeMetadataStrategy, org.jclouds.compute.strategy.CreateNodesInGroupThenAddToSet runNodesAndAddToSetStrategy, org.jclouds.compute.strategy.RebootNodeStrategy rebootNodeStrategy, org.jclouds.compute.strategy.DestroyNodeStrategy destroyNodeStrategy, org.jclouds.compute.strategy.ResumeNodeStrategy startNodeStrategy, org.jclouds.compute.strategy.SuspendNodeStrategy stopNodeStrategy, javax.inject.Provider<org.jclouds.compute.domain.TemplateBuilder> templateBuilderProvider, javax.inject.Provider<org.jclouds.compute.options.TemplateOptions> templateOptionsProvider, com.google.common.base.Predicate<AtomicReference<org.jclouds.compute.domain.NodeMetadata>> nodeRunning, com.google.common.base.Predicate<AtomicReference<org.jclouds.compute.domain.NodeMetadata>> nodeTerminated, com.google.common.base.Predicate<AtomicReference<org.jclouds.compute.domain.NodeMetadata>> nodeSuspended, org.jclouds.compute.strategy.InitializeRunScriptOnNodeOrPlaceInBadMap.Factory initScriptRunnerFactory, org.jclouds.compute.callables.RunScriptOnNode.Factory runScriptOnNodeFactory, org.jclouds.scriptbuilder.functions.InitAdminAccess initAdminAccess, org.jclouds.compute.internal.PersistNodeCredentials persistNodeCredentials, org.jclouds.compute.reference.ComputeServiceConstants.Timeouts timeouts, com.google.common.util.concurrent.ListeningExecutorService userExecutor, CloudStackApi client, com.google.common.cache.LoadingCache<ZoneAndName,SecurityGroup> securityGroupMap, com.google.common.cache.LoadingCache<String,SshKeyPair> keyPairCache, com.google.common.base.Function<Set<? extends org.jclouds.compute.domain.NodeMetadata>,com.google.common.collect.Multimap<String,String>> orphanedGroupsByZoneId, org.jclouds.compute.functions.GroupNamingConvention.Factory namingConvention, com.google.common.base.Supplier<com.google.common.cache.LoadingCache<String,Zone>> zoneIdToZone, com.google.common.base.Optional<org.jclouds.compute.extensions.ImageExtension> imageExtension, com.google.common.base.Optional<org.jclouds.compute.extensions.SecurityGroupExtension> securityGroupExtension)
           
 
Method Summary
protected  void cleanOrphanedGroupsInZone(Set<String> groups, String zoneId)
           
protected  void cleanUpIncidentalResourcesOfDeadNodes(Set<? extends org.jclouds.compute.domain.NodeMetadata> deadNodes)
           
 CloudStackTemplateOptions templateOptions()
          returns template options, as CloudStackTemplateOptions.
 
Methods inherited from class org.jclouds.compute.internal.BaseComputeService
createNodesInGroup, createNodesInGroup, createNodesInGroup, destroyNode, destroyNodesMatching, doDestroyNode, getContext, getImage, getImageExtension, getNodeMetadata, getSecurityGroupExtension, listAssignableLocations, listHardwareProfiles, listImages, listNodes, listNodesByIds, listNodesDetailsMatching, rebootNode, rebootNodesMatching, resumeNode, resumeNodesMatching, runScriptOnNode, runScriptOnNode, runScriptOnNode, runScriptOnNode, runScriptOnNodesMatching, runScriptOnNodesMatching, runScriptOnNodesMatching, runScriptOnNodesMatching, submitScriptOnNode, submitScriptOnNode, suspendNode, suspendNodesMatching, templateBuilder, updateNodeWithCredentialsIfPresent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

client

protected final CloudStackApi client

securityGroupMap

protected final com.google.common.cache.LoadingCache<ZoneAndName,SecurityGroup> securityGroupMap

keyPairCache

protected final com.google.common.cache.LoadingCache<String,SshKeyPair> keyPairCache

orphanedGroupsByZoneId

protected final com.google.common.base.Function<Set<? extends org.jclouds.compute.domain.NodeMetadata>,com.google.common.collect.Multimap<String,String>> orphanedGroupsByZoneId

namingConvention

protected final org.jclouds.compute.functions.GroupNamingConvention.Factory namingConvention

zoneIdToZone

protected final com.google.common.base.Supplier<com.google.common.cache.LoadingCache<String,Zone>> zoneIdToZone
Constructor Detail

CloudStackComputeService

@Inject
protected CloudStackComputeService(org.jclouds.compute.ComputeServiceContext context,
                                          Map<String,org.jclouds.domain.Credentials> credentialStore,
                                          com.google.common.base.Supplier<Set<? extends org.jclouds.compute.domain.Image>> images,
                                          com.google.common.base.Supplier<Set<? extends org.jclouds.compute.domain.Hardware>> sizes,
                                          com.google.common.base.Supplier<Set<? extends org.jclouds.domain.Location>> locations,
                                          org.jclouds.compute.strategy.ListNodesStrategy listNodesStrategy,
                                          org.jclouds.compute.strategy.GetImageStrategy getImageStrategy,
                                          org.jclouds.compute.strategy.GetNodeMetadataStrategy getNodeMetadataStrategy,
                                          org.jclouds.compute.strategy.CreateNodesInGroupThenAddToSet runNodesAndAddToSetStrategy,
                                          org.jclouds.compute.strategy.RebootNodeStrategy rebootNodeStrategy,
                                          org.jclouds.compute.strategy.DestroyNodeStrategy destroyNodeStrategy,
                                          org.jclouds.compute.strategy.ResumeNodeStrategy startNodeStrategy,
                                          org.jclouds.compute.strategy.SuspendNodeStrategy stopNodeStrategy,
                                          javax.inject.Provider<org.jclouds.compute.domain.TemplateBuilder> templateBuilderProvider,
                                          @Named(value="DEFAULT")
                                          javax.inject.Provider<org.jclouds.compute.options.TemplateOptions> templateOptionsProvider,
                                          @Named(value="jclouds.compute.timeout.node-running")
                                          com.google.common.base.Predicate<AtomicReference<org.jclouds.compute.domain.NodeMetadata>> nodeRunning,
                                          @Named(value="jclouds.compute.timeout.node-terminated")
                                          com.google.common.base.Predicate<AtomicReference<org.jclouds.compute.domain.NodeMetadata>> nodeTerminated,
                                          @Named(value="jclouds.compute.timeout.node-suspended")
                                          com.google.common.base.Predicate<AtomicReference<org.jclouds.compute.domain.NodeMetadata>> nodeSuspended,
                                          org.jclouds.compute.strategy.InitializeRunScriptOnNodeOrPlaceInBadMap.Factory initScriptRunnerFactory,
                                          org.jclouds.compute.callables.RunScriptOnNode.Factory runScriptOnNodeFactory,
                                          org.jclouds.scriptbuilder.functions.InitAdminAccess initAdminAccess,
                                          org.jclouds.compute.internal.PersistNodeCredentials persistNodeCredentials,
                                          org.jclouds.compute.reference.ComputeServiceConstants.Timeouts timeouts,
                                          @Named(value="jclouds.user-threads")
                                          com.google.common.util.concurrent.ListeningExecutorService userExecutor,
                                          CloudStackApi client,
                                          com.google.common.cache.LoadingCache<ZoneAndName,SecurityGroup> securityGroupMap,
                                          com.google.common.cache.LoadingCache<String,SshKeyPair> keyPairCache,
                                          com.google.common.base.Function<Set<? extends org.jclouds.compute.domain.NodeMetadata>,com.google.common.collect.Multimap<String,String>> orphanedGroupsByZoneId,
                                          org.jclouds.compute.functions.GroupNamingConvention.Factory namingConvention,
                                          com.google.common.base.Supplier<com.google.common.cache.LoadingCache<String,Zone>> zoneIdToZone,
                                          com.google.common.base.Optional<org.jclouds.compute.extensions.ImageExtension> imageExtension,
                                          com.google.common.base.Optional<org.jclouds.compute.extensions.SecurityGroupExtension> securityGroupExtension)
Method Detail

cleanUpIncidentalResourcesOfDeadNodes

protected void cleanUpIncidentalResourcesOfDeadNodes(Set<? extends org.jclouds.compute.domain.NodeMetadata> deadNodes)
Overrides:
cleanUpIncidentalResourcesOfDeadNodes in class org.jclouds.compute.internal.BaseComputeService

cleanOrphanedGroupsInZone

protected void cleanOrphanedGroupsInZone(Set<String> groups,
                                         String zoneId)

templateOptions

public CloudStackTemplateOptions templateOptions()
returns template options, as CloudStackTemplateOptions.

Specified by:
templateOptions in interface org.jclouds.compute.ComputeService
Overrides:
templateOptions in class org.jclouds.compute.internal.BaseComputeService


Copyright © 2009-2014 The Apache Software Foundation. All Rights Reserved.