summaryrefslogtreecommitdiff
path: root/lib/chef/platform
diff options
context:
space:
mode:
authorJohn Keiser <john@johnkeiser.com>2015-06-05 10:48:29 -0700
committerJohn Keiser <john@johnkeiser.com>2015-06-08 09:01:54 -0700
commit8f17f5223727cb9bec3c44b66a3fbe327b7a2f19 (patch)
tree05cebef51365af906081bc1430c6c15d048a7b40 /lib/chef/platform
parent8d4e9d44995d6f7de5a0b681616ed8241e39ece3 (diff)
downloadchef-8f17f5223727cb9bec3c44b66a3fbe327b7a2f19.tar.gz
Make use_automatic_resource_name automatic
Diffstat (limited to 'lib/chef/platform')
-rw-r--r--lib/chef/platform/provider_mapping.rb2
-rw-r--r--lib/chef/platform/resource_priority_map.rb9
2 files changed, 7 insertions, 4 deletions
diff --git a/lib/chef/platform/provider_mapping.rb b/lib/chef/platform/provider_mapping.rb
index 0440ff8601..e3a894c8ac 100644
--- a/lib/chef/platform/provider_mapping.rb
+++ b/lib/chef/platform/provider_mapping.rb
@@ -60,8 +60,6 @@ class Chef
Chef::Log.debug("Chef::Version::Comparable does not know how to parse the platform version: #{version}")
end
end
- else
- Chef::Log.debug("Platform #{name} not found, using all defaults. (Unsupported platform?)")
end
provider_map
end
diff --git a/lib/chef/platform/resource_priority_map.rb b/lib/chef/platform/resource_priority_map.rb
index e98fc12413..eeff843ccf 100644
--- a/lib/chef/platform/resource_priority_map.rb
+++ b/lib/chef/platform/resource_priority_map.rb
@@ -5,8 +5,8 @@ class Chef
class ResourcePriorityMap
include Singleton
- def get_priority_array(node, resource_name)
- priority_map.get(node, resource_name.to_sym)
+ def get_priority_array(node, resource_name, canonical: nil)
+ priority_map.get(node, resource_name.to_sym, canonical: canonical)
end
def set_priority_array(resource_name, priority_array, *filter, &block)
@@ -14,6 +14,11 @@ class Chef
end
# @api private
+ def delete_priority_array(resource_name, &block)
+ priority_map.delete_if(resource_name, &block)
+ end
+
+ # @api private
def list_handlers(*args)
priority_map.list(*args).flatten(1).uniq
end