> On 25. Feb 2019, at 09:29, Dirk Heinrichs <[email protected]> wrote:
>
> Am Montag, den 25.02.2019, 09:10 +0100 schrieb Martin Alfke:
>
>> Within the provider you specify getters (how to read existing data) and
>> setters (how to set new data).
>> Maybe you want to have a look at my PuppetConf talk "Moving from exec to
>> types and providers". You can find it at Puppet youtube channel.
>> There I describe getters and setters.
>
> Thanks a lot. I think I've already understood that part. The problem I have
> is how to implement points 1 and 3 (getting the current configuration and
> writing back the changes). What are the entry points for these? If a type is
> ensurable I have "exists?", "create" and "destroy", but what do I use if it's
> not?
Well, when it is not ensurable then Puppet expects that a configuration
artefact is always present.
You then just have the getter and setter for the type parameters and maybe some
helper methods (API calls, data transformation).
example:
mytype { 'title':
config1 => 'data',
config2 => 'data',
}
provider:
def config1
# write code to read data
end
def config1=(value)
# code to set/write data
end
>
> Bye...
>
> Dirk
> --
> Dirk Heinrichs
> Senior Systems Engineer, Delivery Pipeline
> OpenText ™ Discovery | Recommind
> Phone: +49 2226 15966 18
> Email: [email protected]
> Website: www.recommind.de
> Recommind GmbH, Von-Liebig-Straße 1, 53359 Rheinbach
> Vertretungsberechtigte Geschäftsführer John Marshall Doolittle, Gordon
> Davies, Christian Waida, Registergericht Amtsgericht Bonn, Registernummer HRB
> 10646
> This e-mail may contain confidential and/or privileged information. If you
> are not the intended recipient (or have received this e-mail in error) please
> notify the sender immediately and destroy this e-mail. Any unauthorized
> copying, disclosure or distribution of the material in this e-mail is
> strictly forbidden
> Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte
> Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail
> irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und
> vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte
> Weitergabe dieser Mail sind nicht gestattet.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/3145d6ea8e2c3a64dcf475c8d5c6f33a471f719d.camel%40opentext.com.
> For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-users/48DED0D7-5E22-4D27-830F-D1E09DFD0936%40gmail.com.
For more options, visit https://groups.google.com/d/optout.