Sha256: 6718faf81d9786adf5e749a56effc5779772cb8ae75db0678a02f93f226dbcdf

Contents?: true

Size: 1.33 KB

Versions: 219

Compression:

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

219 entries across 219 versions & 1 rubygems

Version Path
chef-18.6.2-universal-mingw-ucrt lib/chef/provider/resource_update.rb
chef-18.6.2 lib/chef/provider/resource_update.rb
chef-17.10.163-universal-mingw32 lib/chef/provider/resource_update.rb
chef-17.10.163 lib/chef/provider/resource_update.rb
chef-18.5.0-x64-mingw-ucrt lib/chef/provider/resource_update.rb
chef-18.5.0 lib/chef/provider/resource_update.rb
chef-18.4.12-x64-mingw-ucrt lib/chef/provider/resource_update.rb
chef-18.4.12 lib/chef/provider/resource_update.rb
chef-17.10.122-universal-mingw32 lib/chef/provider/resource_update.rb
chef-17.10.122 lib/chef/provider/resource_update.rb
chef-17.10.114-universal-mingw32 lib/chef/provider/resource_update.rb
chef-17.10.114 lib/chef/provider/resource_update.rb
chef-18.4.2-x64-mingw-ucrt lib/chef/provider/resource_update.rb
chef-18.4.2 lib/chef/provider/resource_update.rb
chef-17.10.95-universal-mingw32 lib/chef/provider/resource_update.rb
chef-17.10.95 lib/chef/provider/resource_update.rb
chef-18.3.0-x64-mingw-ucrt lib/chef/provider/resource_update.rb
chef-18.3.0 lib/chef/provider/resource_update.rb
chef-17.10.68-universal-mingw32 lib/chef/provider/resource_update.rb
chef-18.2.7-x64-mingw-ucrt lib/chef/provider/resource_update.rb