On 16 fév, 10:26, Luke Kanies <[email protected]> wrote:
> 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/...
>
> 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

Thanks for your response.

I have some more questions :
1 - If I understand your mecanism, only with 2 files in the file
interface directory, I will be able to add my two functions ? Will it
be also added to the REST api ? When will this mecanism be added to
the master branch of the git repository (maybe it is already in a
specific branch) ?

2 - I'm working on the master branch of the git repository. I'm I
right ?

3 - I have 2 possibilities. The first is to add the diff and the list
feature to the find command (as it was implemented for the diff
command). I don't think this is the good way to include my commands.
The second one is to modify the API to add diff and list. It seems to
make heavy changes in the current code. What of this two must I
chose ?

--
Aurélien

-- 
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