org.apache.whirr.karaf.command.support
Class WhirrCommandSupport

java.lang.Object
  extended by org.apache.karaf.shell.console.AbstractAction
      extended by org.apache.karaf.shell.console.OsgiCommandSupport
          extended by org.apache.whirr.karaf.command.support.WhirrCommandSupport
All Implemented Interfaces:
org.apache.felix.gogo.commands.Action, org.apache.karaf.shell.console.BundleContextAware
Direct Known Subclasses:
DestroyCluster, DestroyInstance, LaunchCluster, ListCluster, RunScript

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


Field Summary
protected  ClusterControllerFactory clusterControllerFactory
           
protected  String clusterName
           
protected  List<org.jclouds.compute.ComputeService> computeServices
           
protected  org.osgi.service.cm.ConfigurationAdmin configurationAdmin
           
protected  String endpoint
           
protected  String fileName
           
protected  String hardwareId
           
protected  String imageId
           
protected  String locationId
           
protected  String pid
           
protected  String privateKey
           
protected  String provider
           
protected  String templates
           
 
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
WhirrCommandSupport()
           
 
Method Summary
 ClusterControllerFactory getClusterControllerFactory()
           
protected  ClusterSpec getClusterSpec()
          Returns the ClusterSpec
 org.jclouds.compute.ComputeService getComputeService(String provider)
           
protected  org.apache.commons.configuration.PropertiesConfiguration getConfiguration(String pid, String fileName)
          Retrieves the configuration from a pid or a file.
 org.osgi.service.cm.ConfigurationAdmin getConfigurationAdmin()
           
protected  List<InstanceTemplate> getTemplate(String templates, String imageId, String hardwareId)
           
protected  InstanceTemplate.Builder getTemplateBuilder(String imageId, String hardwareId)
           
 void setClusterControllerFactory(ClusterControllerFactory clusterControllerFactory)
           
 void setComputeServices(List<org.jclouds.compute.ComputeService> computeServices)
           
 void setConfigurationAdmin(org.osgi.service.cm.ConfigurationAdmin configurationAdmin)
           
 void validateInput()
           
 
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

fileName

protected String fileName

pid

protected String pid

provider

protected String provider

endpoint

protected String endpoint

templates

protected String templates

imageId

protected String imageId

locationId

protected String locationId

hardwareId

protected String hardwareId

clusterName

protected String clusterName

privateKey

protected String privateKey

clusterControllerFactory

protected ClusterControllerFactory clusterControllerFactory

configurationAdmin

protected org.osgi.service.cm.ConfigurationAdmin configurationAdmin

computeServices

protected List<org.jclouds.compute.ComputeService> computeServices
Constructor Detail

WhirrCommandSupport

public WhirrCommandSupport()
Method Detail

validateInput

public void validateInput()
                   throws Exception
Throws:
Exception

getComputeService

public org.jclouds.compute.ComputeService getComputeService(String provider)

getClusterSpec

protected ClusterSpec getClusterSpec()
                              throws Exception
Returns the ClusterSpec

Returns:
Throws:
Exception

getTemplateBuilder

protected InstanceTemplate.Builder getTemplateBuilder(String imageId,
                                                      String hardwareId)

getTemplate

protected List<InstanceTemplate> getTemplate(String templates,
                                             String imageId,
                                             String hardwareId)

getConfiguration

protected org.apache.commons.configuration.PropertiesConfiguration getConfiguration(String pid,
                                                                                    String fileName)
Retrieves the configuration from a pid or a file.

Parameters:
pid -
fileName -
Returns:

getClusterControllerFactory

public ClusterControllerFactory getClusterControllerFactory()

setClusterControllerFactory

public void setClusterControllerFactory(ClusterControllerFactory clusterControllerFactory)

getConfigurationAdmin

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

setConfigurationAdmin

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

setComputeServices

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


Copyright © 2010-2012 The Apache Software Foundation. All Rights Reserved.