diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2015-04-15 17:49:36 -0700 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2015-04-15 17:50:49 -0700 |
commit | b93ddf1910f9ee7454507ed2aeb7de42ac831ded (patch) | |
tree | c7b367d4aeaea380c5d65f3c3ab443c122e35585 | |
parent | 71ac980f7a76e70d18b63751cd70d24c40921152 (diff) | |
download | chef-b93ddf1910f9ee7454507ed2aeb7de42ac831ded.tar.gz |
add md files
-rw-r--r-- | CHANGELOG.md | 2 | ||||
-rw-r--r-- | RELEASE_NOTES.md | 25 |
2 files changed, 27 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 0acc5ba8d2..db07af7989 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,8 @@ * [**Mike Dodge**](https://github.com/mikedodge04) MacOSX services: Load LaunchAgents as console user, adding plist and session_type options. +* Add dynamic resource resolution similar to dynamic provider resolution +* Add Chef class fascade to internal structures ## 12.2.1 * [Issue 3153](https://github.com/chef/chef/issues/3153): Fix bug where unset HOME would cause chef to crash diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 510e457b33..8a7b537670 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -18,3 +18,28 @@ however advanced users may find it useful in certain use cases. Any cookbook that relies on other ohai data will absolutely not work in this mode unless the user implements workarounds such as running the ohai resource during the compile phase. + +## Dynamic Resource Resolution and Chef Class Fascade + +Resolution of Resources is now dynamic and similar to Providers and handles +multiple resources having the same provides line on a given platform. When +the user types a resource like 'package' into the DSL that is resolved via +the provides lines, and if multiple classes provide the same resource (like +Homebrew and MacPorts package resources on Mac) then which one is selected +is governed by the Chef::Platform::ResourcePriorityMap. + +In order to change the priorities in both the ResourcePriorityMap and +ProviderPriorityMap a helper API has been constructed off of the Chef class: + +* `Chef.get_provider_priority_array(resource_name)` +* `Chef.get_resource_priority_array(resource_name)` +* `Chef.set_provider_priority_array(resource_name, Array<Class>, *filter)` +* `Chef.set_resoruce_priority_array(resource_name, Array<Class>, *filter)` + +In order to change the `package` resource globally on MacOSX to the MacPorts provider: + +`Chef.set_resource_priority_array(:package, [ Chef::Resource::MacportsPackage ], os: 'darwin')` + +That line can be placed into a library file in a cookbook so that it is applied before +any recipes are compiled. + |