On Feb 14, 2011, at 2:15 PM, Aurelien Cedeyn wrote:

> Hello,
> 
> I currently use puppet-0.25.x version and I needed to improve the
> filebucket command.
> I added :
> - filebucket list : list all content of the bucket (local or remote)
> - filebucket diff : diff between 2 files in the filebucket or between
> the file in the current filesystem and the last matching filebucket
> file.
> 
> I posted this patch here : http://projects.puppetlabs.com/issues/5888
> 
> I saw, on the mailing list, that the ability to diff two filebucket
> files was developped. To me, it's not enough because, in most of the
> case, I need to know what changes were made just after the last puppet
> run.
> So, I want to port this patch to the 0.26.x branch and make it clean
> with non-reg tests. I am trying to understand how the link to the REST
> API is made to achieve this.
> 
> I would like to have the feeling of the puppet dev team to know if
> what I wanted to do is correct or not. Also any advice on how to link
> a new command to the puppet REST API are welcome.

Hi Aurelien,

It'd be great to see these commands ported to 0.26.x.  We're working on making 
this much easier, even, in 2.6.5, but there are a couple of bugs not fixed 
until then that make it harder in the current system.

If you can test against 2.6.x, then a great place to start would be my 
Interfaces module:

https://github.com/lak/puppet-interfaces

With this, you can easily create 'diff' and 'list' actions on the 'file' 
command.   I'm testing out a similar extension of functionality myself[1].  
Here is an example action:

https://github.com/lak/puppet-static-compiler/blob/master/lib/puppet/interface/file/store.rb

Basically, you have a simple hook for creating/registering the action, then 
just have your code do what you want.

Does that make sense?

1 - https://github.com/lak/puppet-static-compiler


-- 
Beware of all enterprises that require new clothes.
        -- Henry David Thoreau
---------------------------------------------------------------------
Luke Kanies  -|-   http://puppetlabs.com   -|-   +1(615)594-8199




-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en.

Reply via email to