@Singleton public class CloudStackComputeServiceAdapter extends Object implements ComputeServiceAdapter<VirtualMachine,ServiceOffering,Template,Zone>
CloudStackClient implementation
and the jclouds ComputeServiceComputeServiceAdapter.NodeAndInitialCredentials<N>| Constructor and Description |
|---|
CloudStackComputeServiceAdapter(CloudStackClient client,
com.google.common.base.Predicate<Long> jobComplete,
com.google.common.base.Supplier<Map<Long,Network>> networkSupplier,
BlockUntilJobCompletesAndReturnResult blockUntilJobCompletesAndReturnResult,
StaticNATVirtualMachineInNetwork.Factory staticNATVMInNetwork,
CreatePortForwardingRulesForIP setupPortForwardingRulesForIP,
com.google.common.cache.LoadingCache<Long,Set<IPForwardingRule>> vmToRules,
Map<String,Credentials> credentialStore,
Map<NetworkType,? extends OptionsConverter> optionsConverters,
com.google.common.base.Supplier<com.google.common.cache.LoadingCache<Long,Zone>> zoneIdToZone) |
| Modifier and Type | Method and Description |
|---|---|
void |
awaitCompletion(Iterable<Long> jobs) |
void |
awaitCompletion(long job) |
ComputeServiceAdapter.NodeAndInitialCredentials<VirtualMachine> |
createNodeWithGroupEncodedIntoName(String group,
String name,
Template template)
ComputeService.createNodesInGroup(String, int, Template) generates
the parameters passed into this method such that each node in the set has
a unique name. |
Set<Long> |
deleteIPForwardingRulesForVMAndReturnDistinctIPs(long virtualMachineId) |
void |
destroyNode(String id) |
void |
destroyVirtualMachine(long virtualMachineId) |
void |
disableStaticNATOnIPAddresses(Set<Long> ipAddresses) |
void |
disassociateIPAddresses(Set<Long> ipAddresses) |
VirtualMachine |
getNode(String id) |
Iterable<ServiceOffering> |
listHardwareProfiles()
Hardware profiles describe available cpu, memory, and disk configurations
that can be used to run a node.
|
Iterable<Template> |
listImages()
Images are the available configured operating systems that someone can run
a node with.
|
Iterable<Zone> |
listLocations() |
Iterable<VirtualMachine> |
listNodes() |
void |
rebootNode(String id) |
void |
resumeNode(String id) |
void |
suspendNode(String id) |
@Inject public CloudStackComputeServiceAdapter(CloudStackClient client, com.google.common.base.Predicate<Long> jobComplete, com.google.common.base.Supplier<Map<Long,Network>> networkSupplier, BlockUntilJobCompletesAndReturnResult blockUntilJobCompletesAndReturnResult, StaticNATVirtualMachineInNetwork.Factory staticNATVMInNetwork, CreatePortForwardingRulesForIP setupPortForwardingRulesForIP, com.google.common.cache.LoadingCache<Long,Set<IPForwardingRule>> vmToRules, Map<String,Credentials> credentialStore, Map<NetworkType,? extends OptionsConverter> optionsConverters, com.google.common.base.Supplier<com.google.common.cache.LoadingCache<Long,Zone>> zoneIdToZone)
public ComputeServiceAdapter.NodeAndInitialCredentials<VirtualMachine> createNodeWithGroupEncodedIntoName(String group, String name, Template template)
ComputeServiceAdapterComputeService.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.
credentialStorecreateNodeWithGroupEncodedIntoName in interface ComputeServiceAdapter<VirtualMachine,ServiceOffering,Template,Zone>group - used to aggregate nodes with identical configurationname - unique supplied name for the node, which has the tag encoded
into it.template - includes imageId, locationId, and
hardwareId used to resume the instance.ComputeService.createNodesInGroup(String, int, Template)public Iterable<ServiceOffering> listHardwareProfiles()
ComputeServiceAdapterlistHardwareProfiles in interface ComputeServiceAdapter<VirtualMachine,ServiceOffering,Template,Zone>ComputeService.listHardwareProfiles()public Iterable<Template> listImages()
ComputeServiceAdapterlistImages in interface ComputeServiceAdapter<VirtualMachine,ServiceOffering,Template,Zone>ComputeService.listImages()public Iterable<VirtualMachine> listNodes()
listNodes 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(long virtualMachineId)
public Set<Long> deleteIPForwardingRulesForVMAndReturnDistinctIPs(long virtualMachineId)
public void awaitCompletion(long 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-2012 jclouds. All Rights Reserved.