org.jclouds.openstack.nova.v2_0.compute
Class NovaComputeServiceAdapter

java.lang.Object
  extended by org.jclouds.openstack.nova.v2_0.compute.NovaComputeServiceAdapter
All Implemented Interfaces:
org.jclouds.compute.ComputeServiceAdapter<ServerInZone,FlavorInZone,ImageInZone,org.jclouds.domain.Location>

public class NovaComputeServiceAdapter
extends Object
implements org.jclouds.compute.ComputeServiceAdapter<ServerInZone,FlavorInZone,ImageInZone,org.jclouds.domain.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
org.jclouds.compute.ComputeServiceAdapter.NodeAndInitialCredentials<N>
 
Field Summary
protected  com.google.common.cache.LoadingCache<ZoneAndName,KeyPair> keyPairCache
           
protected  org.jclouds.logging.Logger logger
           
protected  NovaApi novaApi
           
protected  RemoveFloatingIpFromNodeAndDeallocate removeFloatingIpFromNodeAndDeallocate
           
protected  com.google.common.base.Supplier<Set<String>> zoneIds
           
 
Constructor Summary
NovaComputeServiceAdapter(NovaApi novaApi, com.google.common.base.Supplier<Set<String>> zoneIds, RemoveFloatingIpFromNodeAndDeallocate removeFloatingIpFromNodeAndDeallocate, com.google.common.cache.LoadingCache<ZoneAndName,KeyPair> keyPairCache)
           
 
Method Summary
 org.jclouds.compute.ComputeServiceAdapter.NodeAndInitialCredentials<ServerInZone> createNodeWithGroupEncodedIntoName(String group, String name, org.jclouds.compute.domain.Template template)
          Note that we do not validate extensions here, on basis that ApplyNovaTemplateOptionsCreateNodesWithGroupEncodedIntoNameThenAddToSet has already done so.
 void destroyNode(String id)
           
 ImageInZone getImage(String id)
           
 ServerInZone getNode(String id)
           
 Iterable<FlavorInZone> listHardwareProfiles()
           
 Iterable<ImageInZone> listImages()
           
 Iterable<org.jclouds.domain.Location> listLocations()
           
 Iterable<ServerInZone> listNodes()
           
 Iterable<ServerInZone> listNodesByIds(Iterable<String> ids)
           
 void rebootNode(String id)
           
 void resumeNode(String id)
           
 void suspendNode(String id)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

@Named(value="jclouds.compute")
protected org.jclouds.logging.Logger logger

novaApi

protected final NovaApi novaApi

zoneIds

protected final com.google.common.base.Supplier<Set<String>> zoneIds

removeFloatingIpFromNodeAndDeallocate

protected final RemoveFloatingIpFromNodeAndDeallocate removeFloatingIpFromNodeAndDeallocate

keyPairCache

protected final com.google.common.cache.LoadingCache<ZoneAndName,KeyPair> keyPairCache
Constructor Detail

NovaComputeServiceAdapter

@Inject
public NovaComputeServiceAdapter(NovaApi novaApi,
                                        com.google.common.base.Supplier<Set<String>> zoneIds,
                                        RemoveFloatingIpFromNodeAndDeallocate removeFloatingIpFromNodeAndDeallocate,
                                        com.google.common.cache.LoadingCache<ZoneAndName,KeyPair> keyPairCache)
Method Detail

createNodeWithGroupEncodedIntoName

public org.jclouds.compute.ComputeServiceAdapter.NodeAndInitialCredentials<ServerInZone> createNodeWithGroupEncodedIntoName(String group,
                                                                                                                            String name,
                                                                                                                            org.jclouds.compute.domain.Template template)
Note that we do not validate extensions here, on basis that ApplyNovaTemplateOptionsCreateNodesWithGroupEncodedIntoNameThenAddToSet has already done so.

Specified by:
createNodeWithGroupEncodedIntoName in interface org.jclouds.compute.ComputeServiceAdapter<ServerInZone,FlavorInZone,ImageInZone,org.jclouds.domain.Location>

listHardwareProfiles

public Iterable<FlavorInZone> listHardwareProfiles()
Specified by:
listHardwareProfiles in interface org.jclouds.compute.ComputeServiceAdapter<ServerInZone,FlavorInZone,ImageInZone,org.jclouds.domain.Location>

listImages

public Iterable<ImageInZone> listImages()
Specified by:
listImages in interface org.jclouds.compute.ComputeServiceAdapter<ServerInZone,FlavorInZone,ImageInZone,org.jclouds.domain.Location>

listNodes

public Iterable<ServerInZone> listNodes()
Specified by:
listNodes in interface org.jclouds.compute.ComputeServiceAdapter<ServerInZone,FlavorInZone,ImageInZone,org.jclouds.domain.Location>

listNodesByIds

public Iterable<ServerInZone> listNodesByIds(Iterable<String> ids)
Specified by:
listNodesByIds in interface org.jclouds.compute.ComputeServiceAdapter<ServerInZone,FlavorInZone,ImageInZone,org.jclouds.domain.Location>

listLocations

public Iterable<org.jclouds.domain.Location> listLocations()
Specified by:
listLocations in interface org.jclouds.compute.ComputeServiceAdapter<ServerInZone,FlavorInZone,ImageInZone,org.jclouds.domain.Location>

getNode

public ServerInZone getNode(String id)
Specified by:
getNode in interface org.jclouds.compute.ComputeServiceAdapter<ServerInZone,FlavorInZone,ImageInZone,org.jclouds.domain.Location>

getImage

public ImageInZone getImage(String id)
Specified by:
getImage in interface org.jclouds.compute.ComputeServiceAdapter<ServerInZone,FlavorInZone,ImageInZone,org.jclouds.domain.Location>

destroyNode

public void destroyNode(String id)
Specified by:
destroyNode in interface org.jclouds.compute.ComputeServiceAdapter<ServerInZone,FlavorInZone,ImageInZone,org.jclouds.domain.Location>

rebootNode

public void rebootNode(String id)
Specified by:
rebootNode in interface org.jclouds.compute.ComputeServiceAdapter<ServerInZone,FlavorInZone,ImageInZone,org.jclouds.domain.Location>

resumeNode

public void resumeNode(String id)
Specified by:
resumeNode in interface org.jclouds.compute.ComputeServiceAdapter<ServerInZone,FlavorInZone,ImageInZone,org.jclouds.domain.Location>

suspendNode

public void suspendNode(String id)
Specified by:
suspendNode in interface org.jclouds.compute.ComputeServiceAdapter<ServerInZone,FlavorInZone,ImageInZone,org.jclouds.domain.Location>


Copyright © 2009-2014 The Apache Software Foundation. All Rights Reserved.