Sha256: 16c8c83ab801887439b514d7210632c8b1091cde9d3037671d35421effe8a745

Contents?: true

Size: 1.39 KB

Versions: 14

Compression:

Stored size: 1.39 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

14 entries across 14 versions & 1 rubygems

Version Path
chef-14.13.11-universal-mingw32 lib/chef/provider/resource_update.rb
chef-15.0.300-universal-mingw32 lib/chef/provider/resource_update.rb
chef-15.0.298-universal-mingw32 lib/chef/provider/resource_update.rb
chef-15.0.293-universal-mingw32 lib/chef/provider/resource_update.rb
chef-14.12.9-universal-mingw32 lib/chef/provider/resource_update.rb
chef-14.12.3-universal-mingw32 lib/chef/provider/resource_update.rb
chef-14.11.21-universal-mingw32 lib/chef/provider/resource_update.rb
chef-14.10.9-universal-mingw32 lib/chef/provider/resource_update.rb
chef-14.9.13-universal-mingw32 lib/chef/provider/resource_update.rb
chef-14.8.12-universal-mingw32 lib/chef/provider/resource_update.rb
chef-14.7.17-universal-mingw32 lib/chef/provider/resource_update.rb
chef-14.6.47-universal-mingw32 lib/chef/provider/resource_update.rb
chef-14.5.33-universal-mingw32 lib/chef/provider/resource_update.rb
chef-14.3.37-universal-mingw32 lib/chef/provider/resource_update.rb