Sha256: 2f72a05ce8deb057458419836812f4da062e47aff0bb289805b19cdd6a6b7bd3

Contents?: true

Size: 1.35 KB

Versions: 90

Compression:

Stored size: 1.35 KB

Contents

class Chef
  class Provider

    # {
    #    "run_id" : "1000",
    #    "resource" : { 
    #         "type" : "file",
    #         "name" : "/etc/passwd", 
    #         "start_time" : "2012-01-09T08:15:30-05:00",
    #         "end_time" : "2012-01-09T08:15:30-05:00",
    #         "status" : "modified",
    #         "initial_state" : "exists", 
    #         "final_state" : "modified", 
    #         "before" : { 
    #              "group" : "root", 
    #              "owner" : "root",
    #              "checksum" : "xyz"
    #         },
    #         "after" : { 
    #              "group" : "root", 
    #              "owner" : "root",
    #              "checksum" : "abc"
    #         },
    #         "delta" : "escaped delta goes here"
    #    },
    #    "event_data" : "" 
    # }

    class ResourceUpdate

      attr_accessor :type
      attr_accessor :name
      attr_accessor :duration #ms
      attr_accessor :status
      attr_accessor :initial_state
      attr_accessor :final_state
      attr_accessor :initial_properties
      attr_accessor :final_properties
      attr_accessor :event_data # e.g., a diff.

      def initial_state_from_resource(resource)
        @initial_properties = resource.to_hash
      end

      def updated_state_from_resource(resource)
        @final_properties = resource.to_hash
      end

    end
  end
end



Version data entries

90 entries across 90 versions & 2 rubygems

Version Path
chef-10.30.0.rc.1-x86-mingw32 lib/chef/provider/resource_update.rb
chef-10.30.0.rc.1 lib/chef/provider/resource_update.rb
chef-10.30.0.rc.0 lib/chef/provider/resource_update.rb
chef-10.30.0.rc.0-x86-mingw32 lib/chef/provider/resource_update.rb
chef-10.28.2 lib/chef/provider/resource_update.rb
chef-10.28.2-x86-mingw32 lib/chef/provider/resource_update.rb
chef-11.6.2 lib/chef/provider/resource_update.rb
chef-11.6.2-x86-mingw32 lib/chef/provider/resource_update.rb
chef-10.28.0 lib/chef/provider/resource_update.rb
chef-10.28.0.rc.0 lib/chef/provider/resource_update.rb
chef-11.6.0.hotfix.1 lib/chef/provider/resource_update.rb
chef-11.6.0 lib/chef/provider/resource_update.rb
chef-11.6.0.rc.4 lib/chef/provider/resource_update.rb
chef-11.6.0.rc.3 lib/chef/provider/resource_update.rb
chef-11.6.0.rc.2 lib/chef/provider/resource_update.rb
chef-11.6.0.rc.1 lib/chef/provider/resource_update.rb
chef-11.6.0.rc.0 lib/chef/provider/resource_update.rb
chef-10.26.0 lib/chef/provider/resource_update.rb
chef-10.26.0.beta.0 lib/chef/provider/resource_update.rb
chef-10.24.4 lib/chef/provider/resource_update.rb