HomePhorge

(#8561) Use canonical names for options to actions.
6bec2df0860bUnpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

(#8561) Use canonical names for options to actions.

When we invoke an action, we parse a set of options. These have a canonical
name, and optionally a set of aliases. For example, :bar might have :b as an
alias to allow a short name to be given.

Previously we would just pass this on as received; if you passed :bar you got
:bar, and if you passed :b you got :b. This works, but means that every
action has to write the same code to extract the appropriate version of an
option from whatever set of aliases might be passed.

Now, instead, we centralize that and always pass options as their canonical
name to the action code. This makes it simpler to work with. (This happens
before any validation, or other user-supplied, code to simplify everything
that handles options.)

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
rPUfeec7b3df713: Merge branch 'feature/2.7.x/7184-better-action-loading' into 2.7.x
Branches
Unknown
Tags
Unknown

Event Timeline

Daniel Pittman <daniel@puppetlabs.com> committed rPU6bec2df0860b: (#8561) Use canonical names for options to actions. (authored by Daniel Pittman <daniel@puppetlabs.com>).Jul 23 2011, 1:26 AM