@Singleton public class AdaptingComputeServiceStrategies<N,H,I,L> extends Object implements CreateNodeWithGroupEncodedIntoName, DestroyNodeStrategy, GetNodeMetadataStrategy, GetImageStrategy, ListNodesStrategy, RebootNodeStrategy, ResumeNodeStrategy, SuspendNodeStrategy
Constructor and Description |
---|
AdaptingComputeServiceStrategies(Map<String,Credentials> credentialStore,
PrioritizeCredentialsFromTemplate prioritizeCredentialsFromTemplate,
ComputeServiceAdapter<N,H,I,L> client,
com.google.common.base.Function<N,NodeMetadata> nodeMetadataAdapter,
com.google.common.base.Function<I,Image> imageAdapter,
ComputeServiceAdapterContextModule.AddDefaultCredentialsToImage addDefaultCredentialsToImage) |
Modifier and Type | Method and Description |
---|---|
NodeMetadata |
createNodeWithGroupEncodedIntoName(String group,
String name,
Template template)
create a node given the name and template parameters such as imageid, hardwareid, and
locationid.
|
NodeMetadata |
destroyNode(String id) |
Image |
getImage(String id) |
NodeMetadata |
getNode(String id) |
Iterable<? extends NodeMetadata> |
listDetailsOnNodesMatching(com.google.common.base.Predicate<? super NodeMetadata> filter) |
Iterable<? extends ComputeMetadata> |
listNodes() |
Iterable<? extends NodeMetadata> |
listNodesByIds(Iterable<String> ids) |
NodeMetadata |
rebootNode(String id) |
NodeMetadata |
resumeNode(String id) |
NodeMetadata |
suspendNode(String id) |
@Named(value="jclouds.compute") protected Logger logger
@Inject public AdaptingComputeServiceStrategies(Map<String,Credentials> credentialStore, PrioritizeCredentialsFromTemplate prioritizeCredentialsFromTemplate, ComputeServiceAdapter<N,H,I,L> client, com.google.common.base.Function<N,NodeMetadata> nodeMetadataAdapter, com.google.common.base.Function<I,Image> imageAdapter, ComputeServiceAdapterContextModule.AddDefaultCredentialsToImage addDefaultCredentialsToImage)
public Iterable<? extends ComputeMetadata> listNodes()
listNodes
in interface ListNodesStrategy
public Iterable<? extends NodeMetadata> listNodesByIds(Iterable<String> ids)
listNodesByIds
in interface ListNodesStrategy
public Iterable<? extends NodeMetadata> listDetailsOnNodesMatching(com.google.common.base.Predicate<? super NodeMetadata> filter)
listDetailsOnNodesMatching
in interface ListNodesStrategy
public Image getImage(String id)
getImage
in interface GetImageStrategy
public NodeMetadata getNode(String id)
getNode
in interface GetNodeMetadataStrategy
public NodeMetadata rebootNode(String id)
rebootNode
in interface RebootNodeStrategy
public NodeMetadata resumeNode(String id)
resumeNode
in interface ResumeNodeStrategy
public NodeMetadata suspendNode(String id)
suspendNode
in interface SuspendNodeStrategy
public NodeMetadata destroyNode(String id)
destroyNode
in interface DestroyNodeStrategy
public NodeMetadata createNodeWithGroupEncodedIntoName(String group, String name, Template template)
createNodeWithGroupEncodedIntoName
in interface CreateNodeWithGroupEncodedIntoName
group
- group name supplied by the username
- supplied by CreateNodesInGroupThenAddToSet
and must have the tag encoded into
it.template
- supplied by the userCopyright © 2009-2016 The Apache Software Foundation. All Rights Reserved.