org.jclouds.karaf.commands.compute
Class ComputeCommandSupport

java.lang.Object
  extended by org.apache.karaf.shell.console.AbstractAction
      extended by org.apache.karaf.shell.console.OsgiCommandSupport
          extended by org.jclouds.karaf.commands.compute.ComputeCommandSupport
All Implemented Interfaces:
org.apache.felix.gogo.commands.Action, org.apache.karaf.shell.console.BundleContextAware
Direct Known Subclasses:
ComputeListCommand, GroupDestroyCommand, HardwareListCommand, ImageListCommand, LocationListCommand, NodeCreateCommand, NodeDestroyAllCommand, NodeDestroyCommand, NodeListCommand, NodeResumeCommand, NodeRunScriptSupport, NodeSuspendCommand, ProviderInfoCommand

public abstract class ComputeCommandSupport
extends org.apache.karaf.shell.console.OsgiCommandSupport

Author:
Guillaume Nodet (gnodet)

Field Summary
static java.lang.String HARDWAREFORMAT
           
static java.lang.String IMAGEFORMAT
           
static java.lang.String LOCATIONFORMAT
           
static java.lang.String NODEFORMAT
           
protected  java.lang.String provider
           
static java.lang.String PROVIDERFORMAT
           
 
Fields inherited from class org.apache.karaf.shell.console.OsgiCommandSupport
bundleContext, usedReferences
 
Fields inherited from class org.apache.karaf.shell.console.AbstractAction
log, session
 
Constructor Summary
ComputeCommandSupport()
           
 
Method Summary
protected  java.util.Set<? extends org.jclouds.domain.Location> getAllLocations(org.jclouds.compute.ComputeService computeService)
           
 CacheProvider getCacheProvider()
           
protected  org.jclouds.compute.ComputeService getComputeService()
           
protected  java.util.List<org.jclouds.compute.ComputeService> getComputeServices()
           
 org.osgi.service.cm.ConfigurationAdmin getConfigurationAdmin()
           
protected  double getCpuCores(org.jclouds.compute.domain.Hardware hardware)
           
protected  double getCpuUnits(org.jclouds.compute.domain.Hardware hardware)
           
protected  double getMemory(org.jclouds.compute.domain.Hardware hardware)
           
protected  void printComputeProviders(java.util.List<org.jclouds.compute.ComputeService> computeServices, java.lang.String indent, java.io.PrintStream out)
           
protected  void printHardwares(java.util.Set<? extends org.jclouds.compute.domain.Hardware> hardwares, java.lang.String indent, java.io.PrintStream out)
           
protected  void printImages(java.util.Set<? extends org.jclouds.compute.domain.Image> images, java.lang.String indent, java.io.PrintStream out)
           
protected  void printLocations(org.jclouds.compute.ComputeService computeService, java.lang.String indent, java.io.PrintStream out)
           
protected  void printLocations(java.util.Set<? extends org.jclouds.domain.Location> locations, org.jclouds.domain.Location parent, java.lang.String indent, java.io.PrintStream out)
           
protected  void printNodes(java.util.Set<? extends org.jclouds.compute.domain.ComputeMetadata> nodes, java.lang.String indent, java.io.PrintStream out)
           
 void setCacheProvider(CacheProvider cacheProvider)
           
 void setComputeServices(java.util.List<org.jclouds.compute.ComputeService> computeServices)
           
 void setConfigurationAdmin(org.osgi.service.cm.ConfigurationAdmin configurationAdmin)
           
 
Methods inherited from class org.apache.karaf.shell.console.OsgiCommandSupport
execute, getAllServices, getBundleContext, getService, setBundleContext, ungetServices
 
Methods inherited from class org.apache.karaf.shell.console.AbstractAction
doExecute
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NODEFORMAT

public static final java.lang.String NODEFORMAT
See Also:
Constant Field Values

HARDWAREFORMAT

public static final java.lang.String HARDWAREFORMAT
See Also:
Constant Field Values

IMAGEFORMAT

public static final java.lang.String IMAGEFORMAT
See Also:
Constant Field Values

LOCATIONFORMAT

public static final java.lang.String LOCATIONFORMAT
See Also:
Constant Field Values

PROVIDERFORMAT

public static final java.lang.String PROVIDERFORMAT
See Also:
Constant Field Values

provider

protected java.lang.String provider
Constructor Detail

ComputeCommandSupport

public ComputeCommandSupport()
Method Detail

printComputeProviders

protected void printComputeProviders(java.util.List<org.jclouds.compute.ComputeService> computeServices,
                                     java.lang.String indent,
                                     java.io.PrintStream out)

printNodes

protected void printNodes(java.util.Set<? extends org.jclouds.compute.domain.ComputeMetadata> nodes,
                          java.lang.String indent,
                          java.io.PrintStream out)

printHardwares

protected void printHardwares(java.util.Set<? extends org.jclouds.compute.domain.Hardware> hardwares,
                              java.lang.String indent,
                              java.io.PrintStream out)

printImages

protected void printImages(java.util.Set<? extends org.jclouds.compute.domain.Image> images,
                           java.lang.String indent,
                           java.io.PrintStream out)

printLocations

protected void printLocations(org.jclouds.compute.ComputeService computeService,
                              java.lang.String indent,
                              java.io.PrintStream out)

printLocations

protected void printLocations(java.util.Set<? extends org.jclouds.domain.Location> locations,
                              org.jclouds.domain.Location parent,
                              java.lang.String indent,
                              java.io.PrintStream out)

getAllLocations

protected java.util.Set<? extends org.jclouds.domain.Location> getAllLocations(org.jclouds.compute.ComputeService computeService)

getMemory

protected double getMemory(org.jclouds.compute.domain.Hardware hardware)

getCpuCores

protected double getCpuCores(org.jclouds.compute.domain.Hardware hardware)

getCpuUnits

protected double getCpuUnits(org.jclouds.compute.domain.Hardware hardware)

getConfigurationAdmin

public org.osgi.service.cm.ConfigurationAdmin getConfigurationAdmin()

setConfigurationAdmin

public void setConfigurationAdmin(org.osgi.service.cm.ConfigurationAdmin configurationAdmin)

setComputeServices

public void setComputeServices(java.util.List<org.jclouds.compute.ComputeService> computeServices)

getComputeServices

protected java.util.List<org.jclouds.compute.ComputeService> getComputeServices()

getComputeService

protected org.jclouds.compute.ComputeService getComputeService()

getCacheProvider

public CacheProvider getCacheProvider()

setCacheProvider

public void setCacheProvider(CacheProvider cacheProvider)


Copyright © 2012. All Rights Reserved.