public class NovaComputeServiceAdapter extends Object implements ComputeServiceAdapter<ServerInRegion,FlavorInRegion,ImageInRegion,Location>
ComputeServiceAdapter.NodeAndInitialCredentials<N>| Modifier and Type | Field and Description |
|---|---|
protected CleanupServer |
cleanupServer |
protected com.google.common.cache.LoadingCache<RegionAndName,KeyPair> |
keyPairCache |
protected Logger |
logger |
protected NovaApi |
novaApi |
protected com.google.common.base.Supplier<Set<String>> |
regionIds |
protected RemoveFloatingIpFromNodeAndDeallocate |
removeFloatingIpFromNodeAndDeallocate |
| Constructor and Description |
|---|
NovaComputeServiceAdapter(NovaApi novaApi,
com.google.common.base.Supplier<Set<String>> regionIds,
RemoveFloatingIpFromNodeAndDeallocate removeFloatingIpFromNodeAndDeallocate,
com.google.common.cache.LoadingCache<RegionAndName,KeyPair> keyPairCache,
CleanupServer cleanupServer) |
| Modifier and Type | Method and Description |
|---|---|
ComputeServiceAdapter.NodeAndInitialCredentials<ServerInRegion> |
createNodeWithGroupEncodedIntoName(String group,
String name,
Template template)
Note that we do not validate extensions here, on basis that
ApplyNovaTemplateOptionsCreateNodesWithGroupEncodedIntoNameThenAddToSet has already
done so. |
void |
destroyNode(String id) |
ImageInRegion |
getImage(String id)
get a specific image by id
|
ServerInRegion |
getNode(String id) |
Iterable<FlavorInRegion> |
listHardwareProfiles()
Hardware profiles describe available cpu, memory, and disk configurations that can be used to
run a node.
|
Iterable<ImageInRegion> |
listImages()
Images are the available configured operating systems that someone can run a node with.
|
Iterable<Location> |
listLocations() |
Iterable<ServerInRegion> |
listNodes() |
Iterable<ServerInRegion> |
listNodesByIds(Iterable<String> ids) |
void |
rebootNode(String id) |
void |
resumeNode(String id) |
void |
suspendNode(String id) |
@Named(value="jclouds.compute") protected Logger logger
protected final NovaApi novaApi
protected final RemoveFloatingIpFromNodeAndDeallocate removeFloatingIpFromNodeAndDeallocate
protected final com.google.common.cache.LoadingCache<RegionAndName,KeyPair> keyPairCache
protected final CleanupServer cleanupServer
@Inject public NovaComputeServiceAdapter(NovaApi novaApi, com.google.common.base.Supplier<Set<String>> regionIds, RemoveFloatingIpFromNodeAndDeallocate removeFloatingIpFromNodeAndDeallocate, com.google.common.cache.LoadingCache<RegionAndName,KeyPair> keyPairCache, CleanupServer cleanupServer)
public ComputeServiceAdapter.NodeAndInitialCredentials<ServerInRegion> createNodeWithGroupEncodedIntoName(String group, String name, Template template)
ApplyNovaTemplateOptionsCreateNodesWithGroupEncodedIntoNameThenAddToSet has already
done so.createNodeWithGroupEncodedIntoName in interface ComputeServiceAdapter<ServerInRegion,FlavorInRegion,ImageInRegion,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<FlavorInRegion> listHardwareProfiles()
ComputeServiceAdapterlistHardwareProfiles in interface ComputeServiceAdapter<ServerInRegion,FlavorInRegion,ImageInRegion,Location>ComputeService.listHardwareProfiles()public Iterable<ImageInRegion> listImages()
ComputeServiceAdapterlistImages in interface ComputeServiceAdapter<ServerInRegion,FlavorInRegion,ImageInRegion,Location>ComputeService.listImages()public Iterable<ServerInRegion> listNodes()
listNodes in interface ComputeServiceAdapter<ServerInRegion,FlavorInRegion,ImageInRegion,Location>public Iterable<ServerInRegion> listNodesByIds(Iterable<String> ids)
listNodesByIds in interface ComputeServiceAdapter<ServerInRegion,FlavorInRegion,ImageInRegion,Location>public Iterable<Location> listLocations()
listLocations in interface ComputeServiceAdapter<ServerInRegion,FlavorInRegion,ImageInRegion,Location>public ServerInRegion getNode(String id)
getNode in interface ComputeServiceAdapter<ServerInRegion,FlavorInRegion,ImageInRegion,Location>public ImageInRegion getImage(String id)
ComputeServiceAdaptergetImage in interface ComputeServiceAdapter<ServerInRegion,FlavorInRegion,ImageInRegion,Location>id - Image#getId, which is not necessarily Image#getProviderIdpublic void destroyNode(String id)
destroyNode in interface ComputeServiceAdapter<ServerInRegion,FlavorInRegion,ImageInRegion,Location>public void rebootNode(String id)
rebootNode in interface ComputeServiceAdapter<ServerInRegion,FlavorInRegion,ImageInRegion,Location>public void resumeNode(String id)
resumeNode in interface ComputeServiceAdapter<ServerInRegion,FlavorInRegion,ImageInRegion,Location>public void suspendNode(String id)
suspendNode in interface ComputeServiceAdapter<ServerInRegion,FlavorInRegion,ImageInRegion,Location>Copyright © 2009-2016 The Apache Software Foundation. All Rights Reserved.