HomePhorge

Step towards #5027 -- scopes should know if they are dynamic
10230cfc28e7Unpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

Step towards #5027 -- scopes should know if they are dynamic

The logic for distinguishing dynamic / static scopes was borrowed from Nick &
Paul's patch, the main differences here being 1) calling it "dynamic" (true/
false) rather than "parent_relationship" (:inherited/:dynamic) 2) aligning the
default so that it only needs to get set in one place (the one that will
eventually go away) and 3) setting it on createion rather than with a setter.

Setting it in one place, on creation, also makes it easier to see that anytime
we access a scope it will have the correct setting of Scope#dynamic and that
this does not change.

This commit also contains a minor refactor (removing Type#subscope) that is not
strictly tied to the main purpose but lies in the direction we are needing to
go and it simplified things to do it now.

Details

Provenance
Markus Roberts <Markus@reality.com>Authored on
Nick Lewis <nick@puppetlabs.com>Committed on Apr 12 2011, 9:47 PM
vanmeeuwenPushed on Jun 2 2015, 2:22 PM
Parents
rPUe5609ffefb41: Step towards #5027 -- add Logging#deprication_warning facility
Branches
Unknown
Tags
Unknown

Event Timeline

Nick Lewis <nick@puppetlabs.com> committed rPU10230cfc28e7: Step towards #5027 -- scopes should know if they are dynamic (authored by Markus Roberts <Markus@reality.com>).Apr 12 2011, 9:47 PM