summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Fixing failing Environment unit testsLuke Kanies2010-02-171-1/+1
| | | | Signed-off-by: Luke Kanies <luke@reductivelabs.com>
* Tuning file load orderLuke Kanies2010-02-172-0/+4
| | | | Signed-off-by: Luke Kanies <luke@reductivelabs.com>
* Removing obsolete Settings comments and requireLuke Kanies2010-02-171-3/+0
| | | | Signed-off-by: Luke Kanies <luke@reductivelabs.com>
* Adding an environment helperLuke Kanies2010-02-172-0/+38
| | | | Signed-off-by: Luke Kanies <luke@reductivelabs.com>
* Changing the interface of Puppet::ResourceLuke Kanies2010-02-176-16/+36
| | | | | | | | We need the ability to set the namespace and environment at initialization so the resource can look up qualified types. Signed-off-by: Luke Kanies <luke@reductivelabs.com>
* Partially fixing #2954 - Adding class parametersLuke Kanies2010-02-173-691/+709
| | | | | | | | This isn't 100% functional yet - I need to refactor some of the internals to make the class lookup work everywhere. Signed-off-by: Luke Kanies <luke@reductivelabs.com>
* Fixing test structureLuke Kanies2010-02-171-8/+8
| | | | Signed-off-by: Luke Kanies <luke@reductivelabs.com>
* Indirector/FileBucketFile warningsJesse Wolfe2010-02-171-8/+8
| | | | | Ruby was spewing warnings that there weren't enough parentheses. I have fixed this by adding parentheses.
* REST: Fix a state leak causing test failuresJesse Wolfe2010-02-171-0/+1
|
* REST FileBucket: REST barfs on relative pathsJesse Wolfe2010-02-173-2/+14
| | | | Force FileBucket to always send absolute (real) paths
* REST: hide Request objectJesse Wolfe2010-02-1717-52/+42
| | | | | | This change to the REST branch restores some sanity by explicitly allowing a destination URL for indirector save() calls, removing a hack that I was using to accomplish this.
* Feature #3394 REST runner, executionJesse Wolfe2010-02-177-31/+95
| | | | puppetrun uses REST to trigger puppet runs.
* Feature #3394 REST Runner, preparationJesse Wolfe2010-02-178-27/+24
| | | | Rename Puppet::Agent::Runner to Puppet::Run, for consistency
* Feature #3383 Part 2: Remove RAL XMLRPCJesse Wolfe2010-02-173-192/+2
| | | | | | | The XMLRPC interface for RAL resources was broken, and has been completely replaced by the REST interface. Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
* Feature #3383 RAL over RESTJesse Wolfe2010-02-1715-92/+311
| | | | | | | | ralsh --host works now, and is using REST. A node running puppetd --listen will allow ralsh to find, search, and modify live resources, via REST. Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
* Fix tests on #3347Jesse Wolfe2010-02-171-6/+6
|
* Feature #3347 REST-ified FileBucketJesse Wolfe2010-02-1735-706/+1078
| | | | | | | | | | | | | | | | FileBucket Files have been reimplemented as an indirector terminus so that they can be transmitted over REST. The old Network::Client.dipper has been replaced with a compatibility later in FileBucket::Dipper that uses the indirector to access filebucket termini. Slightly revised patch: * No longer allows nil contents in FileBucket outside of initialization * Uses File.exist? instead of the deprecated File.exists? * Tweaks JSON serialization and de-serialization to include "path" Deferred issues: * Feature #3371 "FileBucket should not keep files in memory". * Feature #3372 "Replace FileBucket Dipper with more idiomatic calls"
* Fix a failing test in #3115Jesse Wolfe2010-02-172-0/+16
| | | | Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
* Feature #3115 REST-ified status()Jesse Wolfe2010-02-1711-1/+236
| | | | | | | | | | | | | | | | | | This patch re-implements the status() remote procedure as a REST interface. A running server returns key-value pairs, currently the only implemented key is "is_alive" which will always be set to true. Some future tool will consume this by: Puppet::Status.indirection.terminus_class = :rest Puppet::Status.find('https://puppet:8140/production/status/default') Now with unit tests. plus fixes a typo. plus integration test and default security setting. plus tests suggested by Brice. Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
* Fix #3229 - use original value in case/selector regex matchingBrice Figureau2010-02-176-29/+18
| | | | | | | | | | | | | | | | | | | | | | | The issue is that case/selectors are downcasing the value before it is compared to the options. Unfortunately regex are matching in a case sensitive way, which would make the following manifest fail: $var = "CaseSensitive" case $var { /CaseSensitive/: { notice("worked") } default: { fail "miserably" } } This patch fixes the issue by making sure the regexp match is done one the original (not downcased) value, but still doing a case sensitive match. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Cleaning up a test.Luke Kanies2010-02-171-3/+3
| | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* Removing unused Checksum::File terminusLuke Kanies2010-02-172-172/+0
| | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* Converting File terminus to use formats.Luke Kanies2010-02-173-104/+145
| | | | | | | | | | This fixes most of #1943, except the checksum indirection still uses this. This basically always chooses the most recent file when finding files, and saves the file with the default format. Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixing datadir defaults to match new standardsLuke Kanies2010-02-171-1/+1
| | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* Adding client and server data dirsLuke Kanies2010-02-172-0/+12
| | | | | | | | These replace the yaml and file dirs, since in #1943 we're merging the file and yaml Terminus classes. Signed-off-by: Luke Kanies <luke@madstop.com>
* Adding filename extension support to formats.Luke Kanies2010-02-176-2/+30
| | | | | | | | This is toward fixing #1943 - we need the ability to easily convert between file extensions and file formats. Signed-off-by: Luke Kanies <luke@madstop.com>
* Resolving conflicts with ???Markus Roberts2010-02-175-6/+2
|
* Renaming Parser::ResourceType to Resource::TypeLuke Kanies2010-02-1730-189/+189
| | | | | | | | | | Basically, these classes (ResourceType and ResourceTypeCollection) don't really belong in Parser, so I'm moving them to the Resource namespace. This will be where anything RAL-related goes from now on, and as we migrate functionality out of Puppet::Type, it should go here. Signed-off-by: Luke Kanies <luke@reductivelabs.com>
* Removing Interpreter classLuke Kanies2010-02-1718-323/+79
| | | | | | | It's no longer necessary, given the new ResourceTypeCollection class. Signed-off-by: Luke Kanies <luke@reductivelabs.com>
* All non-transient parser references are goneLuke Kanies2010-02-1717-150/+201
| | | | | | | | | We now use references to the ResourceTypeCollection instances through the environment, which is much cleaner. The next step is to remove the Interpreter class. Signed-off-by: Luke Kanies <luke@reductivelabs.com>
* Fixing callers to Parser to only pass environmentLuke Kanies2010-02-175-8/+5
| | | | | | | We previously passed a hash of options but now just the environment. Signed-off-by: Luke Kanies <luke@reductivelabs.com>
* Using the RTC helper to find the known resource typesLuke Kanies2010-02-172-32/+31
| | | | | | | | | | We previously defined the method statically. This also renames the method to match how the environment thinks of them - known resource types, rather than resource type collection. Signed-off-by: Luke Kanies <luke@reductivelabs.com>
* Always warning if autoloading a file failsLuke Kanies2010-02-171-12/+4
| | | | | | | This stops hiding some really difficult to track down problems. Signed-off-by: Luke Kanies <luke@reductivelabs.com>
* Adding helper module for finding known resource typesLuke Kanies2010-02-172-0/+30
| | | | | | | This is so everyone doesn't have to define the same method everywhere. Signed-off-by: Luke Kanies <luke@reductivelabs.com>
* Moving Rails initialization to Compiler terminusLuke Kanies2010-02-174-31/+39
| | | | | | | It was previously handled by the Interpreter, but we're planning on getting of that. Signed-off-by: Luke Kanies <luke@reductivelabs.com>
* Parser now uses Environment resource type collectionLuke Kanies2010-02-172-53/+53
| | | | | | | | | This is the last step enabling us to make it so no one needs to maintain these references to the parser. Instead, everyone will just get access to the type collection from the Environment. Signed-off-by: Luke Kanies <luke@reductivelabs.com>
* Adding 'known_resource_types' to EnvironmentLuke Kanies2010-02-174-18/+202
| | | | | | | Each environment now has its own known collection of resource types, and it is responsible for caching as necessary. Signed-off-by: Luke Kanies <luke@reductivelabs.com>
* Renaming LoadedCode to ResourceTypeCollectionLuke Kanies2010-02-178-76/+92
| | | | Signed-off-by: Luke Kanies <luke@reductivelabs.com>
* Storing per-environment LoadedCode instancesLuke Kanies2010-02-175-34/+43
| | | | | | | | | | | | This will soon replace all of the env/parser mungling we have to do. A given process will only be able to have one collection of code per environment in memory. This is somewhat limiting, in theory, but some global means of looking up code collection (LoadedCode instances) must exist for the pure ruby stuff to work. Signed-off-by: Luke Kanies <luke@reductivelabs.com>
* Removing old, never-used DSL codeLuke Kanies2010-02-172-490/+0
| | | | Signed-off-by: Luke Kanies <luke@reductivelabs.com>
* Adding support for parsing ruby filesLuke Kanies2010-02-172-2/+31
| | | | | | | This doesn't work without the later commits - it just relies on Ruby to read in Ruby files. Signed-off-by: Luke Kanies <luke@reductivelabs.com>
* Fixing test structureLuke Kanies2010-02-171-4/+4
| | | | Signed-off-by: Luke Kanies <luke@reductivelabs.com>
* Adding []/[]= support to Parser::ResourceLuke Kanies2010-02-172-0/+14
| | | | Signed-off-by: Luke Kanies <luke@reductivelabs.com>
* Fix for #3366 - --tags '' treated as boolean 'true'Markus Roberts2010-02-172-4/+21
| | | | | This is the patch from Mike Pountney <Mike.Pountney@gmail.com> off the list with the additional test Luke requested.
* Fix for #3424 and tests to prove it.Markus Roberts2010-02-172-4/+44
| | | | | | | | The original pure ruby yaml patch missed some edge cases; specifically, classes that were modified by the syck version to directly call it and thus never reached the pure ruby version. This adds monkey patches to all of those case which we might reasonably care about (omitting, for example, calls within the syck version to itself) and tests which show that the monkey patch works.
* Fix for #2604 Pure Ruby yaml generationMarkus Roberts2010-02-172-0/+343
| | | | | | | | This patch brings in a pure ruby yaml generation library, analagous to what we did with JSON/PSON, but without the renaming dodge we had to do in that case to avoid fighting with Rails. Signed-off-by: Markus Roberts <Markus@reality.com>
* Fixes #3113 - When importing a manifest puppet needs to chillMarkus Roberts2010-02-171-2/+4
|
* Fix for #3412 install.rb should not put "." first in the tmp_dirsMartin Englund2010-02-171-1/+1
| | | | Signed-off-by: Martin Englund <martin@englund.nu>
* Resolving conflicts with testingMarkus Roberts2010-02-171-1/+5
| | | | | | | | | | | | | | | | Jesse writes: ethanrowe:tickets/master/2239 leaks state in the spec. After the spec is run, Puppet::Application is left in a :restart_requested state, and several important behaviors, particularly Puppet::Transaction#evaluate are disabled. It's order dependent, so changing the mtime of spec files makes the failures appear and disappear. This spec file was generally pretty good about keeping state from getting out, but one test was missing a stub for a dangerous call. I wouldn't be surprised if this cleared up other errors in testing.
* Fix 2239 (step five): introduce new Puppet::Transaction#stop_processing? ↵Ethan Rowe2010-02-172-0/+57
| | | | flag and associated check thereof within the resource evaluation code. This should allow for the transaction to bail out of its processing if it finds that a stop has been requested, based on the state of Puppet::Application.stop_requested?.