60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
|
# File 'lib/cisco_node_utils/cisco_cmn_utils.rb', line 60
def ChefUtils.generic_prop_set(klass, rlbname, props)
props.each do |prop|
klass.instance_eval {
if @new_resource.send(prop).nil?
def_prop = instance_variable_get(rlbname).send("default_#{prop}")
@new_resource.send(prop, def_prop)
end
current = instance_variable_get(rlbname).send(prop)
if current != @new_resource.send(prop)
converge_by("update #{prop} '#{current}' => " +
"'#{@new_resource.send(prop)}'") do
instance_variable_get(rlbname).send("#{prop}=",
@new_resource.send(prop))
end
end
}
end
end
|