org.jclouds.openstack.nova.v2_0.compute
Class NovaComputeService

java.lang.Object
  extended by org.jclouds.compute.internal.BaseComputeService
      extended by org.jclouds.openstack.nova.v2_0.compute.NovaComputeService
All Implemented Interfaces:
ComputeService

@Singleton
public class NovaComputeService
extends BaseComputeService

Author:
Adrian Cole

Field Summary
protected  com.google.common.cache.LoadingCache<ZoneAndName,KeyPair> keyPairCache
           
protected  GroupNamingConvention.Factory namingConvention
           
protected  NovaApi novaApi
           
protected  com.google.common.base.Function<Set<? extends NodeMetadata>,com.google.common.collect.Multimap<String,String>> orphanedGroupsByZoneId
           
protected  com.google.common.cache.LoadingCache<ZoneAndName,SecurityGroupInZone> securityGroupMap
           
 
Fields inherited from class org.jclouds.compute.internal.BaseComputeService
context, credentialStore, logger
 
Constructor Summary
protected NovaComputeService(ComputeServiceContext context, Map<String,Credentials> credentialStore, com.google.common.base.Supplier<Set<? extends Image>> images, com.google.common.base.Supplier<Set<? extends Hardware>> sizes, com.google.common.base.Supplier<Set<? extends Location>> locations, ListNodesStrategy listNodesStrategy, GetImageStrategy getImageStrategy, GetNodeMetadataStrategy getNodeMetadataStrategy, CreateNodesInGroupThenAddToSet runNodesAndAddToSetStrategy, RebootNodeStrategy rebootNodeStrategy, DestroyNodeStrategy destroyNodeStrategy, ResumeNodeStrategy startNodeStrategy, SuspendNodeStrategy stopNodeStrategy, javax.inject.Provider<TemplateBuilder> templateBuilderProvider, javax.inject.Provider<TemplateOptions> templateOptionsProvider, com.google.common.base.Predicate<AtomicReference<NodeMetadata>> nodeRunning, com.google.common.base.Predicate<AtomicReference<NodeMetadata>> nodeTerminated, com.google.common.base.Predicate<AtomicReference<NodeMetadata>> nodeSuspended, InitializeRunScriptOnNodeOrPlaceInBadMap.Factory initScriptRunnerFactory, RunScriptOnNode.Factory runScriptOnNodeFactory, InitAdminAccess initAdminAccess, PersistNodeCredentials persistNodeCredentials, ComputeServiceConstants.Timeouts timeouts, ExecutorService executor, NovaApi novaApi, com.google.common.cache.LoadingCache<ZoneAndName,SecurityGroupInZone> securityGroupMap, com.google.common.cache.LoadingCache<ZoneAndName,KeyPair> keyPairCache, com.google.common.base.Function<Set<? extends NodeMetadata>,com.google.common.collect.Multimap<String,String>> orphanedGroupsByZoneId, GroupNamingConvention.Factory namingConvention, com.google.common.base.Optional<ImageExtension> imageExtension)
           
 
Method Summary
protected  void cleanOrphanedGroupsInZone(Set<String> groups, String zoneId)
           
protected  void cleanUpIncidentalResourcesOfDeadNodes(Set<? extends NodeMetadata> deadNodes)
           
 NovaTemplateOptions templateOptions()
          returns template options, except of type NovaTemplateOptions.
 
Methods inherited from class org.jclouds.compute.internal.BaseComputeService
createNodesInGroup, createNodesInGroup, createNodesInGroup, destroyNode, destroyNodesMatching, doDestroyNode, getContext, getImage, getImageExtension, getNodeMetadata, listAssignableLocations, listHardwareProfiles, listImages, listNodes, listNodesDetailsMatching, rebootNode, rebootNodesMatching, resumeNode, resumeNodesMatching, runScriptOnNode, runScriptOnNode, runScriptOnNode, runScriptOnNode, runScriptOnNodesMatching, runScriptOnNodesMatching, runScriptOnNodesMatching, runScriptOnNodesMatching, 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

novaApi

protected final NovaApi novaApi

securityGroupMap

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

keyPairCache

protected final com.google.common.cache.LoadingCache<ZoneAndName,KeyPair> keyPairCache

orphanedGroupsByZoneId

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

namingConvention

protected final GroupNamingConvention.Factory namingConvention
Constructor Detail

NovaComputeService

@Inject
protected NovaComputeService(ComputeServiceContext context,
                                    Map<String,Credentials> credentialStore,
                                    com.google.common.base.Supplier<Set<? extends Image>> images,
                                    com.google.common.base.Supplier<Set<? extends Hardware>> sizes,
                                    com.google.common.base.Supplier<Set<? extends Location>> locations,
                                    ListNodesStrategy listNodesStrategy,
                                    GetImageStrategy getImageStrategy,
                                    GetNodeMetadataStrategy getNodeMetadataStrategy,
                                    CreateNodesInGroupThenAddToSet runNodesAndAddToSetStrategy,
                                    RebootNodeStrategy rebootNodeStrategy,
                                    DestroyNodeStrategy destroyNodeStrategy,
                                    ResumeNodeStrategy startNodeStrategy,
                                    SuspendNodeStrategy stopNodeStrategy,
                                    javax.inject.Provider<TemplateBuilder> templateBuilderProvider,
                                    javax.inject.Provider<TemplateOptions> templateOptionsProvider,
                                    @Named(value="jclouds.compute.timeout.node-running")
                                    com.google.common.base.Predicate<AtomicReference<NodeMetadata>> nodeRunning,
                                    @Named(value="jclouds.compute.timeout.node-terminated")
                                    com.google.common.base.Predicate<AtomicReference<NodeMetadata>> nodeTerminated,
                                    @Named(value="jclouds.compute.timeout.node-suspended")
                                    com.google.common.base.Predicate<AtomicReference<NodeMetadata>> nodeSuspended,
                                    InitializeRunScriptOnNodeOrPlaceInBadMap.Factory initScriptRunnerFactory,
                                    RunScriptOnNode.Factory runScriptOnNodeFactory,
                                    InitAdminAccess initAdminAccess,
                                    PersistNodeCredentials persistNodeCredentials,
                                    ComputeServiceConstants.Timeouts timeouts,
                                    @Named(value="jclouds.user-threads")
                                    ExecutorService executor,
                                    NovaApi novaApi,
                                    com.google.common.cache.LoadingCache<ZoneAndName,SecurityGroupInZone> securityGroupMap,
                                    com.google.common.cache.LoadingCache<ZoneAndName,KeyPair> keyPairCache,
                                    com.google.common.base.Function<Set<? extends NodeMetadata>,com.google.common.collect.Multimap<String,String>> orphanedGroupsByZoneId,
                                    GroupNamingConvention.Factory namingConvention,
                                    com.google.common.base.Optional<ImageExtension> imageExtension)
Method Detail

cleanUpIncidentalResourcesOfDeadNodes

protected void cleanUpIncidentalResourcesOfDeadNodes(Set<? extends NodeMetadata> deadNodes)
Overrides:
cleanUpIncidentalResourcesOfDeadNodes in class BaseComputeService

cleanOrphanedGroupsInZone

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

templateOptions

public NovaTemplateOptions templateOptions()
returns template options, except of type NovaTemplateOptions.

Specified by:
templateOptions in interface ComputeService
Overrides:
templateOptions in class BaseComputeService


Copyright © 2009-2012 jclouds. All Rights Reserved.