summaryrefslogtreecommitdiffstats
path: root/lib/puppet/transaction
diff options
context:
space:
mode:
authorMatt Robinson <matt@puppetlabs.com>2011-02-02 16:47:53 -0800
committerMatt Robinson <matt@puppetlabs.com>2011-02-02 16:47:53 -0800
commitd4a468543f1f06d44efdb7e375284b0e65260caf (patch)
tree2dff58c6e2af2cd682a1143af8494ee4bdf99964 /lib/puppet/transaction
parent6d9cae2e9ca6a56506f679db02ba9abb30a4df91 (diff)
parent876d0503dd93329a73e7f335c10a47330d745293 (diff)
downloadpuppet-d4a468543f1f06d44efdb7e375284b0e65260caf.tar.gz
puppet-d4a468543f1f06d44efdb7e375284b0e65260caf.tar.xz
puppet-d4a468543f1f06d44efdb7e375284b0e65260caf.zip
Merge branch '2.6.x' into next
* 2.6.x: (46 commits) Augmentation of tests for prior commit Fix to fix for #5755 -- backref serialization issues in zaml Fixed #5564 - Added some more fqdn_rand documentation Fixed #4968 - Updated list of options turned on by --test in documentation (#5061) - allow special hostclass/define variables to be evaluated as defaults. (#6107) Fix an error when auditing a file with empty content Remove already initialized constant warning from file_spec.rb tests (#5566) Treat source only File checksums as syntax errors when used with content Rename variable used in File type validation to be more clear Remove invalid "timestamp" and "time", and add missing "ctime" File checksum types. Remove order dependency when specifying source and checksum on File type Bug #5755 -- ZAML generates extra newline in some hash backreferences. bug #5681 -- code fix to handle AIX mount output Bug #5681 -- parse AIX mount command output. Spec for #5681 to allow parsing of AIX mount output in mount provider Fixed #6091 - Changed POSIX path matching to allow multiple leading slashes Bug #6091 -- test leading double-slash in filenames are allowed. Fixed #6071 - Fixed typo and improved exec path error message Fixed #6061 - Allowed -1 as password min/max age Bug #6061 -- verify that negative {min,max}_password_age are accepted. ... Manually Resolved Conflicts: lib/puppet/util/zaml.rb spec/unit/util/zaml_spec.rb
Diffstat (limited to 'lib/puppet/transaction')
-rw-r--r--lib/puppet/transaction/resource_harness.rb22
1 files changed, 2 insertions, 20 deletions
diff --git a/lib/puppet/transaction/resource_harness.rb b/lib/puppet/transaction/resource_harness.rb
index c1b980632..4a3d35e0d 100644
--- a/lib/puppet/transaction/resource_harness.rb
+++ b/lib/puppet/transaction/resource_harness.rb
@@ -52,13 +52,13 @@ class Puppet::Transaction::ResourceHarness
# Update the machine state & create logs/events
events = []
ensure_param = resource.parameter(:ensure)
- if desired_values[:ensure] && !ensure_param.insync?(current_values[:ensure])
+ if desired_values[:ensure] && !ensure_param.safe_insync?(current_values[:ensure])
events << apply_parameter(ensure_param, current_values[:ensure], audited_params.include?(:ensure), historical_values[:ensure])
synced_params << :ensure
elsif current_values[:ensure] != :absent
work_order = resource.properties # Note: only the resource knows what order to apply changes in
work_order.each do |param|
- if desired_values[param.name] && !param.insync?(current_values[param.name])
+ if desired_values[param.name] && !param.safe_insync?(current_values[param.name])
events << apply_parameter(param, current_values[param.name], audited_params.include?(param.name), historical_values[param.name])
synced_params << param.name
end
@@ -175,22 +175,4 @@ class Puppet::Transaction::ResourceHarness
return nil unless name = resource[:schedule]
resource.catalog.resource(:schedule, name) || resource.fail("Could not find schedule #{name}")
end
-
- private
-
- def absent_and_not_being_created?(current, param)
- current[:ensure] == :absent and param.should.nil?
- end
-
- def ensure_is_insync?(current, param)
- param.insync?(current[:ensure])
- end
-
- def ensure_should_be_absent?(current, param)
- param.should == :absent
- end
-
- def param_is_insync?(current, param)
- param.insync?(current[param.name])
- end
end