Add Puppet server environment_classes API support
For Puppet Server 2.3.0 or higher (Puppet version 4.4+), a new environment_classes API is available that replaces resource_types.
In Puppet 4.5 (probably Puppet Server 2.4.0?) the older resource_types API is deprecated:
There are some features that we can expose in the smart proxy, e.g.
- typing via
default_literal- Foreman already follows the type of the default value in the JSON response (int, hash etc) to set the type of the smart class parameter. resource_types returns everything as a string.
- reporting of errors - this could be logged on the smart proxy and/or added to the API response
- clearer caching semantics with etag/matching support
Fixes #15095 - Support for puppet environment classes api
- Ruby 1.8.7 is NOT supported.
- This will attempt to cache puppet classes and rely on etag for cache
validation. Enable puppet's environment class cache for this feature
to have effect.
- It will return a timeout error to the client if puppet doesn't
respond within 15 seconds. The module will wait for 5 minutes to
update the classes cache before timing out however.
- Extended puppet api to return extended puppet classes information,