Skip to content
Browse files

Fix chef11 deprecation message

  • Loading branch information...
1 parent 99cdac9 commit e98bbfba6de02024f988001341ff6d98ff44a86e Julien Vehent committed Oct 28, 2012
Showing with 12 additions and 12 deletions.
  1. +3 −3 libraries/core.rb
  2. +9 −9 recipes/default.rb
View
6 libraries/core.rb
@@ -72,10 +72,10 @@ def process_rule(node, name, params)
return true
end
unless node['afw']['chains'].has_key?(user)
- node['afw']['chains'][user] = {}
+ node.set['afw']['chains'][user] = {}
end
- node['afw']['chains'][user]['uid'] = uid
- node['afw']['chains'][user]['rules'] = []
+ node.set['afw']['chains'][user]['uid'] = uid
+ node.set['afw']['chains'][user]['rules'] = []
end
# Rule preparation is done, launch the compilation and store in node attr
View
18 recipes/default.rb
@@ -9,15 +9,15 @@
#
# flush all stored compiled rules at chef-run, and regenerate them
-node['afw']['chains'] = {}
-node['afw']['tables']['filter']['rules'] = []
-node['afw']['tables']['filter']['chains'] = []
-node['afw']['tables']['raw']['rules'] = []
-node['afw']['tables']['raw']['chains'] = []
-node['afw']['tables']['mangle']['rules'] = []
-node['afw']['tables']['mangle']['chains'] = []
-node['afw']['tables']['nat']['rules'] = []
-node['afw']['tables']['nat']['chains'] = []
+node.set['afw']['chains'] = {}
+node.set['afw']['tables']['filter']['rules'] = []
+node.set['afw']['tables']['filter']['chains'] = []
+node.set['afw']['tables']['raw']['rules'] = []
+node.set['afw']['tables']['raw']['chains'] = []
+node.set['afw']['tables']['mangle']['rules'] = []
+node.set['afw']['tables']['mangle']['chains'] = []
+node.set['afw']['tables']['nat']['rules'] = []
+node.set['afw']['tables']['nat']['chains'] = []
class Chef::Recipe
include AFW

0 comments on commit e98bbfb

Please sign in to comment.
Something went wrong with that request. Please try again.