summaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | | | | | | | | | Fixed #6850 - Clean up ResourceType#to_psonLuke Kanies2011-03-252-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There's no value in including the code when we convert a resource type to JSON, since you can't convert it back again, so this removes it. I also cleaned up a few of the other attributes which were producing unnecessary information. Signed-off-by: Luke Kanies <luke@puppetlabs.com> Reviewed-by: Daniel Pittman <daniel@puppetlabs.com>
* | | | | | | | | | | | | (#6830) Fix stat method calls to not use an unneeded argumentMatt Robinson2011-03-259-9/+9
| |_|_|_|/ / / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With this change under ruby 1.9.2 the number of failing specs goes from 2003 to 635. Also, puppet apply and master both seem to work. Agent still has OpenSSL issues. Ruby 1.8 doesn't complain if you pass arguments to a runtime defined method that doesn't take arguments. Ruby 1.9 does class Foo define_method('bar') do puts 'baz' end end Foo.new.bar("idonttakearguments") In Ruby 1.8 this prints: baz In Ruby 1.9 this errors with: 19_test.rb:3:in `block in <class:Foo>': wrong number of arguments (1 for 0) (ArgumentError) Reviewed-by:
* | | | | | | | | | | | (#4576) Raise an error when a node is classified into a non-existent classJesse Wolfe2011-03-241-10/+6
|/ / / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In 2.6.x, this was upgraded from "info" to "warning". This change for Statler escalates the warning to an exception which will abort the compile. This makes compiling fail consistently when you try to use an undefined class from any of: node classifiers, the class keyword, and the include function. Paired-with: Jacob Helwig <jacob@puppetlabs.com>
* | | | | | | | | | | Merge branch '2.6.next' into nextMax Martin2011-03-236-161/+198
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 2.6.next: Fixed #6562 - Minor kick documentation fix (#6658) Propagate ENC connection errors to the agent (#4884) Remove typo from spec test (#4884) Modify tests to pass on non-OS X systems (#4884) Revise new exec tests, add a few more (#4884) Add an shell provider for execs (#4884) Fix Test::Unit exec tests (#4884) Break the exec type out to have a posix provider (#4884) Add consistent path validation and behavior (#4884) Add expand_path to requiring the spec_helper (#4884) Autorequire shared behaviors and method to silence warnings (#4884) Fix whitespace (#4884) Get rid of open3 require since it wasn't being used (#5814) Improved cron type specs (#5814) cron_spec shouldn't depend on cron provider Manually Resolved Conflicts: lib/puppet/util/command_line/puppetrun spec/spec_helper.rb spec/unit/type/exec_spec.rb spec/unit/type_spec.rb test/ral/type/exec.rb
| * | | | | | | | | | Merge branch 'tickets/2.6.x/6562' into 2.6.nextJames Turnbull2011-03-221-1/+0
| |\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * tickets/2.6.x/6562: Fixed #6562 - Minor kick documentation fix
| | * | | | | | | | | | Fixed #6562 - Minor kick documentation fixJames Turnbull2011-03-221-1/+0
| | | | | | | | | | | |
| * | | | | | | | | | | Merge branch 'ticket/2.6.next/6658' into 2.6.nextMatt Robinson2011-03-181-2/+1
| |\ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ticket/2.6.next/6658: (#6658) Propagate ENC connection errors to the agent
| | * | | | | | | | | | | (#6658) Propagate ENC connection errors to the agentMatt Robinson2011-03-181-2/+1
| | | |/ / / / / / / / / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the master failed to run the External Node Classifier script it would log an error on the master, but the agent didn't get back the full error or the stack trace for it's logs. By raising when there's an ENC script problem on the master, this causes the error messages to propagate to the agent. Paired-with: Jacob Helwig <jacob@puppetlabs.com>
| * | | | | | | | | | | Merge branch ↵Max Martin2011-03-175-159/+197
| |\ \ \ \ \ \ \ \ \ \ \ | | |/ / / / / / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'feature/2.6.next/4884-an-exec-provider-that-executes-unfiltered-bash-code' into 2.6.next * feature/2.6.next/4884-an-exec-provider-that-executes-unfiltered-bash-code: (#4884) Revise new exec tests, add a few more (#4884) Add an shell provider for execs (#4884) Fix Test::Unit exec tests (#4884) Break the exec type out to have a posix provider (#4884) Add consistent path validation and behavior (#4884) Add expand_path to requiring the spec_helper (#4884) Autorequire shared behaviors and method to silence warnings (#4884) Fix whitespace (#4884) Get rid of open3 require since it wasn't being used
| | * | | | | | | | | | (#4884) Revise new exec tests, add a few moreMax Martin2011-03-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Revised a few of the new tests for the exec type and provider to ensure that they were testing what they meant to, and added in a couple of new tests. Reviewed-by:Daniel Pittman
| | * | | | | | | | | | (#4884) Add an shell provider for execsMatt Robinson2011-03-151-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes it possible to use shell builtins when the exec is inline bash commands. Paired-with: Max Martin
| | * | | | | | | | | | (#4884) Break the exec type out to have a posix providerDaniel Pittman2011-03-152-156/+135
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is in preparation for allowing other new providers to handle exec commands differently. Reviewed-by: Max Martin and Matt Robinson
| | * | | | | | | | | | (#4884) Add consistent path validation and behaviorDaniel Pittman2011-03-152-0/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Many path parameters were implementing their own inconsistent validation and behavior. Now those parameters can have a parent class that makes things a lot more consistent. Reviewed-by: Matt Robinson and Max Martin
| | * | | | | | | | | | (#4884) Get rid of open3 require since it wasn't being usedMatt Robinson2011-03-151-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Paired-with: Max Martin
* | | | | | | | | | | | (#6820) Fix File class lookup in the file type for Ruby 1.9Matt Robinson2011-03-231-14/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Was getting the following error when we simply called File.dirname err: Got an uncaught exception of type NoMethodError: undefined method `dirname' for Puppet::Type::File:Class The constant lookup has changed in Ruby 1.9 to look at local scopes first, so we need to make it clearer that File is the Ruby File class and not something scoped in Puppet. Reviewed-by: Jacob Helwig <jacob@puppetlabs.com>
* | | | | | | | | | | | (#6820) Fix nagios parser to use proper hash syntax for Ruby 1.9Matt Robinson2011-03-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reviewed-by: Jacob Helwig <jacob@puppetlabs.com>
* | | | | | | | | | | | (#6820) Fix RDOC parser to work with Ruby 1.9Matt Robinson2011-03-231-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Lovely RDOC changed where it put everything in Ruby 1.9. Now there's some conditional logic depending on Ruby version to determine which files to requrie. The tests still fail, but at least they run now. Reviewed-by: Jacob Helwig <jacob@puppetlabs.com>
* | | | | | | | | | | | (#6820) Fix invalid next that should be a returnMatt Robinson2011-03-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The old code under ruby 1.8.7 if it was hit would result in: unexpected next (LocalJumpError) In Ruby 1.9 it doesn't even give you the chance to run the code since you get: compile error (SyntaxError) The code isn't tested so the intented behavior isn't clear, but in context this looks like the right change. Reviewed-by: Jacob Helwig <jacob@puppetlabs.com>
* | | | | | | | | | | | (#2782) Fix constant_defined?Matt Robinson2011-03-231-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Thanks to Al Hoang for the bit of code for choosing how to use constant_defined? depending on the version of Ruby. In Ruby 1.9 const_defined? has a new parameter for inherit (from Ruby docs) mod.const_defined?(sym, inherit=true) -> true or false Returns true if a constant with the given name is defined by mod, or its ancestors if inherit is not false. Unfortunately, the documentation isn't terribly clear about the behavior if inherit=false. In Ruby 1.8 the inherit parameter doesn't exist. It appears that setting inherit=false makes it behave like it used to in Ruby 1.8, but there may be sublties of autoloading that prove this wrong or ways in which were setting constants that changed and cause problems regardless of the behavior of const_defined? Ruby 1.8.7: irb(main):001:0> module Foo irb(main):002:1> end => nil irb(main):003:0> A = 'find_me?' => "find_me?" irb(main):004:0> Foo.const_defined?('A') => false Ruby 1.9.2: ruby-1.9.2-p136 :001 > module Foo ruby-1.9.2-p136 :002?> end => nil ruby-1.9.2-p136 :003 > A = 'find_me?' => "find_me?" ruby-1.9.2-p136 :004 > Foo.const_defined?('A') => true ruby-1.9.2-p136 :005 > Foo.const_defined?('A', false) => false Also noteworthy is that something about constants behavior changed between 1.9.1 and 1.9.2, though not in regard to the little test above, but we should only be testing against 1.9.2 anyway. At least with this change in we'll be able to start debugging test failures instead of just getting failures at the level of syntax errors. Reviewed-by: Jacob Helwig <jacob@puppetlabs.com>
* | | | | | | | | | | | Merge branch 'feature/next/6257-pip_package_provider' into nextMatt Robinson2011-03-221-0/+109
|\ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * feature/next/6257-pip_package_provider: (#6527) Fix uninstall problem and refactor (#6527) Added pip package provider.
| * | | | | | | | | | | | (#6527) Fix uninstall problem and refactorMatt Robinson2011-03-221-12/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Uninstall wasn't working properly because the instances method relied on the pip command having been defined by calling lazy_pip. This lazy_pip pattern is a nice way of getting around Puppet's problem of disqualifying providers at the beginning of a run because the command doesn't yet exist even though part way through the run the command might exist. Really, we need to fix puppet to lazily evaluate a provider command for validity only at the time the provider is needed. The refactoring also pointed out that query could just reuse the logic from instances. The tests were also refactored to use real resources instead of stubbed ones, and they reflect the implementation changes to instances. Paired-with: Richard Crowley <r@rcrowley.org>
| * | | | | | | | | | | | (#6527) Added pip package provider.Richard Crowley2011-03-221-0/+115
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Python's pip package manager is analogous to RubyGems and should be included in Puppet. Reviewed-by: Matt Robinson <matt@puppetlabs.com>
* | | | | | | | | | | | | Fix error "invalid multibyte char (US-ASCII)" under Ruby 1.9Matt Robinson2011-03-221-3/+3
|/ / / / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reviewed-by: Nick Lewis <nick@puppetlabs.com>
* | | | | | | | | | | | (#6555) Fix another ruby 1.9 incompatible case statementMatt Robinson2011-03-221-1/+1
| | | | | | | | | | | |
* | | | | | | | | | | | Fixed #6555 - Fixed two more when then colon issuesJames Turnbull2011-03-222-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ruby 1.9.x doesn't support when foo: Replaced in the launchd provider and the Oracle rails ORM
* | | | | | | | | | | | Fixed #6555 - Ruby 1.9.x returning Invalid next (SyntaxError)James Turnbull2011-03-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The kick application has the option to ping hosts. On 1.9.x this code was returning "Invalid next". The next in this code has been replaced with an exit. Testing has confirmed this doesn't change the behavior of puppet kick.
* | | | | | | | | | | | Fixed #6555 - Ruby 1.9.x warning: class variable access from toplevelJames Turnbull2011-03-221-3/+3
| |_|_|_|_|_|/ / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This came from the use of the @@colormap class variable. The variables has been changed to a constant.
* | | | | | | | | | | Merge branch '2.6.x' into nextMatt Robinson2011-03-1833-53/+333
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 2.6.x: (36 commits) Updated CHANGELOG for 2.6.7rc1 (#5073) Download plugins even if you're filtering on tags Fix #5610: Prevent unnecessary RAL lookups Revert "Merge branch 'ticket/2.6.x/5605' of git://github.com/stschulte/puppet into 2.6.next" (#6723) Fix withenv environment restoration bug (#6689) Remove extraneous include of Puppet::Util in InventoryActiveRecord Remove extra trailing whitespace from lib/puppet/resource.rb (#5428) More fully "stub" Puppet::Resource::Reference for use with storedconfigs (#6707) Fix typo in rest_authconfig.rb (#6689) Make inventory_active_record terminus search quickly (#5392) Give a better error when realizing a non-existant resource (#2645) Adding a less-stubby test to verify the "system" attribute's behavior Update CHANGELOG for 2.6.6 maint: Remove serialization of InventoryFact values maint: Rename InventoryHost to InventoryNode Fixed #2645 - Added support for creating system users maint: Remove spec run noise maint:Refactor of mount provider integration tests (#6338) Support searching on metadata in InventoryActiveRecord terminus (#6338) Implement search for InventoryActiveRecord facts terminus ... This merge includes essentially reverting #4904's change to the mount type since tests that came in from 2.6.x specified different behavior and what's correct is not clear to me. I've reopened #4904 and added it to our backlog, and talked to Nigel about the RFC that's currently out on the puppet-users mailing list for a bigger refactor of how the mount provider works. Manually Resolved Conflicts: spec/spec_helper.rb spec/unit/indirector/queue_spec.rb
| * | | | | | | | | | Updated CHANGELOG for 2.6.7rc1Matt Robinson2011-03-161-1/+1
| | | | | | | | | | |
| * | | | | | | | | | Merge branch 'ticket/2.6.next/5073' into 2.6.nextMatt Robinson2011-03-162-1/+9
| |\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ticket/2.6.next/5073: (#5073) Download plugins even if you're filtering on tags
| | * | | | | | | | | | (#5073) Download plugins even if you're filtering on tagsMatt Robinson2011-03-152-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we eval a resource in transaction.rb it was being skipped when filtering on tags and downloading the plugins. There's a lot of complicated conditions for whether to skip a resource, but this is a condensed version of the path that was causing plugins not to be downloaded. skip? missing_tags? !ignore_tags? !host_config The Puppet::Configurer::Downloader creates separate catalogs and applies them to get custom facts and plugins, so should be setting host_config to false. Puppet::Util::Settings also sets host_config to false when you call use on settings, while normal catalog application defaults to true. Thanks to Stefan Schulte <stefan.schulte@taunusstein.net> for suggesting the implementation fix.
| * | | | | | | | | | | Fix #5610: Prevent unnecessary RAL lookupsJesse Wolfe2011-03-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reviewed-By: Paul Berry <paul@puppetlabs.com>
| * | | | | | | | | | | Revert "Merge branch 'ticket/2.6.x/5605' of ↵Jesse Wolfe2011-03-153-15/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://github.com/stschulte/puppet into 2.6.next" This reverts commit 658bdb72bee3ad664627a71793213e6540afd5cb, reversing changes made to 4c9bd43bc2f5fde9d86196e8689dced929d39aad. See comment at http://projects.puppetlabs.com/issues/5605#note-9
| * | | | | | | | | | | Merge branch 'ticket/2.6.x/5605' of git://github.com/stschulte/puppet into ↵Jesse Wolfe2011-03-153-4/+15
| |\ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2.6.next
| | * | | | | | | | | | | (#5605) Prefetch doesnt work with composite keysStefan Schulte2010-12-233-4/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The uniqueness_key method of a type or resource object should return a key that can be used to identify this resource. In fact puppet seldomly uses this method and instead uses resource[:name] as an identifier. While this is totally fine for resourcetypes with a single key_attribute (and resource[:name] returning the namevar), it breaks things as soon as one creates a type with a composite key (prefetching for example is broken). To ease the process of replacing calls to resource[:name] to resource.uniqueness_key, the method uniqueness_key now just returns name_var if there is only one key_attribute (immitating self[:name]) and only returns an array of all the values of all the key_attributes if we have more than one key_attribute. The resourcehash which is passed to providers in their prefetch method is now build with uniqueness_key as the hashkey. Because of the new behaviour of uniqueness_key we hopefully wont break existing providers while allowing new providers for types with composite keys to implement correct prefetch methods.
| * | | | | | | | | | | | (#6723) Fix withenv environment restoration bugMax Martin2011-03-151-5/+4
| | |/ / / / / / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ensured that withenv properly restores the environment after it runs a block and added testing for the method. Reviewed-by: Matt Robinson and Daniel Pittman
| * | | | | | | | | | | Merge branch 'ticket/2.6.next/5428-handle-0.25.x-storedconfig-data' into ↵Jacob Helwig2011-03-151-18/+21
| |\ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2.6.next * ticket/2.6.next/5428-handle-0.25.x-storedconfig-data: Remove extra trailing whitespace from lib/puppet/resource.rb (#5428) More fully "stub" Puppet::Resource::Reference for use with storedconfigs Conflicts: lib/puppet/resource.rb
| | * | | | | | | | | | | Remove extra trailing whitespace from lib/puppet/resource.rbJacob Helwig2011-03-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Paired-with: Daniel Pittman <daniel@puppetlabs.com>
| | * | | | | | | | | | | (#5428) More fully "stub" Puppet::Resource::Reference for use with storedconfigsJacob Helwig2011-03-151-16/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Puppet::Resource::Reference class wasn't stubbing enough of the 0.25.x behavior to satisfy the needs of storedconfigs. Since P::R::Reference, and Puppet::Resource were merged as part of 2.6.x, we can pretend that P::Resource is P::R::Reference for the purposes of loading data from storedconfigs. This should still satisfy the over-the-wire serialization needs of 0.25.x. This also changes internal references to @parameters in Puppet::Resource(::Reference) to go through a parameters method. This allows us to "initialize" this instance variable lazily, since loading via YAML bypasses the normal initialize method. Paired-with: Daniel Pittman <daniel@puppetlabs.com> Reviewed-by: Markus Roberts <markus@puppetlabs.com>
| * | | | | | | | | | | | Merge branch 'ticket/2.6.next/6689' into 2.6.nextNick Lewis2011-03-151-1/+0
| |\ \ \ \ \ \ \ \ \ \ \ \ | | |_|_|/ / / / / / / / / | |/| | | | | | | | | | |
| | * | | | | | | | | | | (#6689) Remove extraneous include of Puppet::Util in InventoryActiveRecordNick Lewis2011-03-151-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was added while developing in order to benchmark, but wasn't removed before committing. Reviewed-By: Jacob Helwig
| * | | | | | | | | | | | Merge branch 'ticket/2.6.x/5662' of https://github.com/stschulte/puppet into ↵Jesse Wolfe2011-03-141-1/+3
| |\ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2.6.next Manually Resolved Conflicts: spec/unit/provider/mount/parsed_spec.rb
| | * | | | | | | | | | | | (#5662) Parsedfile doesnt work with mult keyattrStefan Schulte2010-12-231-1/+3
| | | |_|/ / / / / / / / / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When one wants to use the parsedfile provider for a type with more than one key_attribute (e.g. a type for entries in /etc/services with name and protocol as key_attributes) the provider will not store all key_attributes in property_hash and not all keyattributes will be visible in the to_line function. The create method of parsedfile will only put validproperties into the propertyhash. As result :name and all the other key_attributes will not be set. In the flush method however the :name parameter is put in the property_hash but the method does not handle other keyattributes. This patch modifies flush to put all key_attributes into the property hash (Note: @resource.name is basically just an alias for @resource[:name])
| * | | | | | | | | | | | Merge branch 'ticket/2.6.x/5661' of https://github.com/stschulte/puppet into ↵Jesse Wolfe2011-03-141-4/+4
| |\ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2.6.next
| | * | | | | | | | | | | | (#5661) Creating types dont work with >1 namevarStefan Schulte2010-12-231-4/+4
| | |/ / / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The methods [] and []= of type.rb are handling :name in a special way. When someone wants to access resource[:name] puppet tries to replace :name with the name_var. If the type has more than one key_attribute name_var is always returning false so we'll get the error Resource type <resourcetype> does not support parameter false This patch doesnt try to substitute :name if we dont have a single namevar, aka. we have more than one key_attribute
| * | / / / / / / / / / / (#6707) Fix typo in rest_authconfig.rbnfagerlund2011-03-141-1/+1
| | |/ / / / / / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "Where" -> "were." Capitalize "ACL."
| * | | | | | | | | | | (#6689) Make inventory_active_record terminus search quicklyNick Lewis2011-03-114-22/+16
| | |_|/ / / / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This terminus behaves the same on all supported DB platforms, by performing a limited portion of its query in SQL, and the rest of the comparison in Ruby. Its results are consistent with the YAML terminus. Paired-With: Jesse Wolfe
| * | | | | | | | | | Merge branch 'ticket/2.6.next/5392' into 2.6.nextMatt Robinson2011-03-091-4/+5
| |\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ticket/2.6.next/5392: (#5392) Give a better error when realizing a non-existant resource
| | * | | | | | | | | | (#5392) Give a better error when realizing a non-existant resourceMatt Robinson2011-03-091-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | You can reproduce the error with a simple manifest Bogus_type <| title == 'foo' |> We used to fail because find_resource_type returned nil and we never checked if it was nil before calling methods on it. Reviewed-by: Max Martin <max@puppetlabs.com>
| * | | | | | | | | | | Merge branch 'tickets/2.6.x/2645' into 2.6.nextJesse Wolfe2011-03-092-1/+17
| |\ \ \ \ \ \ \ \ \ \ \