Re: [Puppet-dev] how to create a node object from a parameterised class?

2011-02-18 Thread Dan Bode
Hi Nikolay, On Fri, Feb 18, 2011 at 9:34 AM, Nikolay Sturm wrote: > Hi, > > in order to extend cucumber-puppet to support parameterised classes, I > need to create a node object from a parameterised class. > > At the moment my code does sth like this: > > node = Puppet::Node.new(@facts['hostname'

Re: [Puppet-dev] [PATCH] (#6126) Puppet inspect now reports status after run completes.

2011-02-18 Thread Daniel Pittman
On Fri, Feb 18, 2011 at 19:25, Daniel Pittman wrote: > From: Daniel Pittman > > We now emit timing and output a status message at the end of a successful > inspect run. Almost all of this change is whitespace; the actual delta without is: ⚡ git diff 'HEAD^' -w diff --git a/lib/puppet/applicatio

[Puppet-dev] [PATCH] (#6126) Puppet inspect now reports status after run completes.

2011-02-18 Thread Daniel Pittman
From: Daniel Pittman We now emit timing and output a status message at the end of a successful inspect run. Paired-With: Nick Lewis Signed-Off-By: Daniel Pittman --- lib/puppet/application/inspect.rb | 116 + spec/unit/application/inspect_spec.rb |2 +-

[Puppet-dev] [PATCH/puppet 3/3] Remove pending tests from parsed mount provider

2011-02-18 Thread Jacob Helwig
Paired-with: Jesse Wolfe Signed-off-by: Jacob Helwig --- Local-branch: tickets/2.6.x/6309-check-what-is-mounted spec/unit/provider/mount/parsed_spec.rb | 10 -- 1 files changed, 0 insertions(+), 10 deletions(-) diff --git a/spec/unit/provider/mount/parsed_spec.rb b/spec/unit/provid

[Puppet-dev] [PATCH/puppet 1/3] Clean up whitespace, and commented out code in parsed mount provider

2011-02-18 Thread Jacob Helwig
Paired-with: Jesse Wolfe Signed-off-by: Jacob Helwig --- Local-branch: tickets/2.6.x/6309-check-what-is-mounted lib/puppet/provider/mount/parsed.rb |9 ++--- 1 files changed, 2 insertions(+), 7 deletions(-) diff --git a/lib/puppet/provider/mount/parsed.rb b/lib/puppet/provider/mount/

[Puppet-dev] [PATCH/puppet 2/3] (#6309) Ensure the correct device is mounted when managing mounts

2011-02-18 Thread Jacob Helwig
Previously the mount type would only check if anything was mounted at the desired point, when 'ensure => mounted' was specified. Now we check not only whether something is mounted at the desired point, but also that it is the thing we wish to be mounted there. There is also a chance that the moun

[Puppet-dev] [PATCH/puppet 1/1] (#6364) Adjust mis-translated regex in mount provider for AIX

2011-02-18 Thread Jacob Helwig
The commit to simplify the regex used to parse the output from the mount command on AIX (50c12e55b6f8462f6904ae061e661d1d10c7590a) mis-translated it. The original regex was grabbing the 3rd space-separated element, not the 2nd. This mis-translation caused the provider to grab the device informati

[Puppet-dev] [PATCH/puppet 1/1] (#6376) Add support and testing for _search GET requests

2011-02-18 Thread Max Martin
Added support for adding "_search" to the end of any indirection to 'pluralize' it, and added tests to check this functionality and to test hidden side effect of plurality method unpluralizing indirections. Paired-With:Paul Berry Signed-off-by: Max Martin --- lib/puppet/network/http/api/v1.rb

Re: [Puppet-dev] Should files autorequire all parents?

2011-02-18 Thread Luke Kanies
On Feb 18, 2011, at 2:16 PM, Ian Ward Comfort wrote: > On 18 Feb 2011, at 2:08 PM, Luke Kanies wrote: >> On Feb 18, 2011, at 1:20 PM, Ian Ward Comfort wrote: >>> On 18 Feb 2011, at 12:29 PM, Luke Kanies wrote: It's actually pretty straightforward to do the trimming, I think - we current

Re: [Puppet-dev] Should files autorequire all parents?

2011-02-18 Thread Ian Ward Comfort
On 18 Feb 2011, at 2:08 PM, Luke Kanies wrote: > On Feb 18, 2011, at 1:20 PM, Ian Ward Comfort wrote: >> On 18 Feb 2011, at 12:29 PM, Luke Kanies wrote: >>> It's actually pretty straightforward to do the trimming, I think - we >>> currently just return the parent class, but we should instead searc

Re: [Puppet-dev] Should files autorequire all parents?

2011-02-18 Thread Luke Kanies
On Feb 18, 2011, at 1:20 PM, Ian Ward Comfort wrote: > On 18 Feb 2011, at 12:29 PM, Luke Kanies wrote: >> On Feb 18, 2011, at 11:37 AM, Ian Ward Comfort wrote: >>> Heh, right. I was trying to think of a clean way to give types a way to >>> say, "autorequire the first of these dependencies that's

Re: [Puppet-dev] Should files autorequire all parents?

2011-02-18 Thread Ian Ward Comfort
On 18 Feb 2011, at 12:29 PM, Luke Kanies wrote: > On Feb 18, 2011, at 11:37 AM, Ian Ward Comfort wrote: >> Heh, right. I was trying to think of a clean way to give types a way to say, >> "autorequire the first of these dependencies that's found in the catalog, >> and ignore the rest". Adding an a

Re: [Puppet-dev] Should files autorequire all parents?

2011-02-18 Thread Luke Kanies
On Feb 18, 2011, at 11:37 AM, Ian Ward Comfort wrote: > On 18 Feb 2011, at 11:19 AM, Daniel Pittman wrote: >> On Fri, Feb 18, 2011 at 10:48, Ian Ward Comfort >> wrote: >>> Yeah, requiring just the first managed parent, as suggested, would be >>> sufficient. I wasn't sure how to implement this,

Re: [Puppet-dev] Should files autorequire all parents?

2011-02-18 Thread Markus Roberts
On Fri, Feb 18, 2011 at 12:24 PM, Ian Ward Comfort wrote: > On 18 Feb 2011, at 12:04 PM, Markus Roberts wrote: > >> Heh, right. I was trying to think of a clean way to give types a way to > say, "autorequire the first of these dependencies that's found in the > catalog, and ignore the rest". Addin

Re: [Puppet-dev] Can't seem to get 'puppet data' to work.

2011-02-18 Thread Trevor Vaughan
Mainly, I'm having trouble getting it to work. I installed 2.6.X in my home directory under Puppet. Set RUBYLIB=~/Puppet/usr/lib/ruby/site_ruby/1.8 Cloned puppet-interfaces.git into ~/.puppet/modules/interface Then ran ~/Puppet/usr/bin/puppet interface list But, unfortunately, got 'unknown com

Re: [Puppet-dev] Should files autorequire all parents?

2011-02-18 Thread Ian Ward Comfort
On 18 Feb 2011, at 12:04 PM, Markus Roberts wrote: >> Heh, right. I was trying to think of a clean way to give types a way to say, >> "autorequire the first of these dependencies that's found in the catalog, >> and ignore the rest". Adding an autorequirefirst method would do it in a >> backwards

Re: [Puppet-dev] Should files autorequire all parents?

2011-02-18 Thread Markus Roberts
Heh, right. I was trying to think of a clean way to give types a way to say, > "autorequire the first of these dependencies that's found in the catalog, > and ignore the rest". Adding an autorequirefirst method would do it in a > backwards-compatible way, but that feels icky. > Can you explain wha

Re: [Puppet-dev] Can't seem to get 'puppet data' to work.

2011-02-18 Thread Luke Kanies
Heh; I was slow to respond, but yeah, there it is. Let me know if you have questions about it. It's still rough, but it's working well for quite a few things. On Feb 18, 2011, at 11:31 AM, Trevor Vaughan wrote: > Never mind, found it: git://github.com/lak/puppet-interfaces.git > > On Fri, Feb

Re: [Puppet-dev] Should files autorequire all parents?

2011-02-18 Thread Ian Ward Comfort
On 18 Feb 2011, at 11:19 AM, Daniel Pittman wrote: > On Fri, Feb 18, 2011 at 10:48, Ian Ward Comfort wrote: >> Yeah, requiring just the first managed parent, as suggested, would be >> sufficient. I wasn't sure how to implement this, though, from a quick glance >> through the code. The logic that

Re: [Puppet-dev] Can't seem to get 'puppet data' to work.

2011-02-18 Thread Trevor Vaughan
Never mind, found it: git://github.com/lak/puppet-interfaces.git On Fri, Feb 18, 2011 at 2:25 PM, Trevor Vaughan wrote: > Which git repo/branch? > > I'm not seeing anything obvious. > > Thanks, > > Trevor > > On Fri, Feb 18, 2011 at 2:22 PM, Dan Bode wrote: >> >> >> On Fri, Feb 18, 2011 at 10:58

Re: [Puppet-dev] Can't seem to get 'puppet data' to work.

2011-02-18 Thread Trevor Vaughan
Which git repo/branch? I'm not seeing anything obvious. Thanks, Trevor On Fri, Feb 18, 2011 at 2:22 PM, Dan Bode wrote: > > > On Fri, Feb 18, 2011 at 10:58 AM, Trevor Vaughan > wrote: >> >> I pulled it from the lak repo and set my RUBYLIB but all I'm getting >> is: " Could not prepare for exe

Re: [Puppet-dev] Can't seem to get 'puppet data' to work.

2011-02-18 Thread Dan Bode
On Fri, Feb 18, 2011 at 10:58 AM, Trevor Vaughan wrote: > I pulled it from the lak repo and set my RUBYLIB but all I'm getting > is: " Could not prepare for execution: You must specify 'find', > 'search', 'save', or 'destroy' as a verb; 'save' probably does not > work right now". > > I even get th

Re: [Puppet-dev] Should files autorequire all parents?

2011-02-18 Thread Daniel Pittman
On Fri, Feb 18, 2011 at 10:48, Ian Ward Comfort wrote: > On 18 Feb 2011, at 10:34 AM, Daniel Pittman wrote: >> On Feb 18, 2011 10:30 AM, "Luke Kanies" wrote: >>> On Feb 17, 2011, at 10:48 PM, Ian Ward Comfort wrote: I've just put an RFC feature request into the tracker, and I'm curious

[Puppet-dev] Can't seem to get 'puppet data' to work.

2011-02-18 Thread Trevor Vaughan
I pulled it from the lak repo and set my RUBYLIB but all I'm getting is: " Could not prepare for execution: You must specify 'find', 'search', 'save', or 'destroy' as a verb; 'save' probably does not work right now". I even get that with puppet data --list. Any hints? Thanks, Trevor -- Trevor

Re: [Puppet-dev] Should files autorequire all parents?

2011-02-18 Thread Ian Ward Comfort
On 18 Feb 2011, at 10:34 AM, Daniel Pittman wrote: > On Feb 18, 2011 10:30 AM, "Luke Kanies" wrote: >> On Feb 17, 2011, at 10:48 PM, Ian Ward Comfort wrote: >>> >>> I've just put an RFC feature request into the tracker, and I'm curious what >>> other people think about it. In short, I'd like to

Re: [Puppet-dev] Should files autorequire all parents?

2011-02-18 Thread Ian Ward Comfort
On 18 Feb 2011, at 10:32 AM, Daniel Pittman wrote: > I think I am in general agreement with this - or, at least, something that > can't be disstinguished from this externally. However, to be sure I > understand your proposal correctly: > > The goal is that dependencies of an ancestor directory

Re: [Puppet-dev] Should files autorequire all parents?

2011-02-18 Thread Daniel Pittman
On Feb 18, 2011 10:30 AM, "Luke Kanies" wrote: > On Feb 17, 2011, at 10:48 PM, Ian Ward Comfort wrote: > > > I've just put an RFC feature request into the tracker, and I'm curious what other people think about it. In short, I'd like to have file resources autorequire all their ancestor directories

Re: [Puppet-dev] Should files autorequire all parents?

2011-02-18 Thread Daniel Pittman
I think I am in general agreement with this - or, at least, something that can't be disstinguished from this externally. However, to be sure I understand your proposal correctly: The goal is that dependencies of an ancestor directory are implicitly added to a directory node, and nothing more? Yo

Re: [Puppet-dev] Should files autorequire all parents?

2011-02-18 Thread Luke Kanies
On Feb 17, 2011, at 10:48 PM, Ian Ward Comfort wrote: > I've just put an RFC feature request into the tracker, and I'm curious what > other people think about it. In short, I'd like to have file resources > autorequire all their ancestor directories, not just the direct parent. Input > apprecia

Re: [Puppet-dev] [PATCH/puppet 2/2] (#6324) Add spec for SMF service provider

2011-02-18 Thread Daniel Pittman
Those tests look pretty good to me - and where they don't it is because you followed our bad example, so no complaints from me there. ;) Thank you so much for writing those tests to accompany the code. It makes it easier for us to be confident that we will not regress your fix later. Regards,

Re: [Puppet-dev] [PATCH/puppet 2/2] (#6324) Add spec for SMF service provider

2011-02-18 Thread Luke Kanies
Thanks a ton for doing this. I really only have one comment below, and it's about stubs vs. real objects, which we've changed our tune on recently. On Feb 18, 2011, at 1:44 AM, Dominic Cleal wrote: > > Signed-off-by: Dominic Cleal > --- > Local-branch: tickets/master/6324 > spec/unit/provider

Re: [Puppet-dev] [PATCH/puppet 1/1] (#5935) Allow functions to accept negated values

2011-02-18 Thread Luke Kanies
On Feb 18, 2011, at 9:46 AM, Jesse A Wolfe wrote: > Sure, but Puppet doesn't actually have numbers - it's just that some of its > strings happen to consist entirely of digits. > > Suddenly this whole conversation makes much more sense. > ... but some of the Type code suddenly makes much less sen

Re: [Puppet-dev] [PATCH/puppet 1/1] (#5935) Allow functions to accept negated values

2011-02-18 Thread Jesse A Wolfe
> Sure, but Puppet doesn't actually have numbers - it's just that some of its > strings happen to consist entirely of digits. > Suddenly this whole conversation makes much more sense. ... but some of the Type code suddenly makes much less sense. > > On Feb 17, 2011, at 11:47 PM, Jesse A Wolfe wr

[Puppet-dev] how to create a node object from a parameterised class?

2011-02-18 Thread Nikolay Sturm
Hi, in order to extend cucumber-puppet to support parameterised classes, I need to create a node object from a parameterised class. At the moment my code does sth like this: node = Puppet::Node.new(@facts['hostname'], :classes => @klass) node.merge(@facts) @catalog = Puppet::Resource::Catalog.fi

Re: [Puppet-dev] YAML output from api malformed?

2011-02-18 Thread Markus Roberts
C -- Is it possible that the output from the api url returns malformed YAML > code? I have two YAML parsers that are choking on the same YAML > output. > > I loaded the YAML output into this parser and it returned with an > error. > > http://yaml-online-parser.appspot.com/ > I just tried that pa

[Puppet-dev] Re: How much "Do What I Mean" magic should we embed in network facts?

2011-02-18 Thread Stig Sandbeck Mathisen
Daniel Pittman writes: > One other complexity: the ipaddress6 fact tries a DNS lookup of the > FQDN as the first step in determining the "primary" address. I > actually *would* support this being our standard definition of the > fact, but this is different from the ipaddress fact. That later just

[Puppet-dev] [PATCH/puppet 1/2] (#6324) Always fall back to svcadm enable except for the maintenance state

2011-02-18 Thread Dominic Cleal
If state is running, using svcadm enable is harmless and prevents errors with execute(). Signed-off-by: Dominic Cleal --- Local-branch: tickets/master/6324 lib/puppet/provider/service/smf.rb |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/puppet/provider/service/s

[Puppet-dev] [PATCH/puppet 2/2] (#6324) Add spec for SMF service provider

2011-02-18 Thread Dominic Cleal
Signed-off-by: Dominic Cleal --- Local-branch: tickets/master/6324 spec/unit/provider/service/smf_spec.rb | 133 1 files changed, 133 insertions(+), 0 deletions(-) create mode 100755 spec/unit/provider/service/smf_spec.rb diff --git a/spec/unit/provider/servic

Re: [Puppet-dev] [PATCH/puppet 1/1] (#6324) Always fall back to svcadm enable except for the maintenance state

2011-02-18 Thread Dominic Cleal
On 15/02/11 21:21, Luke Kanies wrote: > Good catch, and definitely a good idea. > > I don't suppose you feel like creating a set of SMF tests for this? :) I've given it a go, but getting the rspec to work was a steep learning curve! I'll resend the patches. -- Dominic Cleal Red Hat Consulting

Re: [Puppet-dev] YAML output from api malformed?

2011-02-18 Thread Daniel Pittman
On Thu, Feb 17, 2011 at 22:30, Corey Osman wrote: > > Is it possible that the output from the api url returns malformed YAML > code?  I have two YAML parsers that are choking on the same YAML > output. Yes, as we did have a bug that would generate incorrect YAML output in some cases. It should b