@Singleton public class CloudSigma2ComputeServiceAdapter extends Object implements ComputeServiceAdapter<ServerInfo,Hardware,LibraryDrive,Location>
ComputeServiceAdapter.NodeAndInitialCredentials<N>
Constructor and Description |
---|
CloudSigma2ComputeServiceAdapter(CloudSigma2Api api,
com.google.common.util.concurrent.ListeningExecutorService userExecutor,
String defaultVncPassword,
com.google.common.base.Predicate<DriveInfo> driveCloned,
com.google.common.base.Predicate<String> serverStopped,
boolean destroyDrives,
GroupNamingConvention.Factory groupNamingConvention) |
Modifier and Type | Method and Description |
---|---|
ComputeServiceAdapter.NodeAndInitialCredentials<ServerInfo> |
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. |
void |
destroyNode(String uuid) |
LibraryDrive |
getImage(String uuid)
get a specific image by id
|
ServerInfo |
getNode(String uuid) |
Iterable<Hardware> |
listHardwareProfiles()
Hardware profiles describe available cpu, memory, and disk configurations that can be used to
run a node.
|
Iterable<LibraryDrive> |
listImages()
Images are the available configured operating systems that someone can run a node with.
|
Iterable<Location> |
listLocations() |
Iterable<ServerInfo> |
listNodes() |
Iterable<ServerInfo> |
listNodesByIds(Iterable<String> uuids) |
void |
rebootNode(String uuid) |
void |
resumeNode(String uuid) |
void |
suspendNode(String uuid) |
@Named(value="jclouds.compute") protected Logger logger
@Inject public CloudSigma2ComputeServiceAdapter(CloudSigma2Api api, @Named(value="jclouds.user-threads") com.google.common.util.concurrent.ListeningExecutorService userExecutor, @Named(value="jclouds.cloudsigma.vnc-password") String defaultVncPassword, @Named(value="jclouds.cloudsigma.timeout.drive-cloned") com.google.common.base.Predicate<DriveInfo> driveCloned, @Named(value="jclouds.compute.timeout.node-suspended") com.google.common.base.Predicate<String> serverStopped, @Named(value="jclouds.cloudsigma.delete-drives") boolean destroyDrives, GroupNamingConvention.Factory groupNamingConvention)
public ComputeServiceAdapter.NodeAndInitialCredentials<ServerInfo> 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<ServerInfo,Hardware,LibraryDrive,Location>
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<Hardware> listHardwareProfiles()
ComputeServiceAdapter
listHardwareProfiles
in interface ComputeServiceAdapter<ServerInfo,Hardware,LibraryDrive,Location>
ComputeService.listHardwareProfiles()
public Iterable<LibraryDrive> listImages()
ComputeServiceAdapter
listImages
in interface ComputeServiceAdapter<ServerInfo,Hardware,LibraryDrive,Location>
ComputeService.listImages()
public LibraryDrive getImage(String uuid)
ComputeServiceAdapter
getImage
in interface ComputeServiceAdapter<ServerInfo,Hardware,LibraryDrive,Location>
uuid
- Image#getId
, which is not necessarily Image#getProviderId
public Iterable<Location> listLocations()
listLocations
in interface ComputeServiceAdapter<ServerInfo,Hardware,LibraryDrive,Location>
public ServerInfo getNode(String uuid)
getNode
in interface ComputeServiceAdapter<ServerInfo,Hardware,LibraryDrive,Location>
public void destroyNode(String uuid)
destroyNode
in interface ComputeServiceAdapter<ServerInfo,Hardware,LibraryDrive,Location>
public void rebootNode(String uuid)
rebootNode
in interface ComputeServiceAdapter<ServerInfo,Hardware,LibraryDrive,Location>
public void resumeNode(String uuid)
resumeNode
in interface ComputeServiceAdapter<ServerInfo,Hardware,LibraryDrive,Location>
public void suspendNode(String uuid)
suspendNode
in interface ComputeServiceAdapter<ServerInfo,Hardware,LibraryDrive,Location>
public Iterable<ServerInfo> listNodes()
listNodes
in interface ComputeServiceAdapter<ServerInfo,Hardware,LibraryDrive,Location>
public Iterable<ServerInfo> listNodesByIds(Iterable<String> uuids)
listNodesByIds
in interface ComputeServiceAdapter<ServerInfo,Hardware,LibraryDrive,Location>
Copyright © 2009-2018 The Apache Software Foundation. All Rights Reserved.