Method: Chef::Node#fix_automatic_attributes

Defined in:
lib/chef/node.rb

#fix_automatic_attributesObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Always ensure that certain automatic attributes are populated and constructed correctly



377
378
379
380
381
382
383
384
385
386
# File 'lib/chef/node.rb', line 377

def fix_automatic_attributes
  platform, version = Chef::Platform.find_platform_and_version(self)
  # FIXME(log): should be trace
  logger.debug("Platform is #{platform} version #{version}")
  automatic[:platform] = platform
  automatic[:platform_version] = Chef::VersionString.new(version)
  automatic[:chef_guid] = Chef::Config[:chef_guid] || ( Chef::Config[:chef_guid] = node_uuid )
  automatic[:name] = name
  automatic[:chef_environment] = chef_environment
end