[chef] Knife plugin options


Chronological Thread 
  • From: Gregory Symons < >
  • To: < >
  • Subject: [chef] Knife plugin options
  • Date: Mon, 19 Mar 2012 10:38:35 -0500
  • Organization: DrillingInfo

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


  • [chef] Knife plugin options, Gregory Symons, 03/19/2012

Archive powered by MHonArc 2.6.16.

§