puppetlabs/puppetlabs-mongodb — pull request #132 by level99 (2014-07-31 15:19:19+00:00)
Title: refactor param handling

No new functionality. Should be backwards compatible (see notes at end).

The current class param default handling needed to be cleaned up. This is a prerequisite for expanding the module to include additional mongodb service management capability (shard, configsrv, etc.). Either everything should be merged into globals or split apart, keeping only truly shared params in the globals. I chose the latter for reasons stated below. Also included are various other bug & logic fixes related to param handling.

- Deprecated/moved client and most server/service specific params from globals. These are not really global (shared).

- fully qualify variable scope

- fixed bad package version handling logic

- Resource management was being done in a 2nd level inherited params class (globals). Params classes should not be performing resource management as a best practice as this can introduce dependency issues into the class inheritance prerequisite chain. I was a little surprised puppet compiled with the old design (server class inherits params inherits globals which loads the repo class which inherits params inherits globals which loads the repo class..). The use of 'include' is a likely enabler here but circular references should be avoided.

- ensure_resource used for package management to avoid resource conflicts which requires a slightly newer stdlib

Backwards Compatibility Notes

stdlib must be upgraded to >= 2.5.0

use of the following mongodb::globals class params should be updated to use the more specific mongodb::client or mongodb::server param instead (still functional but emits a warning on use)
- client_package_name (not applicable to service classes)
- server_package_name (different mongo services may use different package names)
- service_enable (there are various different mongo services)
- service_name (there are various different mongo services)
- service_status (there are various different mongo services)
- service_ensure (there are various different mongo services)