[chef] Custom LWRP Initialise Error


Chronological Thread 
  • From: " " < >
  • To: " " < >
  • Subject: [chef] Custom LWRP Initialise Error
  • Date: Thu, 24 Jul 2014 11:10:16 +0000
  • Accept-language: en-GB, en-US

Morning Guys

 

Got a question about LWRP’s.  I’m writing a library cookbook and testing components of it as I go.

I’ve written an LWRP to perform a dll drop on a server.

Everything seems ok, I’ve done a lot of reading online about this and managed to narrow it down to this last error.

The error is:

“[2014-07-24T06:59:57-04:00] FATAL: NameError: AW_DLLDrop_dlldrop[7.1_HF05_Overlay_SAML_fix.zip] (AW_DLLDrop::default line 25) had an error: NameError: uninitialized constant Chef::Resource::DllDrop”

 

The code from the LWRP in question is:

“    

      def whyrun_supported?

        true

      end

     

      action :drop do

        converge_by("Drop #{ @new_resource}") do

          perform_dll_drop

        end

      end

     

      action :undo do

        converge_by("Undo #{ @new_resource}") do

          undo_dll_drop

        end

      end

     

      def load_current_resource

        @current_resource = Chef::Resource::DllDrop.new(@new_resource.name)

        @current_resource.name(@new_resource.name)

      end”

 

Can anyone shed any light on what I’m missing with this?  One of my colleagues has pointed out that there may be an issue with @new_resource.name retuning null?  Any way I can check this?

 

Any pointers would be great as I’m struggling a little with this.

 

Thanks

Chris




Archive powered by MHonArc 2.6.16.

§