Awesome
Puppet::ResourceApi
This is an implementation of the Resource API specification.
Find a working example of a new-style providers in the Palo Alto Firewall module:
- Type
- Base provider
- Actual provider with validation and xml processing
- New unit tests for 100% coverage.
Find the full Resource API documentation here
Related Documents
- The Resource API specs describes details of all the capabilities of this gem.
- The puppetlabs-hue module is a very simple example for using the Resource API for remote resources.
- The meraki module is a full example for using the Resource API for remote resources.
- This Introduction to Testing Puppet Modules talk describes rspec usage in more detail.
- The RSpec docs provide an overview of the capabilities of rspec.
- Read betterspecs for general guidelines on what is considered good specs.
Deployment
The puppet-resource_api
gem is part of Puppet from version 6 onward.
Contributing
We welcome bug reports and pull requests on the Resource API so that we can continue to improve it to the best of our ability. If you would like to contribute, have a look at our GitHub and the Resource API Backlog.
Known Issues
There are still a few notable gaps between the implementation and the specification:
- Only a single runtime environment (the Puppet commands) is currently implemented.
Restrictions of puppet:
supports_noop
is not effective, as puppet doesn't call into the type under noop at all.- Attributes cannot be called
title
,provider
, or any of the metaparameters, as those are reserved by puppet itself.
Future possibilities: