public class NovaComputeServiceAdapter extends Object implements ComputeServiceAdapter<ServerInRegion,FlavorInRegion,ImageInRegion,Location>
ComputeServiceAdapter.NodeAndInitialCredentials<N>
Modifier and Type | Field and Description |
---|---|
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.base.Predicate<RegionAndId> serverRunningPredicate,
com.google.common.base.Predicate<RegionAndId> serverTerminatedPredicate,
CleanupResources cleanupResources) |
@Named(value="jclouds.compute") protected Logger logger
protected final NovaApi novaApi
protected final RemoveFloatingIpFromNodeAndDeallocate removeFloatingIpFromNodeAndDeallocate
@Inject public NovaComputeServiceAdapter(NovaApi novaApi, com.google.common.base.Supplier<Set<String>> regionIds, RemoveFloatingIpFromNodeAndDeallocate removeFloatingIpFromNodeAndDeallocate, @Named(value="jclouds.compute.timeout.node-running") com.google.common.base.Predicate<RegionAndId> serverRunningPredicate, @Named(value="jclouds.compute.timeout.node-terminated") com.google.common.base.Predicate<RegionAndId> serverTerminatedPredicate, CleanupResources cleanupResources)
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()
ComputeServiceAdapter
listHardwareProfiles
in interface ComputeServiceAdapter<ServerInRegion,FlavorInRegion,ImageInRegion,Location>
ComputeService.listHardwareProfiles()
public Iterable<ImageInRegion> listImages()
ComputeServiceAdapter
listImages
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)
ComputeServiceAdapter
getImage
in interface ComputeServiceAdapter<ServerInRegion,FlavorInRegion,ImageInRegion,Location>
id
- Image#getId
, which is not necessarily Image#getProviderId
public 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-2018 The Apache Software Foundation. All Rights Reserved.