[Puppet-dev] Re: munging the log output from a custom provider

2015-09-18 Thread Corey Osman
Where is this documented or exist in the puppet codebase as this is exactly 
what I was looking for. 

On Thursday, September 17, 2015 at 11:48:17 AM UTC-7, Reid Vandewiele wrote:
>
> On Wednesday, September 16, 2015 at 6:19:27 PM UTC-7, Corey Osman wrote:
>>
>>
>> [...] how can I keep the password from showing up in the reports when the 
>> password changes.  Basically I don’t want the following to occur.  Is there 
>> a way to suppress the logging of this info?  Or is there a way to 
>> “munge/encrypt” the info being logged? [...]
>>
>> Notice: /Stage[main]/Main/Bmcuser[testuser]/userpass: userpass changed 
>> '**Hidden**' to ‘123456'
>>
> The user type in Puppet core does this mostly, using change_to_s(), 
> is_to_s(), and should_to_s(). Check out this part of the newproperty() 
> method for password.
>
>
> https://github.com/puppetlabs/puppet/blob/master/lib/puppet/type/user.rb#L212-L225
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-dev/5dbea916-c327-4a4b-9c8d-b7e75e7364eb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet-dev] Re: munging the log output from a custom provider

2015-09-18 Thread Reid Vandewiele
On Fri, Sep 18, 2015 at 9:02 AM Trevor Vaughan 
wrote:

> Hi Corey,
>
> It's part of the 'property' Object:
> https://github.com/puppetlabs/puppet/blob/master/lib/puppet/property.rb#L186
>

Related references:

http://www.rubydoc.info/gems/puppet/Puppet/Property (same thing, the rdoc
view)
https://docs.puppetlabs.com/guides/custom_types.html#customizing-behaviour

As that last link comments, often times the best existing references for
some of this stuff are existing types, used and referenced as examples.

The other resource I'm aware of is Dan Bode and Nan Liu's book "Puppet
Types and Providers" (late 2012). It's been awhile since it was published
but not a whole lot has changed in the relevant ruby API.
http://www.amazon.com/Puppet-Types-Providers-Dan-Bode/dp/1449339328

~Reid

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-dev/CAHNFGkNviLELsD%3DpNPUK2Q%3Du9y_oQRit7QTjXM9Y0Y%2BXdvv34Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet-dev] Re: munging the log output from a custom provider

2015-09-18 Thread Trevor Vaughan
Hi Corey,

It's part of the 'property' Object:
https://github.com/puppetlabs/puppet/blob/master/lib/puppet/property.rb#L186

On Fri, Sep 18, 2015 at 11:02 AM, Corey Osman  wrote:

> Where is this documented or exist in the puppet codebase as this is
> exactly what I was looking for.
>
> On Thursday, September 17, 2015 at 11:48:17 AM UTC-7, Reid Vandewiele
> wrote:
>>
>> On Wednesday, September 16, 2015 at 6:19:27 PM UTC-7, Corey Osman wrote:
>>>
>>>
>>> [...] how can I keep the password from showing up in the reports when
>>> the password changes.  Basically I don’t want the following to occur.  Is
>>> there a way to suppress the logging of this info?  Or is there a way to
>>> “munge/encrypt” the info being logged? [...]
>>>
>>> Notice: /Stage[main]/Main/Bmcuser[testuser]/userpass: userpass changed
>>> '**Hidden**' to ‘123456'
>>>
>> The user type in Puppet core does this mostly, using change_to_s(),
>> is_to_s(), and should_to_s(). Check out this part of the newproperty()
>> method for password.
>>
>>
>> https://github.com/puppetlabs/puppet/blob/master/lib/puppet/type/user.rb#L212-L225
>>
>>
>> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to puppet-dev+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-dev/5dbea916-c327-4a4b-9c8d-b7e75e7364eb%40googlegroups.com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Trevor Vaughan
Vice President, Onyx Point, Inc
(410) 541-6699

-- This account not approved for unencrypted proprietary information --

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-dev/CANs%2BFoXMAzsKfKDp791UmWLAvjkYmjj70-OEx_%2B%3Du%3DLXcOvHAg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet-dev] Re: munging the log output from a custom provider

2015-09-17 Thread Reid Vandewiele
On Wednesday, September 16, 2015 at 6:19:27 PM UTC-7, Corey Osman wrote:
>
>
> [...] how can I keep the password from showing up in the reports when the 
> password changes.  Basically I don’t want the following to occur.  Is there 
> a way to suppress the logging of this info?  Or is there a way to 
> “munge/encrypt” the info being logged? [...]
>
> Notice: /Stage[main]/Main/Bmcuser[testuser]/userpass: userpass changed 
> '**Hidden**' to ‘123456'
>
The user type in Puppet core does this mostly, using change_to_s(), 
is_to_s(), and should_to_s(). Check out this part of the newproperty() 
method for password.

https://github.com/puppetlabs/puppet/blob/master/lib/puppet/type/user.rb#L212-L225


-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-dev/cbbc5f61-d61e-4c31-82a4-f1b1877ae34c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.