public abstract class ComputeCommandBase
extends org.apache.karaf.shell.console.AbstractAction
| Modifier and Type | Field and Description |
|---|---|
protected CacheProvider |
cacheProvider |
protected List<org.jclouds.compute.ComputeService> |
computeServices |
protected org.osgi.service.cm.ConfigurationAdmin |
configAdmin |
static String |
FACTORY_FILTER |
static String |
NODE_DETAILS_FORMAT |
static String |
PROVIDERFORMAT |
protected ShellTableFactory |
shellTableFactory |
| Constructor and Description |
|---|
ComputeCommandBase() |
| Modifier and Type | Method and Description |
|---|---|
Object |
execute(org.apache.felix.service.command.CommandSession session) |
protected org.osgi.service.cm.Configuration |
findOrCreateFactoryConfiguration(org.osgi.service.cm.ConfigurationAdmin configurationAdmin,
String factoryPid,
String id,
String provider,
String api)
Finds a
Configuration if exists, or creates a new one. |
protected Set<? extends org.jclouds.domain.Location> |
getAllLocations(org.jclouds.compute.ComputeService computeService) |
CacheProvider |
getCacheProvider() |
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.
|
ShellTableFactory |
getShellTableFactory() |
protected void |
printComputeApis(Iterable<org.jclouds.apis.ApiMetadata> apis,
List<org.jclouds.compute.ComputeService> computeServices,
String indent,
PrintStream out) |
protected void |
printComputeProviders(Iterable<org.jclouds.providers.ProviderMetadata> providers,
List<org.jclouds.compute.ComputeService> computeServices,
String indent,
PrintStream out) |
protected void |
printHardwares(org.jclouds.compute.ComputeService service,
Set<? extends org.jclouds.compute.domain.Hardware> hardwares,
PrintStream out) |
protected void |
printImages(org.jclouds.compute.ComputeService service,
Set<? extends org.jclouds.compute.domain.Image> images,
PrintStream out) |
protected void |
printLocations(org.jclouds.compute.ComputeService computeService,
PrintStream out) |
protected void |
printNodeInfo(org.jclouds.compute.ComputeService service,
Set<? extends org.jclouds.compute.domain.NodeMetadata> nodes,
boolean details,
PrintStream out) |
protected void |
printNodes(org.jclouds.compute.ComputeService service,
Set<? extends org.jclouds.compute.domain.ComputeMetadata> nodes,
PrintStream out) |
void |
setCacheProvider(CacheProvider cacheProvider) |
void |
setComputeServices(List<org.jclouds.compute.ComputeService> computeServices) |
void |
setConfigAdmin(org.osgi.service.cm.ConfigurationAdmin configAdmin) |
void |
setShellTableFactory(ShellTableFactory shellTableFactory) |
public static final String NODE_DETAILS_FORMAT
public static final String PROVIDERFORMAT
public static final String FACTORY_FILTER
protected org.osgi.service.cm.ConfigurationAdmin configAdmin
protected CacheProvider cacheProvider
protected List<org.jclouds.compute.ComputeService> computeServices
protected ShellTableFactory shellTableFactory
public Object execute(org.apache.felix.service.command.CommandSession session) throws Exception
execute in interface org.apache.felix.gogo.commands.Actionexecute in class org.apache.karaf.shell.console.AbstractActionExceptionprotected void printComputeProviders(Iterable<org.jclouds.providers.ProviderMetadata> providers, List<org.jclouds.compute.ComputeService> computeServices, String indent, PrintStream out)
protected void printComputeApis(Iterable<org.jclouds.apis.ApiMetadata> apis, List<org.jclouds.compute.ComputeService> computeServices, String indent, PrintStream out)
protected void printNodes(org.jclouds.compute.ComputeService service,
Set<? extends org.jclouds.compute.domain.ComputeMetadata> nodes,
PrintStream out)
protected void printHardwares(org.jclouds.compute.ComputeService service,
Set<? extends org.jclouds.compute.domain.Hardware> hardwares,
PrintStream out)
protected void printImages(org.jclouds.compute.ComputeService service,
Set<? extends org.jclouds.compute.domain.Image> images,
PrintStream out)
protected void printLocations(org.jclouds.compute.ComputeService computeService,
PrintStream out)
protected Set<? extends org.jclouds.domain.Location> getAllLocations(org.jclouds.compute.ComputeService computeService)
protected String getOperatingSystemDetails(org.jclouds.compute.domain.NodeMetadata node)
OperatingSystem details.node - protected String getPublicAddresses(org.jclouds.compute.domain.NodeMetadata node)
node - protected String getPrivateAddresses(org.jclouds.compute.domain.NodeMetadata node)
node - protected void printNodeInfo(org.jclouds.compute.ComputeService service,
Set<? extends org.jclouds.compute.domain.NodeMetadata> nodes,
boolean details,
PrintStream out)
protected org.osgi.service.cm.Configuration findOrCreateFactoryConfiguration(org.osgi.service.cm.ConfigurationAdmin configurationAdmin,
String factoryPid,
String id,
String provider,
String api)
throws IOException
Configuration if exists, or creates a new one.configurationAdmin - factoryPid - provider - api - IOExceptionprotected double getMemory(org.jclouds.compute.domain.Hardware hardware)
protected double getCpuCores(org.jclouds.compute.domain.Hardware hardware)
protected double getCpuUnits(org.jclouds.compute.domain.Hardware hardware)
public org.osgi.service.cm.ConfigurationAdmin getConfigAdmin()
public void setConfigAdmin(org.osgi.service.cm.ConfigurationAdmin configAdmin)
public CacheProvider getCacheProvider()
public void setCacheProvider(CacheProvider cacheProvider)
public List<org.jclouds.compute.ComputeService> getComputeServices()
public void setComputeServices(List<org.jclouds.compute.ComputeService> computeServices)
public ShellTableFactory getShellTableFactory()
public void setShellTableFactory(ShellTableFactory shellTableFactory)
Copyright © 2012. All Rights Reserved.