Sha256: c50d3fcafbf4c17cb41d73a6f3b04d1c1e190e71c72dd809049bc69dbfd0f948

Contents?: true

Size: 1.38 KB

Versions: 24

Compression:

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

24 entries across 24 versions & 1 rubygems

Version Path
chef-13.12.14-universal-mingw32 lib/chef/provider/resource_update.rb
chef-13.12.3-universal-mingw32 lib/chef/provider/resource_update.rb
chef-13.11.3-universal-mingw32 lib/chef/provider/resource_update.rb
chef-13.10.4-universal-mingw32 lib/chef/provider/resource_update.rb
chef-13.10.0-universal-mingw32 lib/chef/provider/resource_update.rb
chef-13.9.4-universal-mingw32 lib/chef/provider/resource_update.rb
chef-14.2.0-universal-mingw32 lib/chef/provider/resource_update.rb
chef-14.1.12-universal-mingw32 lib/chef/provider/resource_update.rb
chef-14.1.1-universal-mingw32 lib/chef/provider/resource_update.rb
chef-13.9.1-universal-mingw32 lib/chef/provider/resource_update.rb
chef-14.0.190-universal-mingw32 lib/chef/provider/resource_update.rb
chef-13.8.5-universal-mingw32 lib/chef/provider/resource_update.rb
chef-13.8.3-universal-mingw32 lib/chef/provider/resource_update.rb
chef-12.22.1 lib/chef/provider/resource_update.rb
chef-12.22.1-universal-mingw32 lib/chef/provider/resource_update.rb
chef-13.8.0-universal-mingw32 lib/chef/provider/resource_update.rb
chef-12.12.15-universal-mingw32 lib/chef/provider/resource_update.rb
chef-12.12.15 lib/chef/provider/resource_update.rb
chef-12.12.13 lib/chef/provider/resource_update.rb
chef-12.12.13-universal-mingw32 lib/chef/provider/resource_update.rb