@Singleton public class CloudStackComputeServiceAdapter extends Object implements ComputeServiceAdapter<VirtualMachine,ServiceOffering,Template,Zone>
CloudStackClient
implementation
and the jclouds ComputeService
ComputeServiceAdapter.NodeAndInitialCredentials<N>
Constructor and Description |
---|
CloudStackComputeServiceAdapter(CloudStackClient client,
com.google.common.base.Predicate<String> jobComplete,
com.google.common.base.Supplier<Map<String,Network>> networkSupplier,
BlockUntilJobCompletesAndReturnResult blockUntilJobCompletesAndReturnResult,
StaticNATVirtualMachineInNetwork.Factory staticNATVMInNetwork,
CreatePortForwardingRulesForIP setupPortForwardingRulesForIP,
CreateFirewallRulesForIP setupFirewallRulesForIP,
com.google.common.cache.LoadingCache<String,Set<IPForwardingRule>> vmToRules,
Map<String,Credentials> credentialStore,
Map<NetworkType,? extends OptionsConverter> optionsConverters,
com.google.common.base.Supplier<com.google.common.cache.LoadingCache<String,Zone>> zoneIdToZone) |
@Named(value="jclouds.compute") protected Logger logger
@Inject public CloudStackComputeServiceAdapter(CloudStackClient client, com.google.common.base.Predicate<String> jobComplete, com.google.common.base.Supplier<Map<String,Network>> networkSupplier, BlockUntilJobCompletesAndReturnResult blockUntilJobCompletesAndReturnResult, StaticNATVirtualMachineInNetwork.Factory staticNATVMInNetwork, CreatePortForwardingRulesForIP setupPortForwardingRulesForIP, CreateFirewallRulesForIP setupFirewallRulesForIP, com.google.common.cache.LoadingCache<String,Set<IPForwardingRule>> vmToRules, Map<String,Credentials> credentialStore, Map<NetworkType,? extends OptionsConverter> optionsConverters, com.google.common.base.Supplier<com.google.common.cache.LoadingCache<String,Zone>> zoneIdToZone)
public ComputeServiceAdapter.NodeAndInitialCredentials<VirtualMachine> createNodeWithGroupEncodedIntoName(String group, String name, Template template)
ComputeServiceAdapter
ComputeService.createNodesInGroup(String, int, Template)
generates the parameters
passed into this method such that each node in the set has a unique name.
N
. If you are not using library-native objects (such as libvirt Domain
) use
JCloudsNativeComputeServiceAdapter
instead.
credentialStore
createNodeWithGroupEncodedIntoName
in interface ComputeServiceAdapter<VirtualMachine,ServiceOffering,Template,Zone>
group
- used to aggregate nodes with identical configurationname
- unique supplied name for the node, which has the group encoded into it.template
- includes imageId
, locationId
, and hardwareId
used to resume
the instance.ComputeService.createNodesInGroup(String, int, Template)
public Iterable<ServiceOffering> listHardwareProfiles()
ComputeServiceAdapter
listHardwareProfiles
in interface ComputeServiceAdapter<VirtualMachine,ServiceOffering,Template,Zone>
ComputeService.listHardwareProfiles()
public Iterable<Template> listImages()
ComputeServiceAdapter
listImages
in interface ComputeServiceAdapter<VirtualMachine,ServiceOffering,Template,Zone>
ComputeService.listImages()
public Template getImage(String id)
ComputeServiceAdapter
getImage
in interface ComputeServiceAdapter<VirtualMachine,ServiceOffering,Template,Zone>
id
- Image#getId
, which is not necessarily Image#getProviderId
public Iterable<VirtualMachine> listNodes()
listNodes
in interface ComputeServiceAdapter<VirtualMachine,ServiceOffering,Template,Zone>
public Iterable<VirtualMachine> listNodesByIds(Iterable<String> ids)
listNodesByIds
in interface ComputeServiceAdapter<VirtualMachine,ServiceOffering,Template,Zone>
public Iterable<Zone> listLocations()
listLocations
in interface ComputeServiceAdapter<VirtualMachine,ServiceOffering,Template,Zone>
public VirtualMachine getNode(String id)
getNode
in interface ComputeServiceAdapter<VirtualMachine,ServiceOffering,Template,Zone>
public void destroyNode(String id)
destroyNode
in interface ComputeServiceAdapter<VirtualMachine,ServiceOffering,Template,Zone>
public void destroyVirtualMachine(String virtualMachineId)
public Set<String> deleteIPForwardingRulesForVMAndReturnDistinctIPs(String virtualMachineId)
public Set<String> deleteFirewallRulesForVMAndReturnDistinctIPs(String virtualMachineId)
public void awaitCompletion(String job)
public void rebootNode(String id)
rebootNode
in interface ComputeServiceAdapter<VirtualMachine,ServiceOffering,Template,Zone>
public void resumeNode(String id)
resumeNode
in interface ComputeServiceAdapter<VirtualMachine,ServiceOffering,Template,Zone>
public void suspendNode(String id)
suspendNode
in interface ComputeServiceAdapter<VirtualMachine,ServiceOffering,Template,Zone>
Copyright © 2009-2013 jclouds. All Rights Reserved.