Class: Chef::Provider::ResourceUpdate

Inherits:
Object
  • Object
show all
Defined in:
lib/chef/provider/resource_update.rb

Overview

{

"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" : ""

}

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#durationObject

ms



34
35
36
# File 'lib/chef/provider/resource_update.rb', line 34

def duration
  @duration
end

#event_dataObject

e.g., a diff.



40
41
42
# File 'lib/chef/provider/resource_update.rb', line 40

def event_data
  @event_data
end

#final_propertiesObject

Returns the value of attribute final_properties.



39
40
41
# File 'lib/chef/provider/resource_update.rb', line 39

def final_properties
  @final_properties
end

#final_stateObject

Returns the value of attribute final_state.



37
38
39
# File 'lib/chef/provider/resource_update.rb', line 37

def final_state
  @final_state
end

#initial_propertiesObject

Returns the value of attribute initial_properties.



38
39
40
# File 'lib/chef/provider/resource_update.rb', line 38

def initial_properties
  @initial_properties
end

#initial_stateObject

Returns the value of attribute initial_state.



36
37
38
# File 'lib/chef/provider/resource_update.rb', line 36

def initial_state
  @initial_state
end

#nameObject

Returns the value of attribute name.



33
34
35
# File 'lib/chef/provider/resource_update.rb', line 33

def name
  @name
end

#statusObject

Returns the value of attribute status.



35
36
37
# File 'lib/chef/provider/resource_update.rb', line 35

def status
  @status
end

#typeObject

Returns the value of attribute type.



32
33
34
# File 'lib/chef/provider/resource_update.rb', line 32

def type
  @type
end

Instance Method Details

#initial_state_from_resource(resource) ⇒ Object



42
43
44
# File 'lib/chef/provider/resource_update.rb', line 42

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

#updated_state_from_resource(resource) ⇒ Object



46
47
48
# File 'lib/chef/provider/resource_update.rb', line 46

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