summaryrefslogtreecommitdiff
path: root/lib/chef
diff options
context:
space:
mode:
authorClaire McQuin <claire@getchef.com>2014-06-06 10:03:12 -0700
committerClaire McQuin <claire@getchef.com>2014-06-06 10:03:12 -0700
commit90d7ed28028a6f32aa6c744fb4f801f6b604138e (patch)
tree6a830000dcc951c69e8b60552797f9472f3dc31e /lib/chef
parent5e6a5ba9f5b8fec783489e0b35db80f27c5e476f (diff)
downloadchef-90d7ed28028a6f32aa6c744fb4f801f6b604138e.tar.gz
comment patch for future fix
Diffstat (limited to 'lib/chef')
-rw-r--r--lib/chef/resource_reporter.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/chef/resource_reporter.rb b/lib/chef/resource_reporter.rb
index d191710cb4..47bbd13741 100644
--- a/lib/chef/resource_reporter.rb
+++ b/lib/chef/resource_reporter.rb
@@ -47,6 +47,16 @@ class Chef
report
end
+ # Future: Some resources store state information that does not convert nicely
+ # to json. We can't call a resource's state method here, since there are conflicts
+ # with some LWRPs, so we can't override a resource's state method to return
+ # json-friendly state data.
+ #
+ # The registry key resource returns json-friendly state data through its state
+ # attribute, and uses a read-only variable for fetching true state data. If
+ # we have conflicts with other resources reporting json incompatible state, we
+ # may want to extend the state_attrs API with the ability to rename POST'd
+ # attrs.
def for_json
as_hash = {}
as_hash["type"] = new_resource.class.dsl_name