org.jclouds.karaf.commands.compute
Class ComputeCommandSupport
java.lang.Object
org.apache.karaf.shell.console.AbstractAction
org.jclouds.karaf.commands.compute.ComputeCommandSupport
- All Implemented Interfaces:
- org.apache.felix.gogo.commands.Action
- Direct Known Subclasses:
- ComputeListCommand, ComputeServiceCommand, GroupDestroyCommand, HardwareListCommand, ImageCreateCommand, ImageListCommand, LocationListCommand, NodeCreateCommand, NodeDestroyAllCommand, NodeDestroyCommand, NodeInfoCommand, NodeListCommand, NodeResumeCommand, NodeRunScriptSupport, NodeSuspendCommand, ProviderInfoCommand
public abstract class ComputeCommandSupport
- extends org.apache.karaf.shell.console.AbstractAction
- Author:
- Guillaume Nodet (gnodet)
| Fields inherited from class org.apache.karaf.shell.console.AbstractAction |
log, session |
|
Method Summary |
Object |
execute(org.apache.felix.service.command.CommandSession session)
|
protected Set<? extends org.jclouds.domain.Location> |
getAllLocations(org.jclouds.compute.ComputeService computeService)
|
CacheProvider |
getCacheProvider()
|
protected org.jclouds.compute.ComputeService |
getComputeService()
|
protected List<org.jclouds.compute.ComputeService> |
getComputeServices()
|
org.osgi.service.cm.ConfigurationAdmin |
getConfigAdmin()
|
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 String |
getOperatingSystemDetails(org.jclouds.compute.domain.NodeMetadata node)
Returns a String that displays the OperatingSystem details. |
protected String |
getPrivateAddresses(org.jclouds.compute.domain.NodeMetadata node)
Returns a comma separated list of the private addresses. |
protected String |
getPublicAddresses(org.jclouds.compute.domain.NodeMetadata node)
Returns a comma separated list of the public addresses. |
protected void |
printComputeApis(Map<String,org.jclouds.apis.ApiMetadata> apis,
List<org.jclouds.compute.ComputeService> computeServices,
String indent,
PrintStream out)
|
protected void |
printComputeProviders(Map<String,org.jclouds.providers.ProviderMetadata> providers,
List<org.jclouds.compute.ComputeService> computeServices,
String indent,
PrintStream out)
|
protected void |
printHardwares(Set<? extends org.jclouds.compute.domain.Hardware> hardwares,
String indent,
PrintStream out)
|
protected void |
printImages(Set<? extends org.jclouds.compute.domain.Image> images,
String indent,
PrintStream out)
|
protected void |
printLocations(org.jclouds.compute.ComputeService computeService,
String indent,
PrintStream out)
|
protected void |
printLocations(Set<? extends org.jclouds.domain.Location> locations,
org.jclouds.domain.Location parent,
String indent,
PrintStream out)
|
protected void |
printNodeInfo(Set<? extends org.jclouds.compute.domain.NodeMetadata> nodes,
boolean details,
PrintStream out)
|
protected void |
printNodes(Set<? extends org.jclouds.compute.domain.ComputeMetadata> nodes,
String indent,
PrintStream out)
|
void |
setCacheProvider(CacheProvider cacheProvider)
|
void |
setComputeServices(List<org.jclouds.compute.ComputeService> computeServices)
|
void |
setConfigAdmin(org.osgi.service.cm.ConfigurationAdmin configurationAdmin)
|
| 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 |
NODEFORMAT
public static final String NODEFORMAT
- See Also:
- Constant Field Values
HARDWAREFORMAT
public static final String HARDWAREFORMAT
- See Also:
- Constant Field Values
IMAGEFORMAT
public static final String IMAGEFORMAT
- See Also:
- Constant Field Values
LOCATIONFORMAT
public static final String LOCATIONFORMAT
- See Also:
- Constant Field Values
PROVIDERFORMAT
public static final String PROVIDERFORMAT
- See Also:
- Constant Field Values
cacheProvider
protected CacheProvider cacheProvider
provider
protected String provider
api
protected String api
identity
protected String identity
credential
protected String credential
endpoint
protected String endpoint
ComputeCommandSupport
public ComputeCommandSupport()
execute
public Object execute(org.apache.felix.service.command.CommandSession session)
throws Exception
- Specified by:
execute in interface org.apache.felix.gogo.commands.Action- Overrides:
execute in class org.apache.karaf.shell.console.AbstractAction
- Throws:
Exception
printComputeProviders
protected void printComputeProviders(Map<String,org.jclouds.providers.ProviderMetadata> providers,
List<org.jclouds.compute.ComputeService> computeServices,
String indent,
PrintStream out)
printComputeApis
protected void printComputeApis(Map<String,org.jclouds.apis.ApiMetadata> apis,
List<org.jclouds.compute.ComputeService> computeServices,
String indent,
PrintStream out)
printNodes
protected void printNodes(Set<? extends org.jclouds.compute.domain.ComputeMetadata> nodes,
String indent,
PrintStream out)
printHardwares
protected void printHardwares(Set<? extends org.jclouds.compute.domain.Hardware> hardwares,
String indent,
PrintStream out)
printImages
protected void printImages(Set<? extends org.jclouds.compute.domain.Image> images,
String indent,
PrintStream out)
printLocations
protected void printLocations(org.jclouds.compute.ComputeService computeService,
String indent,
PrintStream out)
printLocations
protected void printLocations(Set<? extends org.jclouds.domain.Location> locations,
org.jclouds.domain.Location parent,
String indent,
PrintStream out)
getAllLocations
protected Set<? extends org.jclouds.domain.Location> getAllLocations(org.jclouds.compute.ComputeService computeService)
getOperatingSystemDetails
protected String getOperatingSystemDetails(org.jclouds.compute.domain.NodeMetadata node)
- Returns a String that displays the
OperatingSystem details.
- Parameters:
node -
- Returns:
getPublicAddresses
protected String getPublicAddresses(org.jclouds.compute.domain.NodeMetadata node)
- Returns a comma separated list of the public addresses.
- Parameters:
node -
- Returns:
getPrivateAddresses
protected String getPrivateAddresses(org.jclouds.compute.domain.NodeMetadata node)
- Returns a comma separated list of the private addresses.
- Parameters:
node -
- Returns:
printNodeInfo
protected void printNodeInfo(Set<? extends org.jclouds.compute.domain.NodeMetadata> nodes,
boolean details,
PrintStream out)
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)
getConfigAdmin
public org.osgi.service.cm.ConfigurationAdmin getConfigAdmin()
setConfigAdmin
public void setConfigAdmin(org.osgi.service.cm.ConfigurationAdmin configurationAdmin)
setComputeServices
public void setComputeServices(List<org.jclouds.compute.ComputeService> computeServices)
getComputeServices
protected 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.