HomePhorge

(#8561) Unify validation and modification of action arguments.
77441be2299bUnpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

(#8561) Unify validation and modification of action arguments.

Rather than having multiple, separate operations that modify and validate the
arguments to an action, a single pass makes sense. This also means less walks
across the set of data, and a few less expensive method calls in Ruby.

Additionally, we work on a duplicate of the arguments hash rather than
directly modifying the original. Because everything we do is at the top level
key/value mapping, this is sufficient to isolate the original.

While mostly theoretical, we now don't mutilate the hash passed in, so the
user won't get nastily surprised by the fact that we could have done so.

Reviewed-By: Pieter van de Bruggen <pieter@puppetlabs.com>

Details

Provenance
Daniel Pittman <daniel@puppetlabs.com>Authored on
vanmeeuwenPushed on Jun 2 2015, 2:22 PM
Parents
rPU69b4e70ac2fa: (#7290) Fail on unknown options.
Branches
Unknown
Tags
Unknown

Event Timeline

Daniel Pittman <daniel@puppetlabs.com> committed rPU77441be2299b: (#8561) Unify validation and modification of action arguments. (authored by Daniel Pittman <daniel@puppetlabs.com>).Jul 23 2011, 1:27 AM