Class AdaptingComputeServiceStrategies<N,H,I,L>
- java.lang.Object
-
- org.jclouds.compute.strategy.impl.AdaptingComputeServiceStrategies<N,H,I,L>
-
- All Implemented Interfaces:
CreateNodeWithGroupEncodedIntoName
,DestroyNodeStrategy
,GetImageStrategy
,GetNodeMetadataStrategy
,ListNodesStrategy
,RebootNodeStrategy
,ResumeNodeStrategy
,SuspendNodeStrategy
@Singleton public class AdaptingComputeServiceStrategies<N,H,I,L> extends Object implements CreateNodeWithGroupEncodedIntoName, DestroyNodeStrategy, GetNodeMetadataStrategy, GetImageStrategy, ListNodesStrategy, RebootNodeStrategy, ResumeNodeStrategy, SuspendNodeStrategy
-
-
Constructor Summary
Constructors Constructor 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)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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)
-
-
-
Field Detail
-
logger
@Named("jclouds.compute") protected Logger logger
-
-
Constructor Detail
-
AdaptingComputeServiceStrategies
@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)
-
-
Method Detail
-
listNodes
public Iterable<? extends ComputeMetadata> listNodes()
- Specified by:
listNodes
in interfaceListNodesStrategy
-
listNodesByIds
public Iterable<? extends NodeMetadata> listNodesByIds(Iterable<String> ids)
- Specified by:
listNodesByIds
in interfaceListNodesStrategy
-
listDetailsOnNodesMatching
public Iterable<? extends NodeMetadata> listDetailsOnNodesMatching(com.google.common.base.Predicate<? super NodeMetadata> filter)
- Specified by:
listDetailsOnNodesMatching
in interfaceListNodesStrategy
-
getImage
public Image getImage(String id)
- Specified by:
getImage
in interfaceGetImageStrategy
-
getNode
public NodeMetadata getNode(String id)
- Specified by:
getNode
in interfaceGetNodeMetadataStrategy
-
rebootNode
public NodeMetadata rebootNode(String id)
- Specified by:
rebootNode
in interfaceRebootNodeStrategy
-
resumeNode
public NodeMetadata resumeNode(String id)
- Specified by:
resumeNode
in interfaceResumeNodeStrategy
-
suspendNode
public NodeMetadata suspendNode(String id)
- Specified by:
suspendNode
in interfaceSuspendNodeStrategy
-
destroyNode
public NodeMetadata destroyNode(String id)
- Specified by:
destroyNode
in interfaceDestroyNodeStrategy
- Returns:
- null if the node wasn't found
-
createNodeWithGroupEncodedIntoName
public NodeMetadata createNodeWithGroupEncodedIntoName(String group, String name, Template template)
create a node given the name and template parameters such as imageid, hardwareid, and locationid.- Specified by:
createNodeWithGroupEncodedIntoName
in interfaceCreateNodeWithGroupEncodedIntoName
- Parameters:
group
- group name supplied by the username
- supplied byCreateNodesInGroupThenAddToSet
and must have the tag encoded into it.template
- supplied by the user- Returns:
- NodeMetadata from the new object, most likely in some pending state.
-
-