jtriley/StarCluster — Issue #73: command plugins
Author: dmachi
Created: 2012-02-05 20:45:01+00:00
State: open

Allow commands to be defined in plugins. A simple approach leveraging the current command line system might be to modify the runplugin command to look like this:

starcluster runplugin {plugin} [arguments]

Note that this specifically leaves the cluster id out of the defined runplugin method, allowing plugins to potentially run independently of any cluster (or on multiple clusters). The easier step for now is probably:

starcluster runplugin {plugin} {cluster} {arguments}

In either case the 'arguments' should be provided to a common named function in the plugin glass (eg, execute_command()). If multiple methods are to be available for a plugin, the execute_command() method should be responsible for splitting the desired method off of the argument list and delegating the work to the appropriate method internally. Additionally, a common named function for getting the 'help' should be available on plugin classes which command execution so that the behavior matches that of the existing plugin classes. It could be 'required' to have the help method in addition to the execute_command method to encourage plugin developers to include this method.