Objects matching the expression 'providers'
- #585 Provider commands should be able to be optional (providers)
- #605 Providers should refer to '@resource' instead of '@model' (providers)
- #728 Parsed File? providers do not work outside of a transaction (parsedfile, providers)
- #751 Interface providers need to be updated for 0.23 (interface, providers)
- CompleteResourceExample This document walks through the definition of a very simple resource type and one provider. We'll build the resource up slowly, and the provider along with it. See CreatingCustomTypes Creating Custom Types:trac: and ProviderDevelopment Provider Development:trac: for more information on the individual classes. Resource Creation ----------------- Any reasonable resource needs to be able to be created and destroyed, and resources have to have names, so we'll start with those two features. Puppet's property support has a helper method called ensurable that handles modeling creation and destruction; it creates an ensure property and adds absent and present values for it, which in turn require three methods on the provider, create, destroy, and exists?. Here's the first start to the resource:: Puppet::Type.newtype(:file) do @doc (documentation, example, providers, types)
- ProviderDevelopment .. contents:: The core of Puppet's cross-platform support is via Resource Providers, which are essentially back-ends that implement support for a specific implementation of a given resource type. For instance, there are more than 20 package providers, including providers for package formats like dpkg and rpm along with high-level package managers like apt and yum. A provider's main job is to wrap client-side tools, usually by just calling out to those tools with the right information. Not all resource types have or need providers, but any resource type concerned about portability will likely need them. We will use the apt and dpkg package providers as examples throughout this document, and the examples used are current as of 0.23.0. Declaration -------------------- Providers are always associated with a single resource type, so they are created by calling the provide class method on that resource type. When declarating a provider, you can specify a parent class -- for instance, all package providers have a common parent class:: Puppet::Type.type(:package).provide :dpkg, :parent (development, documentation, providers)