summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc A. Paradise <marc.paradise@gmail.com>2021-06-02 09:44:43 -0400
committerMarc A. Paradise <marc.paradise@gmail.com>2021-06-09 09:20:32 -0400
commit21dbe72614e818243fec007a866f6265aae6447f (patch)
tree9ce135580eff7bdc30c24f092a1975561305415a
parente86942d64dee5c8f3a08453a23d93ca702b0792c (diff)
downloadchef-21dbe72614e818243fec007a866f6265aae6447f.tar.gz
Do not show blacklist deprecation for whitelist
This adds a new AttributeWhitelistConfiguration deprecation so that we don't report use of whitelist as blacklist. Signed-off-by: Marc A. Paradise <marc.paradise@gmail.com>
-rw-r--r--lib/chef/deprecated.rb4
-rw-r--r--lib/chef/node.rb2
2 files changed, 5 insertions, 1 deletions
diff --git a/lib/chef/deprecated.rb b/lib/chef/deprecated.rb
index c48566e7e4..ae205497c4 100644
--- a/lib/chef/deprecated.rb
+++ b/lib/chef/deprecated.rb
@@ -253,6 +253,10 @@ class Chef
target 33
end
+ class AttributeWhitelistConfiguration < Base
+ target 34
+ end
+
class Generic < Base
def url
"https://docs.chef.io/chef_deprecations_client/"
diff --git a/lib/chef/node.rb b/lib/chef/node.rb
index 50a861066b..6d18baee9c 100644
--- a/lib/chef/node.rb
+++ b/lib/chef/node.rb
@@ -712,7 +712,7 @@ class Chef
# @param [String] level the attribute level
def allowlist_or_whitelist_config(level)
if Chef::Config["#{level}_attribute_whitelist".to_sym]
- Chef.deprecated(:attribute_blacklist_configuration, "Attribute whitelist configurations have been deprecated. Use the allowed_LEVEL_attribute configs instead")
+ Chef.deprecated(:attribute_whitelist_configuration, "Attribute whitelist configurations have been deprecated. Use the allowed_LEVEL_attribute configs instead")
Chef::Config["#{level}_attribute_whitelist".to_sym]
else
Chef::Config["allowed_#{level}_attributes".to_sym]