Class NovaComputeServiceAdapter
java.lang.Object
org.jclouds.openstack.nova.v2_0.compute.NovaComputeServiceAdapter
- All Implemented Interfaces:
ComputeServiceAdapter<ServerInRegion,FlavorInRegion, ImageInRegion, Location>
public class NovaComputeServiceAdapter
extends Object
implements ComputeServiceAdapter<ServerInRegion,FlavorInRegion,ImageInRegion,Location>
The adapter used by the NovaComputeServiceContextModule to interface the nova-specific domain
model to the computeService generic domain model.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.jclouds.compute.ComputeServiceAdapter
ComputeServiceAdapter.NodeAndInitialCredentials<N> -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Loggerprotected final NovaApiprotected final RemoveFloatingIpFromNodeAndDeallocate -
Constructor Summary
ConstructorsConstructorDescriptionNovaComputeServiceAdapter(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) -
Method Summary
Modifier and TypeMethodDescriptioncreateNodeWithGroupEncodedIntoName(String group, String name, Template template) Note that we do not validate extensions here, on basis thatApplyNovaTemplateOptionsCreateNodesWithGroupEncodedIntoNameThenAddToSethas already done so.voiddestroyNode(String id) get a specific image by idHardware profiles describe available cpu, memory, and disk configurations that can be used to run a node.Images are the available configured operating systems that someone can run a node with.listNodesByIds(Iterable<String> ids) voidrebootNode(String id) voidresumeNode(String id) voidsuspendNode(String id)
-
Field Details
-
logger
-
novaApi
-
regionIds
-
removeFloatingIpFromNodeAndDeallocate
-
-
Constructor Details
-
NovaComputeServiceAdapter
@Inject public NovaComputeServiceAdapter(NovaApi novaApi, com.google.common.base.Supplier<Set<String>> regionIds, RemoveFloatingIpFromNodeAndDeallocate removeFloatingIpFromNodeAndDeallocate, @Named("jclouds.compute.timeout.node-running") com.google.common.base.Predicate<RegionAndId> serverRunningPredicate, @Named("jclouds.compute.timeout.node-terminated") com.google.common.base.Predicate<RegionAndId> serverTerminatedPredicate, CleanupResources cleanupResources)
-
-
Method Details
-
createNodeWithGroupEncodedIntoName
public ComputeServiceAdapter.NodeAndInitialCredentials<ServerInRegion> createNodeWithGroupEncodedIntoName(String group, String name, Template template) Note that we do not validate extensions here, on basis thatApplyNovaTemplateOptionsCreateNodesWithGroupEncodedIntoNameThenAddToSethas already done so.- Specified by:
createNodeWithGroupEncodedIntoNamein interfaceComputeServiceAdapter<ServerInRegion,FlavorInRegion, ImageInRegion, Location> - Parameters:
group- used to aggregate nodes with identical configurationname- unique supplied name for the node, which has the group encoded into it.template- includesimageId,locationId, andhardwareIdused to resume the instance.- Returns:
- library-native representation of a node. TODO: return typed exception on createNodeFailure
- See Also:
-
listHardwareProfiles
Description copied from interface:ComputeServiceAdapterHardware profiles describe available cpu, memory, and disk configurations that can be used to run a node. To implement this method, return the library native hardware profiles available to the user. These will be used to launch nodes as a part of the template.- Specified by:
listHardwareProfilesin interfaceComputeServiceAdapter<ServerInRegion,FlavorInRegion, ImageInRegion, Location> - Returns:
- a non-null iterable of available hardware profiles.
- See Also:
-
listImages
Description copied from interface:ComputeServiceAdapterImages are the available configured operating systems that someone can run a node with. To implement this method, return the library native images available to the user. These will be used to launch nodes as a part of the template.- Specified by:
listImagesin interfaceComputeServiceAdapter<ServerInRegion,FlavorInRegion, ImageInRegion, Location> - Returns:
- a non-null iterable of available images.
- See Also:
-
listNodes
- Specified by:
listNodesin interfaceComputeServiceAdapter<ServerInRegion,FlavorInRegion, ImageInRegion, Location>
-
listNodesByIds
- Specified by:
listNodesByIdsin interfaceComputeServiceAdapter<ServerInRegion,FlavorInRegion, ImageInRegion, Location>
-
listLocations
- Specified by:
listLocationsin interfaceComputeServiceAdapter<ServerInRegion,FlavorInRegion, ImageInRegion, Location>
-
getNode
- Specified by:
getNodein interfaceComputeServiceAdapter<ServerInRegion,FlavorInRegion, ImageInRegion, Location>
-
getImage
Description copied from interface:ComputeServiceAdapterget a specific image by id- Specified by:
getImagein interfaceComputeServiceAdapter<ServerInRegion,FlavorInRegion, ImageInRegion, Location> - Parameters:
id-, which is not necessarilyinvalid reference
Image#getIdinvalid reference
Image#getProviderId- Returns:
- image or null if not exists.
-
destroyNode
- Specified by:
destroyNodein interfaceComputeServiceAdapter<ServerInRegion,FlavorInRegion, ImageInRegion, Location>
-
rebootNode
- Specified by:
rebootNodein interfaceComputeServiceAdapter<ServerInRegion,FlavorInRegion, ImageInRegion, Location>
-
resumeNode
- Specified by:
resumeNodein interfaceComputeServiceAdapter<ServerInRegion,FlavorInRegion, ImageInRegion, Location>
-
suspendNode
- Specified by:
suspendNodein interfaceComputeServiceAdapter<ServerInRegion,FlavorInRegion, ImageInRegion, Location>
-