summaryrefslogtreecommitdiffstats
path: root/lib/puppet/external
Commit message (Collapse)AuthorAgeFilesLines
* Fix for #2995 (don't fail to load PSON when UTF-8 missing)Markus Roberts2009-12-301-1/+1
| | | | | | We don't actually rely on iconv's UTF-8 support, so its absence shouldn't cause the PSON feature to fail on system (e.g. HPUX) where it isn't fully implemented.
* Ticket #2770 (deserializing Exec[...]s with "\n"s)Markus Roberts2009-11-121-2/+2
| | | | | | | | | | | The resource reference logic wasn't handling resources with "\n"s in their namevars gracefully, and detection of this was complicated by infelicitous exception reporting. Note that this patch will require a merge when combined with the patch for #2657. Signed-off-by: Markus Roberts <Markus@reality.com>
* Fix #2757 & CSR 92 (symlinks in recursively managed dirs)Markus Roberts2009-11-051-1/+1
| | | | | | | | | | | | | | | | | | The fundemental problem was that, despite what the comment said, the early bailout for file content management only applied to directories, not to links. Making links bail out at as well fixed the problem for most users. However, it would still occur for users with mixed ruby version system since there were no to_/from_pson methods for file metadata. So the second (and far larger) part of this patch adds metadata pson support. The testing is unit level only, as there's no pratical way to do the cross-ruby-version acceptance testing and no benifit to doing "integration" testing short of that. Signed-off-by: Markus Roberts <Markus@reductivelabs.com>
* Bundling of pure ruby json lib as "pson"Markus Roberts2009-10-175-0/+1150
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bundeling and renaming the pure ruby json library to addresses a number of cross version serliaization bugs (#2615, et al). This patch adds a subset of the files from the json_pure gem to lib/puppet/external/pson (renamed to avoid conflicts with rails) so that we will always have a known-good erialization format available. The pure ruby json gem as distibuted defers to the compiled version if it is installed. This is problematic in some circumstances so the files that have been brought over have been modified to always and only use the bundled version. It's a large patch, so here's a breakdown of the change categories: The majority of the lines are only marginally interesting: * The json lib itself (in lib/puppet/external/pson) make up the bulk of the lines. * Renaming of json to pson make up the second largest group. Somewhat more interesting are the following, which can be located by searching the diffs for the indicated strings: * Adjusting tests to reflect the changes * Changing the encoding/decoding behavior so that nested structures (e.g. resources) don't serialize as escaped strings. This should make it much easier to process the results with external tools, if needed. Search for "to_pson" and "to_pson_data_hash" * Cleaning up the envelope/metadata * Now provides a document_type (as opposed to a ruby class name) by using a symple registration scheme instead of constant lookup (search for "document_type") * Added an api_version (search for "api_version") * Added a hash for document metadata (search for "metadata") * Removing the yaml monkeypatch and instead disabling yaml serialization on ruby 1.8.1 in favor of pson (search for "yaml") * Cleaning up the json/rails feature interaction (they're now totally independent) (search for "feature")
* Fixed #2634 - Added servicegroup_name parameter to serviceescalation typeJames Turnbull2009-09-151-3/+4
|
* Removed extra whitespace from end of linesIan Taylor2009-06-065-20/+20
|
* Changed indentation to be more consistent with style guide (4 spaces per level)Ian Taylor2009-06-064-990/+990
|
* Changed tabs to spaces without interfering with indentation or alignmentIan Taylor2009-06-063-117/+117
|
* Revert "Refixing #1420 - _naginator_name is only used for services"Luke Kanies2009-02-131-10/+15
| | | | | | | | This reverts commit efb5cc50c42bc27aec9409e723e3a717ed58c0a8. Conflicts: CHANGELOG
* Fixing #1543 - Nagios parse errors no longer kill PuppetLuke Kanies2009-02-112-64/+43
| | | | | | | | | | | | | | | | The problem wasn't actually transactions, it was how exceptions were raised in Naginator. Well, parse errors actually resulted in an 'exit', rather than an exception, and the exceptions that Naginator was raising were not caught by a normal begin block (SyntaxError, rather than RuntimeError). This commit raises a RuntimeError-derived error rather than exiting. It also adds some context to the error when Puppet catches it. Signed-off-by: Luke Kanies <luke@madstop.com>
* Refixing #1420 - _naginator_name is only used for servicesLuke Kanies2009-02-111-15/+10
| | | | | | | | | | | | | | | | | According to: http://nagios.sourceforge.net/docs/3_0/customobjectvars.html the special underscore parameters are only supported on hosts, contacts, and services. This commit reverts most of the changes that set Nagios types to use such a parameter as the namevar. The original commit should have been broken into two commits: one to reorganize the file, and the other to make these changes. As it was, the revert was much harder than it should have been. Signed-off-by: Luke Kanies <luke@madstop.com>
* Add a unique name to objects so we can determine uniqueness when read back inJohn Ferlito2008-12-091-1/+2
| | | | | | | | | | | | | | | | | The nagios object definitions have been updated to correlate with Nagios 3.0.6. In Nagios it is possible to have multiple service checks with the same service_description. eg I could have an check with a service_description of 'SSH' for multiple hosts. So in puppet we can't use it as a unique name for the resource. This patch modifies the code to use $name as the unique name. For some types eg command_name $name ends up in the config and thus we can tell which puppet resources match to which nagios ones. For other types like service there is no direct mapping from $name to a nagios attibute. So we use a custom attribute called _naginator_name. Signed-off-by: John Ferlito <johnf@inodes.org>
* Add a unique name to objects so we can determine uniqueness when read back inJohn Ferlito2008-12-091-71/+113
| | | | | | | | | | | | | | | | | The nagios object definitions have been updated to correlate with Nagios 3.0.6. In Nagios it is possible to have multiple service checks with the same service_description. eg I could have an check with a service_description of 'SSH' for multiple hosts. So in puppet we can't use it as a unique name for the resource. This patch modifies the code to use $name as the unique name. For some types eg command_name $name ends up in the config and thus we can tell which puppet resources match to which nagios ones. For other types like service there is no direct mapping from $name to a nagios attibute. So we use a custom attribute called _naginator_name. Signed-off-by: John Ferlito <johnf@inodes.org>
* Changed some non-standard Ruby locations to env ruby shebangsJames Turnbull2008-04-041-1/+1
|
* Add a bunch of directives, allows a full parse of stanford's huge nagios configBlake Barnett2008-03-281-46/+60
| | | | Also reformatted a bit
* Fixing #982 -- I have completely removed the GRATR graph libraryLuke Kanies2008-01-0720-2537/+0
| | | | from the system, and implemented my own topsort method.
* Adding the first round of Nagios code. There are noLuke Kanies2007-12-275-0/+1484
| | | | | | | tests here, but at least a single Nagios type is functional. Now I need to do some metaprogramming so this works for all nagios types, and add tests for the whole thing.
* Removing the Id tags from all of the filesLuke Kanies2007-10-032-2/+0
|
* Applying patches from Valentin Vidic to fix open file discriptor and open ↵luke2007-06-051-0/+4
| | | | | | port problems git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2553 980ebf18-57e1-0310-9a29-db15c13687c0
* Moving code from external sources into an external/ directoryluke2007-01-3026-0/+3890
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2119 980ebf18-57e1-0310-9a29-db15c13687c0