diff options
author | danielsdeleo <dan@opscode.com> | 2014-02-03 14:17:45 -0800 |
---|---|---|
committer | danielsdeleo <dan@opscode.com> | 2014-02-03 14:40:10 -0800 |
commit | fff56de8754f520f199011cdd1e0f7b4694bdbae (patch) | |
tree | b6c02ee1822463996f867008687ce6cff5aa232e /lib | |
parent | 72606301614b846c5c3a996d1cedfbd2c8de2955 (diff) | |
download | chef-fff56de8754f520f199011cdd1e0f7b4694bdbae.tar.gz |
Delegate sync_cookbooks to policy_builder, subclasses rely on it
Diffstat (limited to 'lib')
-rw-r--r-- | lib/chef/client.rb | 4 | ||||
-rw-r--r-- | lib/chef/policy_builder/expand_node_object.rb | 8 | ||||
-rw-r--r-- | lib/chef/policy_builder/policyfile.rb | 2 |
3 files changed, 9 insertions, 5 deletions
diff --git a/lib/chef/client.rb b/lib/chef/client.rb index 5fe2c07d7e..cb4a9e1224 100644 --- a/lib/chef/client.rb +++ b/lib/chef/client.rb @@ -255,6 +255,10 @@ class Chef run_context end + def sync_cookbooks + policy_builder.sync_cookbooks + end + def policy_builder @policy_builder ||= Chef::PolicyBuilder.strategy.new(node_name, ohai.data, json_attribs, @override_runlist, events) end diff --git a/lib/chef/policy_builder/expand_node_object.rb b/lib/chef/policy_builder/expand_node_object.rb index 11a667aef9..dbb11380c8 100644 --- a/lib/chef/policy_builder/expand_node_object.rb +++ b/lib/chef/policy_builder/expand_node_object.rb @@ -155,10 +155,6 @@ class Chef raise end - ######################################## - # Internal public API - ######################################## - # Sync_cookbooks eagerly loads all files except files and # templates. It returns the cookbook_hash -- the return result # from /environments/#{node.chef_environment}/cookbook_versions, @@ -190,6 +186,10 @@ class Chef cookbook_hash end + ######################################## + # Internal public API + ######################################## + def setup_run_list_override runlist_override_sanity_check! unless(override_runlist.empty?) diff --git a/lib/chef/policy_builder/policyfile.rb b/lib/chef/policy_builder/policyfile.rb index 4373c36c86..e9041d5c0f 100644 --- a/lib/chef/policy_builder/policyfile.rb +++ b/lib/chef/policy_builder/policyfile.rb @@ -174,7 +174,6 @@ class Chef run_list_expansion_ish end - ## Internal Public API ## def sync_cookbooks Chef::Log.debug("Synchronizing cookbooks") @@ -187,6 +186,7 @@ class Chef cookbooks_to_sync end + ## Internal Public API ## def run_list_with_versions_for_display run_list.map do |recipe_spec| |