Knife plugin options


#1

Hi!

I’m trying to write a plugin that wraps the knife-ec2 plugin, and I want
my commands to have pretty much the same options–the only thing I’m
really changing is the workflow. Is there an easy way to merge my
options with the knife-ec2 options? I’ve tried the following:

module MyPlugin
class WrappedEc2ServerCreate < Chef::Knife
def self.options
Chef::knife::Ec2ServerCreate.options
end
end
end

But when I do that, I lose the global options. I’ve also tried
subclassing Chef::knife::Ec2ServerCreate, but that doesn’t quite give me
the control I need, so I’d rather do things with composition.

Thanks for your help.


Greg Symons
Developer
DrillingInfo