Package org.jclouds.cloudstack.compute
Class CloudStackComputeService
- java.lang.Object
-
- org.jclouds.compute.internal.BaseComputeService
-
- org.jclouds.cloudstack.compute.CloudStackComputeService
-
- All Implemented Interfaces:
ComputeService
@Singleton public class CloudStackComputeService extends BaseComputeService
-
-
Field Summary
Fields Modifier and Type Field Description protected CloudStackApiclientprotected com.google.common.cache.LoadingCache<String,SshKeyPair>keyPairCacheprotected GroupNamingConvention.FactorynamingConventionprotected com.google.common.base.Function<Set<? extends NodeMetadata>,com.google.common.collect.Multimap<String,String>>orphanedGroupsByZoneIdprotected com.google.common.cache.LoadingCache<ZoneAndName,SecurityGroup>securityGroupMapprotected 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
Constructors Modifier Constructor Description protectedCloudStackComputeService(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, 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 NodeMetadata>,com.google.common.collect.Multimap<String,String>> orphanedGroupsByZoneId, GroupNamingConvention.Factory namingConvention, com.google.common.base.Supplier<com.google.common.cache.LoadingCache<String,Zone>> zoneIdToZone, com.google.common.base.Optional<ImageExtension> imageExtension, com.google.common.base.Optional<SecurityGroupExtension> securityGroupExtension, DelegatingImageExtension.Factory delegatingImageExtension)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcleanOrphanedGroupsInZone(Set<String> groups, String zoneId)protected voidcleanUpIncidentalResourcesOfDeadNodes(Set<? extends NodeMetadata> deadNodes)CloudStackTemplateOptionstemplateOptions()returns template options, asCloudStackTemplateOptions.-
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
-
-
-
-
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 NodeMetadata>,com.google.common.collect.Multimap<String,String>> orphanedGroupsByZoneId
-
namingConvention
protected final GroupNamingConvention.Factory namingConvention
-
-
Constructor Detail
-
CloudStackComputeService
@Inject protected CloudStackComputeService(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, @Named("DEFAULT") javax.inject.Provider<TemplateOptions> templateOptionsProvider, @Named("jclouds.compute.timeout.node-running") com.google.common.base.Predicate<AtomicReference<NodeMetadata>> nodeRunning, @Named("jclouds.compute.timeout.node-terminated") com.google.common.base.Predicate<AtomicReference<NodeMetadata>> nodeTerminated, @Named("jclouds.compute.timeout.node-suspended") com.google.common.base.Predicate<AtomicReference<NodeMetadata>> nodeSuspended, InitializeRunScriptOnNodeOrPlaceInBadMap.Factory initScriptRunnerFactory, RunScriptOnNode.Factory runScriptOnNodeFactory, InitAdminAccess initAdminAccess, PersistNodeCredentials persistNodeCredentials, @Named("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 NodeMetadata>,com.google.common.collect.Multimap<String,String>> orphanedGroupsByZoneId, GroupNamingConvention.Factory namingConvention, com.google.common.base.Supplier<com.google.common.cache.LoadingCache<String,Zone>> zoneIdToZone, com.google.common.base.Optional<ImageExtension> imageExtension, com.google.common.base.Optional<SecurityGroupExtension> securityGroupExtension, DelegatingImageExtension.Factory delegatingImageExtension)
-
-
Method Detail
-
cleanUpIncidentalResourcesOfDeadNodes
protected void cleanUpIncidentalResourcesOfDeadNodes(Set<? extends NodeMetadata> deadNodes)
- Overrides:
cleanUpIncidentalResourcesOfDeadNodesin classBaseComputeService
-
cleanOrphanedGroupsInZone
protected void cleanOrphanedGroupsInZone(Set<String> groups, String zoneId)
-
templateOptions
public CloudStackTemplateOptions templateOptions()
returns template options, asCloudStackTemplateOptions.- Specified by:
templateOptionsin interfaceComputeService- Overrides:
templateOptionsin classBaseComputeService
-
-