summaryrefslogtreecommitdiffstats
path: root/lib/puppet/resource
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch '2.7.x'Nick Lewis2011-07-251-3/+6
|\ | | | | | | | | | | Conflicts: lib/puppet/type/file/source.rb spec/unit/resource/catalog_spec.rb
| * Merge branch '2.6.x' into 2.7.xNick Lewis2011-07-251-3/+6
| |\
| | * (#8596) Detect resource alias conflicts when titles do not matchNick Lewis2011-07-251-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The introduction of composite namevars caused the resource title used in resource aliases to be set as an array, even when the resource only had one namevar. This would fail to conflict with non-alias entries in the resource table, which used a string for the title, even though the single element array contained the same string. Now, we flatten the key used in the resource table, so that single element arrays are represented as strings, and will properly conflict with resource titles. Paired-With: Jacob Helwig <jacob@puppetlabs.com>
* | | Remove caching from the catalog, types, and parametersNick Lewis2011-07-211-20/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Types and parameters were registering their catalog as their expirer, so that the catalog could expire them between uses. However, because catalogs are never reused (and neither are types or parameters), there is no need to expire anything. Thus, we remove the entire cleanup/expire logic from catalog, type, and parameter. Reviewed-By: Jacob Helwig <jacob@puppetlabs.com>
* | | Fixing default parameter value assignmentLuke Kanies2011-07-151-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The method for adding class resources to the catalog was only working in cases where the default values weren't AST objects. This commit fixes this, along with the tests that were failing and drew out the problem. Signed-off-by: Luke Kanies <luke@puppetlabs.com> Reviewed-by: Nick Lewis <nick@puppetlabs.com>
* | | Resource type defaults cleanupLuke Kanies2011-07-151-19/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is again done to make support for hiera easier. The way we were handling lookup of resource defaults was over-complicated. This does a decent bit of cleanup overall, but primarily focused on resource type defaults and how they get set during compilation. Signed-off-by: Luke Kanies <luke@puppetlabs.com> Reviewed-by: Nick Lewis <nick@puppetlabs.com>
* | | Adding []/[]= support to ScopeLuke Kanies2011-07-151-8/+8
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The interface to scope is much clearer this way anyway, but this is needed to integrate Puppet with Hiera[1]. It just provides hash-like behavior to Scope, which Hiera and others can now easily rely on. I also went through all of the code that used Scope#lookupvar and Scope#setvar and changed it if possible, and at the same time cleaned up a lot of tests that were unnecessarily stubbing (and thus making it difficult to tell if I had actually broken anything). 1 - https://github.com/ripienaar/hiera Signed-off-by: Luke Kanies <luke@puppetlabs.com> Reviewed-by: Nick Lewis <nick@puppetlabs.com>
* | Merge branch '2.6.x' into 2.7.xJacob Helwig2011-06-281-3/+9
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 2.6.x: (#7956) Porting cron tests (#7956) Port resource acceptance tests Readying for release of 2.6.9 (#6854) Update Red Hat spec file Bumping release in lib/puppet.rb and updating CHANGELOG. Bumping RPM spec file to 2.6.9rc1. (#7506) Organize READMEs; specify supported Ruby versions in README.md (#6418) Make test 64118 more portable (#7127) Stop puppet if a prerun command fails Do not needlessly create multiple reports when creating a transaction (#4416) Ensure types are providified after reloading (#4416) Always remove old provider before recreating it Cleanup indentation, comment, and unused code Conflicts: CHANGELOG README.md conf/redhat/puppet.spec lib/puppet.rb lib/puppet/transaction.rb spec/unit/configurer_spec.rb spec/unit/transaction_spec.rb
| * (#7127) Stop puppet if a prerun command failsJosh Cooper2011-06-101-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this change there were several problems with pre and post run commands, logging, and sending of reports. 1. If a prerun command failed, puppet would attempt to apply the catalog. Now puppet will not apply the catalog, but it will run the postrun command and send the report (as it did before). 2. If a postrun command failed, puppet would not send the report. Sending the report is now in an outer ensure block from the postrun command, so postrun failures won't prevent the report from being sent. 3. Errors, e.g. Puppet.err, occuring during the prepare step, which which includes plugin/fact download and prerun commands were not appended to the report. Now the report log destination is registered as early as possible, and unregistered as late as possible to ensure Configurer errors that occur in the run method are included in the report. 4. The transaction was closing the Configurer's report destination out from underneath it. As a result, postrun errors were not included in the report. Paired-with: Nick Lewis <nick@puppetlabs.com> Reviewed-by: Jacob Helwig <jacob@puppetlabs.com>
| * Do not needlessly create multiple reports when creating a transactionJosh Cooper2011-06-101-2/+1
| | | | | | | | | | | | | | | | | | | | Previously, the transaction would always create a report, which would some times be overridden with a new report. Now, the transaction optionally takes a report at initialization time, and only creates a report of its own if none was provided. Reviewed-by: Jacob Helwig <jacob@puppetlabs.com>
* | Fix #7084 Make the log messages produced by whits less confusingJesse Wolfe2011-04-211-7/+7
| | | | | | | | | | | | | | | | | | | | | | This patch changes the logging behavior of Whits so that instead of talking about whits directly, we refer to the Class, Stage, or recursive resource that they are sentinals for. In the case where a "completion" Whit is notified by a resource, getting a notification at all is counterinutitive, so I've changed the output to a "debug"-priority message that describes what's happening. Reviewed-By: Nick Lewis <nick@puppetlabs.com>
* | Merge remote-tracking branch 'community/feature/puppet-device' into 2.7.xPieter van de Bruggen2011-04-181-0/+1
| | | | | | | | Reviewed-By: Mike Stahnke
* | (#6928) Add a Parser face with Validate actionNick Lewis2011-04-131-0/+1
| | | | | | | | | | | | | | This will accept a number of manifests as arguments and check their syntax. If no filenames are specified, it will check the default 'manifest' setting. Paired-With: Jesse Wolfe
* | Step towards #5027 -- scopes should know if they are dynamicMarkus Roberts2011-04-121-10/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The logic for distinguishing dynamic / static scopes was borrowed from Nick & Paul's patch, the main differences here being 1) calling it "dynamic" (true/ false) rather than "parent_relationship" (:inherited/:dynamic) 2) aligning the default so that it only needs to get set in one place (the one that will eventually go away) and 3) setting it on createion rather than with a setter. Setting it in one place, on creation, also makes it easier to see that anytime we access a scope it will have the correct setting of Scope#dynamic and that this does not change. This commit also contains a minor refactor (removing Type#subscope) that is not strictly tied to the main purpose but lies in the direction we are needing to go and it simplified things to do it now.
* | Merge branch '2.6.x' into nextMax Martin2011-04-071-0/+5
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 2.6.x: (maint) Indentation fixes (#6490) Add plugin initialization callback system to core Fix #4339 - Locally save the last report to $lastrunreport Fix #4339 - Save a last run report summary to $statedir/last_run_summary.yaml Fixed #3127 - removed legacy debug code Fixed #3127 - Fixed gem selection regex (#5437) Invalidate cached TypeCollection when there was an error parsing (#6937) Adjust formatting of recurse's desc (#6937) Document the recurse parameter of File type. (#6893) Document the cron type in the case of specials. (#5670) Don't trigger refresh from a failed resource Fixed #6554 - Missing $haveftool if/else conditional in install.rb breaking Ruby 1.9 Conflicts (Manually resolved): lib/puppet/application/agent.rb lib/puppet/application/apply.rb lib/puppet/configurer.rb lib/puppet/resource/type_collection.rb lib/puppet/type/file.rb spec/integration/configurer_spec.rb spec/unit/application/agent_spec.rb spec/unit/application/apply_spec.rb spec/unit/configurer_spec.rb spec/unit/indirector/report/yaml_spec.rb spec/unit/resource/type_collection_spec.rb Paired-with: Nick Lewis
| * (#5437) Invalidate cached TypeCollection when there was an error parsingJacob Helwig2011-04-011-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | The caching of the TypeCollection in Puppet::Node::Environment would cause parse errors to occur (and be reported) only once and never again, until the file had changed on disk. This would also cause empty catalogs to be sent down to the agents further hiding the problem. Now, when a file fails to parse, it will be re-parsed every time on every following compilation, causing the parse error to be reported every time, and preventing sending down empty catalogs to agents. Paired-with: Nick Lewis <nick@puppetlabs.com>
| * (#5477) Allow watch_file to watch non-existent files, especially site.ppJesse Wolfe2011-03-251-1/+0
| | | | | | | | | | | | | | | | | | | | | | The watch_file mechanism would refuse to monitor paths to files that didn't exist. This patch makes it possible to watch a file that hasn't been created yet, so when it is created, you manifests will get reparsed. Backported this change to 2.6.x Paired-With: Jacob Helwig <jacob@puppetlabs.com>
* | (5200) -- replace containers with sentinalsMarkus Roberts2011-04-061-1/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit removes the last remaining use of topsort (in SimpleGraph#splice!) by fixing #5200 in a way that is compatible with graph fontiers. Instead of replacing containers with many-to-many relationships, we now replace them with a pair of sentinals (whits) that bracket them. Thus a graph consisting of two containers, each containing ten resources, and a dependency between the containers, which would have gone from 21 edges to 100 edges will instead have only 43, and a graph consisting of two containers (e.g. stages) each containing a similar graph, which would have gone from 45 edges to 400 will only go to 95. This change had minor consequences on many parts of the system and required lots of small changes for consistancy, but the core of it is in Catelog#splice! (which replaces SimpleGraph#splice!) and Transaction#eval_generate. Everything else is just adjustments to the fact that some one-step edges are now two-step edges and tests, event propagation, etc. need to reflect that. Paired-with: Jesse Wolfe
* | (6911) Refactor to localize eval_generate dependency assumptionsMarkus Roberts2011-03-311-23/+19
| | | | | | | | | | | | | | | | | | To implement #6911 we will need to be able to make incremental descisions about order of application based only on the contents of the resource graph and local "working data." This commit begins to pull the needed structure into a method (visit_resources) while, for the moment, maintaining the original semantic. Paired-with: Jesse Wolfe
* | Fixed #6850 - Clean up ResourceType#to_psonLuke Kanies2011-03-251-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge branch '2.6.x' into nextMatt Robinson2011-02-021-16/+24
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
| * Merge branch 'feature/master/5061' into 2.6.nextPaul Berry2011-02-011-13/+13
| |\ | | | | | | | | | | | | * feature/master/5061: (#5061) - allow special hostclass/define variables to be evaluated as defaults.
| | * (#5061) - allow special hostclass/define variables to be evaluated as defaults.Dan Bode2011-02-011-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I have always been annoyed that special variables for defines and hostclasses can not be evaluated as param defaults. Special variables are: $name, $title, $module_name. Code example: class x ( foo = $name ) { notice($foo)} should print x, and with my patch, it does. Reviewed-by: Paul Berry <paul@puppetlabs.com>
| * | (#5045) Cleaning up some tests and codeMatt Robinson2011-01-241-6/+6
| | | | | | | | | | | | | | | | | | | | | Renamed some variables to be clearer, made tests use less stubbing, added some additional tests and got rid of some unecessary logic. Paired-with: Dan Bode
| * | (#5045) Adds support to resource/type to also accept a param hashDan Bode2011-01-241-3/+11
| |/ | | | | | | | | | | | | | | The params are added as attributes when the resource is created. Also, even if the class already exists, if params are passed, we still try to create it. Reviewed-by: Matt Robinson
* | Merge branch '2.6.x' into nextMatt Robinson2011-01-191-1/+3
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 2.6.x: (21 commits) (#5900) Include ResourceStatus#failed in serialized reports (#5882) Added error-handling for bucketing files in puppet inspect (#5882) Added error-handling to puppet inspect when auditing (#5171) Made "puppet inspect" upload audited files to a file bucket Prep for #5171: Added a missing require to inspect application. Locked Puppet license to GPLv2 (#5838) Support paths as part of file bucket requests. (#5838) Improve the quality of file bucket specs. (#5838) Make file bucket dipper efficient when saving a file that already exists (#5838) Implemented the "head" method for FileBucketFile::File terminus. (#5838) Reworked file dipper spec to perform less stubbing. (#5838) Added support for HEAD requests to the indirector. (#5838) Refactored error handling logic into find_in_cache. (#5838) Refactored Puppet::Network::Rights#fail_on_deny maint: Remove unused Rakefile in spec directory (#5171) Made filebucket able to perform diffs (#5710) Removed unnecessary calls to insync? Prep for fixing #5710: Refactor stub provider in resource harness spec Maint: test partial resource failure maint: Inspect reports should have audited = true on events ... Manually Resolved Conflicts: lib/puppet/file_bucket/dipper.rb lib/puppet/indirector.rb lib/puppet/network/rest_authconfig.rb spec/unit/file_bucket/dipper_spec.rb spec/unit/file_bucket/file_spec.rb spec/unit/indirector_spec.rb
| * (#5900) Include ResourceStatus#failed in serialized reportsNick Lewis2011-01-141-1/+2
| | | | | | | | | | | | | | | | | | This property was excluded from serialization because it was believed that its value could be determined by looking at the events of a ResourceStatus. However, if a resource can't be retrieved, it will have no events created, and will have no other way of determining its status. Reviewed-By: Paul Berry
| * Maint: Added "skipped" to the YAML output for Puppet::Resource::StatusPaul Berry2011-01-061-1/+2
| | | | | | | | | | | | In 2.6.4 and earlier, "skipped" appeared only when true. A recent change accidentally caused it to never appear. This change makes it always appear.
* | Merge branch '2.6.x' into nextNick Lewis2011-01-062-3/+26
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: Rakefile lib/puppet/resource/type_collection.rb lib/puppet/simple_graph.rb lib/puppet/transaction.rb lib/puppet/transaction/report.rb lib/puppet/util/metric.rb spec/integration/indirector/report/rest_spec.rb spec/spec_specs/runnable_spec.rb spec/unit/configurer_spec.rb spec/unit/indirector_spec.rb spec/unit/transaction/change_spec.rb
| * maint: Prune #inspect methods on various objectsJesse Wolfe2011-01-031-0/+4
| | | | | | | | | | | | | | | | | | | | Ruby's default #inspect method can lead to printing factorial-order output for large graphs of objects. Since we have large graphs of objects, this is not optimal. This patch replaces a few well-connected objects' #inspect methods with methods that produce reduced output, and are thus much faster. Paired-With: Nick Lewis <nick@puppetlabs.com>
| * (#5715) Added attributes resource_type and title to Puppet::Resource::Status.Paul Berry2010-12-301-2/+4
| | | | | | | | | | These new attributes save report processors from having to parse the "resource" attribute.
| * (#5715) Removed attribute source_description from the YAML representation ofPaul Berry2010-12-301-0/+6
| | | | | | | | | | | | | | Puppet::Resource::Status. This attribute is only used for properly generating log messages and was never intended to appear in reports.
| * (#5715) Make certain report attributes always present.Nick Lewis2010-12-301-0/+2
| | | | | | | | | | | | | | The attributes Puppet::Resource::Status#changed, Puppet::Resource::Status#out_of_sync, and Puppet::Transaction::Event#audited used to only appear in reports when their state was true. Now they appear always.
| * (#5715) Removed redundant attribute Resource::Status#versionPaul Berry2010-12-301-2/+2
| |
| * (#5715) Removed Resource::Status#skipped_reason. It was never used.Paul Berry2010-12-301-1/+1
| |
| * Modified the behavior of Puppet::Resource::Status as follows:Paul Berry2010-12-171-4/+9
| | | | | | | | | | | | | | | | | | | | - #change_count now only counts events that represent successful changes. It does not count failures, audits, or noops. - #changed is equivalent to #change_count > 0. - #out_of_sync_count (a new attribute) counts all events except audits. - #out_of_sync is equivalent to #out_of_sync_count > 0. This should hopefully make the summary statistics in reports more useful.
| * (#5408) Reworked ResourceHarness so that code is clearer and all behaviors ↵Paul Berry2010-12-171-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | are tested This patch removes the Puppet::Transaction::Change class and replaces it with a method, Puppet::Transaction::ResourceHarness#apply_parameter. The new code is shorter, more thoroughly unit tested, and addresses known bugs in the interaction between auditing and performing changes. This code does not address drawbacks in the report output (for example a resource is still flagged as changed even if it merely contains audit information); those will be addressed in a follow-up patch.
| * [#5081] Revert "Fix #4349 - Parsing with ignoreimport=true was always ↵Matt Robinson2010-12-011-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | loading site.pp" The fix for #4349 caused --parse-only not to detect syntax errors when --ignore-import was used by adding a return statement that bypassed the initial import: commit 760e418d254a8d2198d2c6eb466d783a5930ef47 def perform_initial_import + return if Puppet.settings[:ignoreimport] The problem that #4349 fixed was more generally fixed in commit 99c1019e1d3402ec8e476dc859d5aaef82ec4f69 for ticket #4798 so the return statement is no longer needed, so reverting the commit for #4349 does not reintroduce the problem of an import loop error when running puppet doc. Paired-with: Jesse Wolfe
* | Merge commit '2.6.3rc2' into nextPaul Berry2010-11-091-13/+18
|\| | | | | | | | | | | Manually resolved conflicts: lib/puppet/parser/ast/resource.rb spec/unit/parser/ast/resource_spec.rb
| * (#4534/#4778) -- Normalize parameterized classesPaul Berry2010-10-271-13/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a reconciliation/melding of Paul's (#4534) Class inheritance with parameterized classes is no longer ignored and Markus's Fix for #4778 -- evaluate parameterized classes when they are instantiated Extracted the code from Resource::Type#mk_plain_resource that evaluates parents and tags the catalog, and moved that into a new method called instantiate_resource. Instantiate_resource is now also called from Parser::Ast::Resource#evaluate, so that the notation "class { classname: }" now executes this code too. Likewise adds class evaluation so that it behaves the same (with regard to lazy / strict evaluation) as include classname
* | Merge commit '2.6.1' into nextJesse Wolfe2010-09-131-2/+7
|\|
| * Fix for #4736 -- preserve case of defined resourcesMarkus Roberts2010-09-101-2/+7
| | | | | | | | | | | | This restricts the change introduced in #4691 to hostclasses, and leaves defined resources and nodes alone, thus more closely mimicing the 0.25.x behaviour. It also includes title, as this was similarly affected.
* | Merge commit '2.6.1rc4' into nextJesse Wolfe2010-09-131-1/+1
|\|
| * Minimal fix for #4691 -- class name uppercased in $nameMarkus Roberts2010-09-071-1/+1
| | | | | | | | | | | | The class name is now stored internally with an initial capital, which changed the contents of $name in a way that broke some manifests. This fix stores the downcased version in $name.
* | Merge commit '2.6.1rc3' into nextJesse Wolfe2010-08-271-0/+1
|\|
| * Fix for #4518 -- classes not getting added to compiler.classesMarkus Roberts2010-08-211-0/+1
| | | | | | | | | | | | | | The responsibility for adding classes to the compiler's classes list (for use in constructing classes.txt) moved around a bit in the 0.25 to 2.6 transition before being dropped in a merge conflict resolution. Ooops. This restores it, and adds tests to prevent regression.
| * [#4397]+[#4344] Move type-name resolution out of Puppet::Resource into the ↵Jesse Wolfe2010-08-031-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | AST resources. Move type-name resolution out of Puppet::Resource into the AST resources. Move find_resource_type out of Puppet::Resource into Scope Thus, never pass unqualified type names to Puppet::Resource objects. Thus, Puppet::Resource objects don't need the namespace property, and Puppet::Resource objects never consult the harddrive to look for .pp files that might contain their type definitions, Thus, performance is improved. Also removes the temporary fix for #4257 that caused #4397 (The code was too eager to look for a class in the topscope) Paired-With: Paul Berry <paul@puppetlabs.com> Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
* | [#4496]+[#4521]+[#4522] Add structures to the AST to represent type ↵Paul Berry2010-08-132-10/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | definitions (classes, definitions, and nodes). Previously, type definitions were not represented directly in the AST. Instead, the parser would instantiate types and insert them into known_resource_types as soon as they were parsed. This made it difficult to distinguish which types had come from the file that was just parsed and which types had been loaded previously, which led to bug 4496. A side-effect of this change is that the user is no longer allowed to define types inside of conditional constructs (such as if/else). This was allowed before but had unexpected semantics (bugs 4521 and 4522). It is still possible, however, to place an "include" statement inside a conditional construct, and have that "include" statement trigger the autoloading of a file that instantiates types.
* | Moved perform_initial_import from Puppet::Resource::TypeCollection to ↵Paul Berry2010-08-131-18/+0
| | | | | | | | | | | | | | | | | | | | | | | | Puppet::Node::Environment. This change is part of an ongoing effort to remove functionality from TypeCollection that is not related to keeping track of a collection of types. This reduces TypeCollection's linkage to the environment, which is a step toward decoupling it from the type loading mechanism. Also, added a spec test to verify that TypeCollection.version is correctly recomputed when types are re-imported.
* | [#4472]+[#4483] Moved type-name resolution out of Puppet::Parser::TypeLoader.Paul Berry2010-08-121-45/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Moved type-name resolution out of Puppet::Parser::TypeLoader, and into its primary client, Puppet::Resource::TypeCollection. TypeCollection now always passes fully qualified type names to TypeLoader. This avoids duplicate type-name resolution logic between TypeLoader and TypeCollection. That in turn fixes bug 4472, which resulted from flaws in the type-name resolution logic in TypeLoader. In addition, it fixes bug 4483, which resulted from improper interleaving between looking up names using the TypeCollection and the TypeLoader.