]>
gitweb.fluxo.info Git - puppet-stdlib.git/log
Bryan Jen [Wed, 16 Mar 2016 20:57:36 +0000 (13:57 -0700)]
(maint) Fixes fqdn_rand_string tests
Puppet 4.4.0 and later has changed fqdn_rand to use a higher ceiling
(PUP-5646), the tests for fqdn_rand_string needed to be updated to
reflect the new expected output.
Hunter Haugen [Tue, 15 Mar 2016 23:48:50 +0000 (16:48 -0700)]
Merge pull request #577 from EmilienM/enclose_ipv6
Add enclose_ipv6 function
Emilien Macchi [Sun, 13 Mar 2016 22:20:49 +0000 (18:20 -0400)]
Add enclose_ipv6 function
Copy a function from puppetlabs/apache, created by Benedikt Bock by
55cc3b4e8f4bc859a1255cb57be2c7923005d822 .
This function enclose IPv6 addresses in square brackets.
It takes an array of ip addresses and encloses the ipv6 addresses with
square brackets.
Co-Authored-By: Benedikt Bock <benedikt_bock@web.de>
Hunter Haugen [Thu, 18 Feb 2016 18:32:25 +0000 (10:32 -0800)]
Merge pull request #570 from gfidente/master
Add is_ipv4_address and is_ipv6_address functions
TP Honey [Thu, 18 Feb 2016 15:47:04 +0000 (15:47 +0000)]
Merge pull request #575 from guessi/extend_base64_function_support
Extend Base64() function support
guessi [Wed, 17 Feb 2016 09:00:41 +0000 (17:00 +0800)]
Extend Base64() function support
Hunter Haugen [Tue, 16 Feb 2016 20:26:51 +0000 (12:26 -0800)]
Merge pull request #573 from Yelp/pl-dig
Add dig function
TP Honey [Tue, 16 Feb 2016 18:53:34 +0000 (18:53 +0000)]
Merge pull request #574 from DavidS/fm-4046-update-msync
(FM-4046) Update to current msync configs [
006831f ]
David Schmitt [Tue, 16 Feb 2016 16:01:13 +0000 (16:01 +0000)]
(FM-4046) Update to current msync configs [
006831f ]
This moves all copyright statements to the NOTICE file in accordance with the ASFs guidelines on applying the Apache-2.0 license.
Maksym Melnychok [Mon, 8 Feb 2016 15:50:35 +0000 (07:50 -0800)]
Add dig() function
Deprecates #try_get_value()
Hunter Haugen [Wed, 27 Jan 2016 16:36:03 +0000 (08:36 -0800)]
Merge pull request #569 from DavidS/fm-4049-update-msync
(FM-4049) update to modulesync_configs
David Schmitt [Mon, 25 Jan 2016 14:19:19 +0000 (14:19 +0000)]
(FM-4049) Update to current msync configs [
2c99161 ]
Giulio Fidente [Fri, 22 Jan 2016 16:55:03 +0000 (17:55 +0100)]
Add is_ipv4_address and is_ipv6_address functions
These are useful when making decisions based on the type of IP
address received.
JT (Jonny) [Wed, 20 Jan 2016 15:35:00 +0000 (15:35 +0000)]
Merge pull request #568 from mattbostock/fix_docs
Fix reference to validate_bool in function
Matt Bostock [Tue, 19 Jan 2016 16:22:01 +0000 (16:22 +0000)]
Fix reference to validate_bool in function
The documentation in `validate_ip_address` references `validate_bool`,
but I believe this should read `validate_ip_address` instead, which
makes more sense.
Looks like this was copied from `validate_ipv4_address`, which I fixed
in
7b068781 .
David Schmitt [Mon, 18 Jan 2016 09:23:51 +0000 (09:23 +0000)]
Merge pull request #567 from alechenninger/add-test-for-basename-with-scheme
Add test for basename on path with scheme
Alec Henninger [Sat, 16 Jan 2016 16:55:25 +0000 (11:55 -0500)]
Add test for basename on path with scheme
David Schmitt [Tue, 12 Jan 2016 14:41:49 +0000 (14:41 +0000)]
Merge pull request #566 from puppetlabs/4.11.x
4.11.0 merge back
David Schmitt [Fri, 8 Jan 2016 11:13:16 +0000 (11:13 +0000)]
Merge pull request #552 from mattbostock/add_x509_rsa_key_pair
Add a function to validate an x509 RSA key pair
Matt Bostock [Fri, 8 Jan 2016 11:06:57 +0000 (11:06 +0000)]
Change order of tests to be more logical
Put the tests using a valid certificate fixture together and put tests
using a valid key fixture together.
Matt Bostock [Fri, 8 Jan 2016 11:01:51 +0000 (11:01 +0000)]
Test certificate and key with a truncated middle
Test a valid certificate and valid key that have had 48 characters
removed from their middle, to simulate a malformed certificate and key.
Suggested by @DavidS in https://github.com/puppetlabs/puppetlabs-stdlib/pull/552
Matt Bostock [Mon, 23 Nov 2015 23:45:23 +0000 (23:45 +0000)]
Add a function to validate an x509 RSA key pair
Add a function to validate an x509 RSA certificate and key pair, as
commonly used for TLS certificates.
The rationale behind this is that we store our TLS certificates and
private keys in Hiera YAML files, and poor indentation or formatting in
the YAML file could cause a valid certificate to be considered invalid.
Will cause the Puppet run to fail if:
- an invalid certificate is detected
- an invalid RSA key is detected
- the certificate does not match the key, i.e. the certificate
has not been signed by the supplied key
The test certificates I've used in the spec tests were generated using
the Go standard library:
$ go run $GOROOT/src/crypto/tls/generate_cert.go -host localhost
Example output:
==> cache-1.router: Error: Not a valid RSA key: Neither PUB key nor PRIV key:: nested asn1 error at /var/govuk/puppet/modules/nginx/manifests/config/ssl.pp:30 on node cache-1.router.dev.gov.uk
David Schmitt [Thu, 7 Jan 2016 11:15:39 +0000 (11:15 +0000)]
Merge pull request #565 from tphoney/4.11.0_tweak
minor tweak to 4.11.0 adding debian 8 to metadata
tphoney [Thu, 7 Jan 2016 10:31:17 +0000 (10:31 +0000)]
minor tweak to 4.11.0 adding debian 8 to metadata
David Schmitt [Mon, 4 Jan 2016 15:35:42 +0000 (15:35 +0000)]
Merge pull request #545 from mpolenchuk/master
Add clamp function
Jesse Lovelace [Thu, 31 Dec 2015 16:34:44 +0000 (11:34 -0500)]
Merge pull request #564 from tphoney/4.11.0_prep
4.11.0 prep
Michael Polenchuk [Wed, 18 Nov 2015 11:32:24 +0000 (14:32 +0300)]
Add clamp function
Clamp keeps value within the range.
Employ of soft() makes the whole thing is independant of order.
tphoney [Wed, 30 Dec 2015 13:45:05 +0000 (13:45 +0000)]
4.11.0 prep
Bryan Jen [Tue, 22 Dec 2015 00:41:55 +0000 (17:41 -0700)]
Merge pull request #553 from logicminds/absolute_path
adds new parser called is_absolute_path
TP Honey [Mon, 21 Dec 2015 16:54:20 +0000 (16:54 +0000)]
Merge pull request #561 from DavidS/fix-package_provider
Allow package_provider fact to resolve on PE 3.x
David Schmitt [Fri, 18 Dec 2015 17:38:04 +0000 (17:38 +0000)]
Allow package_provider fact to resolve on PE 3.x
PE 3.x emits a puppetversion fact in the format "3.x.x (Puppet Enterprise 3.x.x)". This fact causes an error when invoked on PE 3.x: Could not retrieve fact='package_provider', resolution='<anonymous>': Malformed version number string 3.8.1 (Puppet Enterprise 3.8.1
This fix has been tested on PE 3.8.2 and should work for PE 3.3, 3.7, and 3.8.
Original-fix-by: Alex Harden <aharden@gmail.com>
TP Honey [Thu, 17 Dec 2015 13:59:52 +0000 (13:59 +0000)]
Merge pull request #559 from DavidS/fm-3802-fix-ensure_resource-test
(FM-3802) make ensure_resource test of packages
David Schmitt [Thu, 17 Dec 2015 13:50:15 +0000 (13:50 +0000)]
(FM-3802) make ensure_resource test of packages
This ensures that the test passes independently of changes to rubygems.
Corey Osman [Wed, 16 Dec 2015 07:15:36 +0000 (23:15 -0800)]
refactors the validate_absolute_path to utilize the is_absolute_path
Corey Osman [Tue, 8 Dec 2015 00:38:26 +0000 (16:38 -0800)]
adds new parser called is_absolute_path
* is_absolute_path returns boolean true if the given path
is absolute, returns false otherwise.
* works for windows and unix
Jesse Lovelace [Tue, 15 Dec 2015 20:53:01 +0000 (14:53 -0600)]
Merge pull request #558 from puppetlabs/4.10.x
4.10.x mergeback
Bryan Jen [Mon, 14 Dec 2015 22:06:08 +0000 (15:06 -0700)]
Merge pull request #557 from jbondpdx/4.10.x
edits to README
jbondpdx [Mon, 14 Dec 2015 21:35:23 +0000 (13:35 -0800)]
more carriage returns
jbondpdx [Mon, 14 Dec 2015 19:57:01 +0000 (11:57 -0800)]
more carriage returns, no
jbondpdx [Mon, 14 Dec 2015 19:50:51 +0000 (11:50 -0800)]
removing mid-line carriage returns
jbondpdx [Mon, 14 Dec 2015 19:19:53 +0000 (11:19 -0800)]
edits to README
Bryan Jen [Fri, 11 Dec 2015 20:26:46 +0000 (13:26 -0700)]
Merge pull request #556 from HelenCampbell/4.10.0_prep
Changelog and versionbump for 4.10.0
Helen Campbell [Fri, 11 Dec 2015 20:08:25 +0000 (20:08 +0000)]
Changelog and versionbump for 4.10.0
Bryan Jen [Thu, 10 Dec 2015 18:54:10 +0000 (11:54 -0700)]
Merge pull request #554 from kjetilho/ticket/2886-seeded_rand
(#2886) seeded_rand: new function
TP Honey [Tue, 8 Dec 2015 15:47:14 +0000 (15:47 +0000)]
Merge pull request #555 from puppetlabs/4.9.x
4.9.x Mergeback
Kjetil Torgrim Homme [Tue, 8 Dec 2015 13:59:12 +0000 (14:59 +0100)]
(#2886) seeded_rand: new function
seeded_rand is needed for repeatable randomness across nodes in a cluster
Bryan Jen [Mon, 30 Nov 2015 18:10:57 +0000 (11:10 -0700)]
Merge pull request #546 from jdevesa/validate_ip
Add validator for any IP address
Jaume Devesa [Thu, 19 Nov 2015 11:47:01 +0000 (12:47 +0100)]
Add validator for any IP address
Provide a validator for IP addresses, regardless they are IPv4 or IPv6,
and its documentation.
Bryan Jen [Wed, 25 Nov 2015 01:06:43 +0000 (18:06 -0700)]
Merge pull request #550 from tphoney/release_4.9.1
4.9.1 release prep
tphoney [Mon, 23 Nov 2015 15:00:40 +0000 (15:00 +0000)]
4.9.1 release prep
David Schmitt [Tue, 24 Nov 2015 10:41:30 +0000 (10:41 +0000)]
Merge pull request #551 from mattbostock/fix_ipv4_doc
Fix reference to validate_bool in IP4 function
Matt Bostock [Mon, 23 Nov 2015 23:45:55 +0000 (23:45 +0000)]
Fix reference to validate_bool in IP4 function
The documentation in `validate_ipv4_address` references `validate_bool`,
but I believe this should read `validate_ipv4_address` instead, which
makes more sense.
Hunter Haugen [Fri, 20 Nov 2015 20:44:27 +0000 (12:44 -0800)]
Merge pull request #548 from bmjen/ruby187
Fix Gemfile to work with ruby 1.8.7
Bryan Jen [Fri, 20 Nov 2015 19:14:30 +0000 (12:14 -0700)]
Fix Gemfile to work with ruby 1.8.7
Bryan Jen [Fri, 20 Nov 2015 16:09:52 +0000 (09:09 -0700)]
Merge pull request #543 from ghoneycutt/patch-2
Use absolute class name in example
Bryan Jen [Fri, 20 Nov 2015 16:07:56 +0000 (09:07 -0700)]
Merge pull request #547 from reidmv/fm_3773
(FM-3773) Fix root_home fact on AIX 5.x
Reid Vandewiele [Thu, 19 Nov 2015 23:29:06 +0000 (15:29 -0800)]
(FM-3773) Fix root_home fact on AIX 5.x
The -C (capital C) flag to lsuser is incorrect. It should be -c
(lowercase).
this commit updates the aix root_home fact to use `lsuser -c`, rather
than `lsuser -C`.
David Schmitt [Mon, 9 Nov 2015 15:17:01 +0000 (15:17 +0000)]
Merge pull request #544 from HelenCampbell/readmeaddition
pick_default addition to readme
Helen Campbell [Mon, 9 Nov 2015 15:14:34 +0000 (15:14 +0000)]
pick_default addition to readme
Garrett Honeycutt [Fri, 6 Nov 2015 17:19:21 +0000 (12:19 -0500)]
Use absolute class name in example
Helen [Fri, 6 Nov 2015 16:45:29 +0000 (16:45 +0000)]
Merge pull request #542 from greg0ire/patch-1
use properly encoded characters
Grégoire Paris [Tue, 3 Nov 2015 16:04:10 +0000 (17:04 +0100)]
use properly encoded characters
This is more severe than it sounds. These characters make puppet fail with the following message :
> Error 400 on SERVER: "\xC3" on US-ASCII
David Schmitt [Wed, 28 Oct 2015 10:15:08 +0000 (10:15 +0000)]
Merge pull request #541 from mattflaschen/patch-1
Fix capitalize docs
Matt Flaschen [Tue, 27 Oct 2015 22:09:18 +0000 (18:09 -0400)]
Fix capitalize docs
Capitalize lower-cases the remaining characters (due to the Ruby function having this behavior); document this, and make minor wording tweaks.
David Schmitt [Fri, 23 Oct 2015 08:51:56 +0000 (09:51 +0100)]
Merge pull request #540 from marrero984/update_str2bool_readme
(#2183) updated str2bool readme wording
marrero984 [Thu, 22 Oct 2015 20:58:57 +0000 (13:58 -0700)]
(#2183) updated str2bool readme wording
David Schmitt [Fri, 16 Oct 2015 08:31:01 +0000 (09:31 +0100)]
Merge pull request #538 from mmckinst/bool2str_enhance
add functionality to bool2str function
Mark McKinstry [Fri, 16 Oct 2015 02:22:10 +0000 (22:22 -0400)]
add functionality to bool2str to return strings of your choice for a boolean
Hunter Haugen [Thu, 15 Oct 2015 17:23:02 +0000 (10:23 -0700)]
Merge pull request #539 from mentat/MODULES-2696
Add check to ensure regex does not throw for none type.
Jesse Lovelace [Thu, 15 Oct 2015 16:25:57 +0000 (11:25 -0500)]
Add check to ensure regex does not throw for none type.
Add a quick check to ensure puppetversion value is not nil and supporting test.
David Schmitt [Thu, 15 Oct 2015 08:44:12 +0000 (09:44 +0100)]
Merge pull request #537 from cmurphy/fix_load_module_metadata
Fix load module metadata
Colleen Murphy [Wed, 14 Oct 2015 23:09:05 +0000 (16:09 -0700)]
Let load_module_metadata succeed on empty file
Some modules or module versions don't have a metadata.json file, but we
might still want to use the load_module_metadata function on them. The
lack of a file can still give us important information. For example, it
might tell us that the version of the module installed is "very old"
even if we can't read the version number directly. This patch adds a
parameter to let the user specify if an empty file is acceptable. To
preserve backwards compatibility it does not change the current default
behavior, which is to raise an error if metadata.json does not exist.
Colleen Murphy [Wed, 14 Oct 2015 22:59:09 +0000 (15:59 -0700)]
Rename load_module_metadata test path
`rake spec` only finds test files that end in _spec.rb, so this test
was not being run. Correct the path name so that the test runs
properly.
TP Honey [Wed, 14 Oct 2015 11:46:19 +0000 (12:46 +0100)]
Merge pull request #536 from DavidS/improve-file_line-docs
(MODULES-2421) improve description of file_line
David Schmitt [Tue, 13 Oct 2015 14:02:04 +0000 (15:02 +0100)]
(MODULES-2421) improve description of file_line
This mostly needed extraction of the existing doc strings from
the type.
David Schmitt [Tue, 13 Oct 2015 09:18:59 +0000 (10:18 +0100)]
Merge pull request #535 from martinpfeifer/package_provider_fact
prevent deprecation warning about the allow_virtual parameter
Martin Pfeifer [Tue, 13 Oct 2015 08:08:01 +0000 (10:08 +0200)]
prevent deprecation warning about the allow_virtual parameter
Bryan Jen [Thu, 1 Oct 2015 17:27:51 +0000 (10:27 -0700)]
Merge pull request #534 from asasfu/feature/package_provider_fact
Add package_provider fact
David Schmitt [Mon, 28 Sep 2015 16:11:10 +0000 (17:11 +0100)]
Merge pull request #533 from HelenCampbell/MODULES-2614-Improved
Modules 2614 improved numeric value handling on empty function
Helen Campbell [Mon, 28 Sep 2015 15:18:56 +0000 (16:18 +0100)]
Added acceptance test and updated readme
Roman Mueller [Tue, 22 Sep 2015 16:05:37 +0000 (18:05 +0200)]
Check for numeric values as empty fails on those
Helen [Mon, 28 Sep 2015 10:16:28 +0000 (11:16 +0100)]
Merge pull request #532 from DavidS/fix-is_a-readme
(FM-3701) Update README for is_a
David Schmitt [Mon, 28 Sep 2015 10:12:25 +0000 (11:12 +0100)]
(FM-3701) Update README for is_a
David Schmitt [Mon, 28 Sep 2015 09:09:17 +0000 (10:09 +0100)]
Merge pull request #531 from asasfu/improvement/service_provider_fact
fixup-PR#506 Speed improvements in facter resolution
Adam S [Sat, 26 Sep 2015 00:58:05 +0000 (17:58 -0700)]
fixup-PR#506 Speed improvements in facter resolution
This is to improve speed on Facter resolution of service_provider fact
that was just introduced in PR# 506. The improvements go from 280ms
resolution time approx. down to 2ms resolution time approx. by adding
requires statements.
Adam S [Sat, 26 Sep 2015 00:55:21 +0000 (17:55 -0700)]
Add package_provider fact
This adds a package_provider fact for situations where we need to be
able to know the client's package provider in a simple way. Situations
such as: package { 'name': install_options => [] } As those tend to be
package provider specific options.
Hunter Haugen [Thu, 24 Sep 2015 17:55:39 +0000 (10:55 -0700)]
Merge pull request #506 from binford2k/feature/service_provider_fact
Add a service_provider fact
David Schmitt [Wed, 23 Sep 2015 10:38:53 +0000 (11:38 +0100)]
Merge pull request #530 from HelenCampbell/MODULES-2614
Adding update to empty function readme
Helen Campbell [Wed, 23 Sep 2015 10:27:48 +0000 (11:27 +0100)]
Adding update to empty function readme
Bryan Jen [Mon, 21 Sep 2015 23:33:22 +0000 (16:33 -0700)]
Merge pull request #528 from mhaskel/is_a_fixes
Update is_a acceptance tests to only run on puppet4
Morgan Haskel [Mon, 21 Sep 2015 21:12:25 +0000 (14:12 -0700)]
Update is_a acceptance tests to only run on puppet4
Bryan Jen [Mon, 21 Sep 2015 18:20:35 +0000 (11:20 -0700)]
Merge pull request #527 from mhaskel/511_compatibility
Fix backwards compatibility from #511
Morgan Haskel [Mon, 21 Sep 2015 17:56:08 +0000 (10:56 -0700)]
Fix backwards compatibility from #511
Maintain the old behavior in the case where the optional second
parameter isn't passed. Also, adding arity is backwards incompatible since
stdlib still supports 2.7, so remove that.
Hunter Haugen [Thu, 17 Sep 2015 19:12:12 +0000 (12:12 -0700)]
Merge pull request #526 from DavidS/improve-validate_re-docs
(MAINT) validate_re: Clarify docs and error message
David Schmitt [Thu, 17 Sep 2015 17:48:32 +0000 (18:48 +0100)]
(MAINT) validate_re: Clarify docs and error message
David Schmitt [Mon, 14 Sep 2015 18:36:56 +0000 (19:36 +0100)]
Merge pull request #524 from binford2k/docs/intersection_truthiness
Clarify what an empty intersection looks like.
Ben Ford [Mon, 14 Sep 2015 18:25:38 +0000 (11:25 -0700)]
Clarify what an empty intersection looks like.
Bryan Jen [Mon, 14 Sep 2015 17:49:50 +0000 (10:49 -0700)]
Merge pull request #523 from DavidS/modules-2516-is_a
(MODULES-2561) add is_a function
Bryan Jen [Mon, 14 Sep 2015 17:40:35 +0000 (10:40 -0700)]
Merge pull request #511 from dmitryilyin/parseyaml_default
[MODULES-2462] Improve parseyaml function
David Schmitt [Mon, 14 Sep 2015 17:26:25 +0000 (18:26 +0100)]
(MODULES-2516) Adds an is_a() function
The data type system is very hard to understand. Many people don't
understand why
type_of([1,2,3]) == Array
will fail, but
type_of([1,2,3]) <= Array
passes. This does a simpler validation that doesn't rely on explicit
data types. Instead, use
$foo = [1,2,3]
if $foo.is_a(Array) {
notify { 'This is an array': }
}
This is based on code by Ben Ford <ben.ford@puppetlabs.com>.
* Added acceptance tests
* Added dispatch
* Improved unit tests
* Added docs to README