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
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionAdaptingComputeServiceStrategies
(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
Modifier and TypeMethodDescriptioncreateNodeWithGroupEncodedIntoName
(String group, String name, Template template) create a node given the name and template parameters such as imageid, hardwareid, and locationid.destroyNode
(String id) Iterable
<? extends NodeMetadata> listDetailsOnNodesMatching
(com.google.common.base.Predicate<? super NodeMetadata> filter) Iterable
<? extends ComputeMetadata> Iterable
<? extends NodeMetadata> listNodesByIds
(Iterable<String> ids) rebootNode
(String id) resumeNode
(String id) suspendNode
(String id)
-
Field Details
-
logger
-
-
Constructor Details
-
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 Details
-
listNodes
- Specified by:
listNodes
in interfaceListNodesStrategy
-
listNodesByIds
- 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
- Specified by:
getImage
in interfaceGetImageStrategy
-
getNode
- Specified by:
getNode
in interfaceGetNodeMetadataStrategy
-
rebootNode
- Specified by:
rebootNode
in interfaceRebootNodeStrategy
-
resumeNode
- Specified by:
resumeNode
in interfaceResumeNodeStrategy
-
suspendNode
- Specified by:
suspendNode
in interfaceSuspendNodeStrategy
-
destroyNode
- 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.
-