HomePhorge

Allow storeconfigs collector to accept parser resources
afe93b7850dbUnpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

Allow storeconfigs collector to accept parser resources

Previously, the collector would call the storeconfigs backend and assume it was
going to receive an object which responded to a #to_resource method to convert
it into Puppet::Parser::Resource. This required any storeconfigs backend to
provide an intermediate class simply to call #to_resource on, even if it wasn't
necessary. Now, the collector will only call that method if it receives
something that isn't already a Puppet::Parser::Resource. This allows
storeconfigs backends to opt to simply construct the resources themselves,
rather than define an intermediate class.

Additionally, because Puppet::Parser::Resource instances require a scope when
initializing, the collector will now provide the scope to the storeconfigs
backend as an option to search. This provides the backend with the information
necessary to actually create the Puppet::Parser::Resource objects.

Details

Provenance
Nick Lewis <nick@puppetlabs.com>Authored on
vanmeeuwenPushed on Jun 2 2015, 2:22 PM
Parents
rPU2958b057de83: maint: Deal with [].to_s problem in 1.9.2
Branches
Unknown
Tags
Unknown

Event Timeline

Nick Lewis <nick@puppetlabs.com> committed rPUafe93b7850db: Allow storeconfigs collector to accept parser resources (authored by Nick Lewis <nick@puppetlabs.com>).Jan 24 2012, 11:47 PM