[Puppet-dev] Re: Validation Resources

2015-05-14 Thread Dan Bode
://tickets.puppetlabs.com/browse/MODULES-1982 This pattern has poked up a few different places. As the PR says, it has shown up in the monogodb module and the puppetdb module. I know that Michael Chapman added something like this to his OpenStack things and Dan Bode as well. FWIW, I've

Re: [Puppet-dev] Re: Validation Resources

2015-05-14 Thread Dan Bode
': require = Runtime_fail['quorum not reached for external service'] } } I was thinking it would be a catalog compile service as opposed to a client side operation to minimize distributed complexity. Thanks, Trevor On Thu, May 14, 2015 at 3:48 PM, Dan Bode bod...@gmail.com wrote

Re: [Puppet-dev] rspec-puppet issues under Ruby 2

2014-11-28 Thread Dan Bode
On Tue, Nov 25, 2014 at 5:25 PM, Trevor Vaughan tvaug...@onyxpoint.com wrote: Hi All, I've got a couple of issues running rspec-puppet tests under Ruby 2 that I was hoping someone could shed some light on. First, under Ruby 2, any validation functions in the code appear to be getting

Re: [Puppet-dev] rspec-puppet issues under Ruby 2

2014-11-28 Thread Dan Bode
On Fri, Nov 28, 2014 at 3:08 PM, Kylo Ginsberg k...@puppetlabs.com wrote: On Fri, Nov 28, 2014 at 8:30 AM, Dan Bode bod...@gmail.com wrote: On Tue, Nov 25, 2014 at 5:25 PM, Trevor Vaughan tvaug...@onyxpoint.com wrote: Hi All, I've got a couple of issues running rspec-puppet tests under

Re: [Puppet-dev] Re: [Puppet Users] using puppet device

2013-12-12 Thread Dan Bode
On Thu, Dec 12, 2013 at 1:46 AM, Nan Liu nan@gmail.com wrote: On Wed, Dec 11, 2013 at 8:51 AM, Dan Bode bod...@gmail.com wrote: I had a bit of time to research the existing device code to see if I can use it for an integration with two specific use cases: I'm not sure what issues

[Puppet-dev] Re: [Puppet Users] using puppet device

2013-12-12 Thread Dan Bode
On Thu, Dec 12, 2013 at 2:08 AM, Markus Burger markus.bur...@uni-ak.ac.atwrote: Hi, On 11-12-2013 10:51:08, Dan Bode wrote: Hi all, I had a bit of time to research the existing device code to see if I can use it for an integration with two specific use cases: 1. discovery/inventory

Re: [Puppet-dev] simplest way to synthetically compile a catalog and generate a graph from it?

2013-10-21 Thread Dan Bode
Hi Wolf, see if this works for you https://github.com/ripienaar/puppet-catalog-diff On Mon, Oct 21, 2013 at 12:25 PM, Wolf Noble loi...@wolfspaw.com wrote: Hi there, I realize this isn't quite a dev question, but I'm going to ask anyways :) my situation is that I'm trying to refactor a

Re: [Puppet-dev] Status of Data in modules

2013-10-11 Thread Dan Bode
On Fri, Oct 11, 2013 at 11:09 AM, Eric Sorenson eric.soren...@puppetlabs.com wrote: Thanks to everyone who kicked the tires on the experimental data in modules feature included in Puppet 3.3.0. We got a lot of feedback, some cool proof-of-concept modules, and a definitive conclusion to the

Re: [Puppet-dev] Release branches for puppetlabs modules

2013-09-24 Thread Dan Bode
We took this conversation to #puppet-openstack yesterday to discuss further. *The problem:* To summarize, with a Modulefile, we are able to specify release ranges: 1.2.x We are looking for a similar capability for .fixtures to use for unit testing. Not being able to express the same in

Re: [Puppet-dev] allow setting cinder volume_group name on controller

2013-03-05 Thread Dan Bode
HI Ikka, thanks for the note. This project has its own mailing list (puppet-openst...@puppetlabs.com) for future reference. On Tue, Mar 5, 2013 at 7:28 AM, Ilkka Tengvall eeme...@gmail.com wrote: I noticed puppetlabs/openstack and puppetlabs/cinder sets the cinder volume group

Re: [Puppet-dev] Using Puppet types in implementations of Type Providers

2013-02-27 Thread Dan Bode
On Mon, Feb 25, 2013 at 10:13 AM, David Stewart david.stew...@estafet.comwrote: Hi, I am new to puppet and have hit a problem in developing a module. I have defined a Type and Provider, but as the Provider is implemented in Ruby (i.e. a '.rb' file) I cannot leverage Puppet style constructs,

Re: [Puppet-dev] Custom (ruby) type in module not found - Invalid resource

2012-10-08 Thread Dan Bode
On Mon, Oct 8, 2012 at 7:56 AM, Axel B axel.bock...@gmail.com wrote: Hello readers, I have already asked this question in Puppet Users, but so far without working solution. Maybe I have more luck in here :) . I have developed a custom SVN type (based on http://is.gd/W0cIMS among others), and

[Puppet-dev] using parent providers from other modules

2012-10-03 Thread Dan Bode
Hi Puppet devs, I am trying to use a parent provider from another module. I put the following code in the provider that wants to inherit from the parent: Puppet::Type.type(:ini_setting)#.providers Puppet::Type.type(:keystone_config).provide( :ini_setting, :parent =

Re: [Puppet-dev] using parent providers from other modules

2012-10-03 Thread Dan Bode
On Wed, Oct 3, 2012 at 4:23 PM, Luke Kanies l...@puppetlabs.com wrote: On Oct 3, 2012, at 3:53 PM, Dan Bode d...@puppetlabs.com wrote: Hi Puppet devs, I am trying to use a parent provider from another module. I put the following code in the provider that wants to inherit from

[Puppet-dev] puppet device questions

2012-08-21 Thread Dan Bode
Hi Happy Puppet Developers, I have a few questions about the device management code. 1. What is the recommended way to retrieve the device connection information from a provider? Is it: Puppet::Util::NetworkDevice.current 2. Is it possible to have more settings in device.conf than just url?

Re: [Puppet-dev] How to have ensure routines notify something changed

2012-05-04 Thread Dan Bode
On Fri, May 4, 2012 at 1:46 PM, Philip Brown p...@bolthole.com wrote: On Friday, May 4, 2012 1:29:19 PM UTC-7, Luke Kanies wrote: On May 4, 2012, at 11:08 AM, Philip Brown wrote: I dont see how to send some kind of message to the logs, hey, something changed, but I'm fixing it.

Re: [Puppet-dev] How to have ensure routines notify something changed

2012-05-04 Thread Dan Bode
On Fri, May 4, 2012 at 2:03 PM, Philip Brown p...@bolthole.com wrote: Hmm, i guess I slightly misunderstood: my ensure routine should return false or true, i guess. But I'm still missing info :( In my trivial example below, the ensure routine gets called and prints out its debug line. But

Re: [Puppet-dev] Re: question regarding hashes/class parameter defaults

2012-05-02 Thread Dan Bode
that is going to be present at compile time. On May 1, 2012, at 9:16 PM, Dan Bode wrote: So, I dopped into the debugger with: $x = inline_template(%= require 'ruby-debug';debugger;puts 'foo' % and realized that the value returned from the statement: $var1_override = $override_hash['var1

[Puppet-dev] question regarding hashes/class parameter defaults

2012-05-01 Thread Dan Bode
Hi all, I have run into an example where Puppet behaves exactly like I hoped it would. I am a little concerned that it may just be a coincidence that it happens to work like this. My question is rather or not the following is specified behavior that I can take advantage of (I may take advantage

[Puppet-dev] Re: question regarding hashes/class parameter defaults

2012-05-01 Thread Dan Bode
the same as undefined in Puppet. On Tue, May 1, 2012 at 9:06 PM, Dan Bode d...@puppetlabs.com wrote: Hi all, I have run into an example where Puppet behaves exactly like I hoped it would. I am a little concerned that it may just be a coincidence that it happens to work like this. My question

Re: [Puppet-dev] Taking github noise away from puppet-dev list

2012-04-12 Thread Dan Bode
+1 On Mon, Apr 9, 2012 at 2:09 PM, Michael Stahnke stah...@puppetlabs.comwrote: Since our move to github for pull requests and patches, the usefulness of puppet-dev has declined significantly. puppet-dev used to be a great list for development discussion of puppet and the ecosystem around

Re: [Puppet-dev] Re: (puppetlabs/puppet-openstack) Essex release inquiry

2012-03-31 Thread Dan Bode
versions hosting our internal diablo deployment. But we plan to move to essex asap. I'm happy to help, so if someone has some efforts in progress, I'd rather contribute to that than do work off in my little corner. -Isaac On Mar 11, 10:02 pm, Dan Bode d...@puppetlabs.com wrote: Hi Lee

[Puppet-dev] Re: (puppetlabs/puppet-openstack) Essex release inquiry

2012-03-11 Thread Dan Bode
Hi Lee, Glad to here that you are interested in collaborating. On Fri, Mar 9, 2012 at 10:06 AM, Lee Thompson lthomp...@morphlabs.comwrote: We've been developing puppet manifests for the Essex release of OpenStack including nova, keystone, glance and swift. Did you fork the exiting modules?

Re: [Puppet-dev] Re: [Puppet Users] Re: Is it possible to get a list of all nodes in your manifests and all classes assigned to those nodes programatically in Ruby?

2011-11-22 Thread Dan Bode
You could use the resource_type indirection to query all of the resource types and select the ones of type node. This will only query the nodes that were specified in manifests (which is quite different from all of the nodes that have checked in) Below is some example code: require puppet/face

Re: [Puppet-dev] network device: appropriate for managing ec2 servers?

2011-09-12 Thread Dan Bode
This is kind of in a broken state at the moment, but its the same concept as what you are describing (actually if you revert to a previous commit, it should work) https://github.com/bodepd/puppet-ec2 On Mon, Sep 12, 2011 at 12:58 PM, Nan Liu n...@puppetlabs.com wrote: On Sun, Sep 11, 2011 at

[Puppet-dev] [PATCH/Module/puppetlabs-stdlib 2/2] (#8709) Add hash merging function

2011-07-29 Thread Dan Bode
In Puppet, it is not possible to reassign hash values. This function allows a reasonable way to perform hash munging in Puppet. Reviewed-by: Jeff McCune Signed-off-by: Dan Bode d...@puppetlabs.com --- lib/puppet/parser/functions/merge.rb| 28 spec/unit/puppet/parser

[Puppet-dev] [PATCH/Module/puppetlabs-stdlib 1/2] (#8708) Add has_key function

2011-07-29 Thread Dan Bode
It is difficult to use existance of keys in a hash as a boolean condition in Puppet (see #8705) This function provides a working solution until the underlying issue in Puppet can be resolved. Reviewed-by: Jeff McCune Signed-off-by: Dan Bode d...@puppetlabs.com --- lib/puppet/parser/functions

Re: [Puppet-dev] Re: Kwalify validation

2011-07-27 Thread Dan Bode
On Wed, Jul 27, 2011 at 10:00 AM, Ken Barber k...@puppetlabs.com wrote: So I managed to make some of this work in core. I've got a very basic patch ... its not what one would call complete but I want to make sure I'm going in the right direction:

[Puppet-dev] [PATCH] (#8665) Change type from append_line to whole_line

2011-07-27 Thread Dan Bode
Changed the type name from append_line to whole_line. After feedback that having a type with a verb in the name was confusing. --- lib/puppet/provider/append_line/ruby.rb| 15 --- lib/puppet/provider/whole_line/ruby.rb | 15 +++ lib/puppet/type/append_line.rb

[Puppet-dev] [PATCH/Module/puppetlabs-stdlib 1/1] (#8665) Change type from append_line to whole_line

2011-07-27 Thread Dan Bode
Changed the type name from append_line to whole_line. After feedback that having a type with a verb in the name was confusing. Signed-off-by: Dan Bode d...@puppetlabs.com --- .../provider/{append_line = whole_line}/ruby.rb |2 +- lib/puppet/type/{append_line.rb = whole_line.rb} |6

[Puppet-dev] [PATCH/Cloudpack/puppet-cloudpack 3/4] (#8504) Removed PE specific logging.

2011-07-20 Thread Dan Bode
Previously success was indicated with PE specific messages. This could be confusing for users installing FOSS with cloud-provisoner. Signed-off-by: Dan Bode d...@puppetlabs.com --- lib/puppet/cloudpack.rb |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/lib/puppet

[Puppet-dev] [PATCH/Cloudpack/puppet-cloudpack 2/4] (#8472) Add support for non-root logins

2011-07-18 Thread Dan Bode
Install script execution should support authorized super users. This patch pre-pends sudo to the install_command when the login option is not root. This commit also adds some basic unit testing of the install command Signed-off-by: Dan Bode d...@puppetlabs.com --- lib/puppet/cloudpack.rb

[Puppet-dev] [PATCH/Cloudpack/puppet-cloudpack 1/4] (#8470) Allow tags or master as puppet-version

2011-07-18 Thread Dan Bode
It makes sense for puppet-version to refer to revisions when installing puppet from source. I have modified the regex to allow it to take revisions of the form \d+\.\d+\.x and master I also added unit tests for validation of the puppet-version option. Signed-off-by: Dan Bode d...@puppetlabs.com

[Puppet-dev] [PATCH/Cloudpack/puppet-cloudpack 4/4] (#8464) Supply script to install master to testing

2011-07-18 Thread Dan Bode
To allow for easier testing. This script installs a puppet master from source and authorizes the localhost (based on hostname where puppet node install is executed) to be autosigned and to be authorized to sign certificates. Signed-off-by: Dan Bode d...@puppetlabs.com --- lib/puppet/cloudpack

Re: [Puppet-dev] Testing defined types

2011-07-17 Thread Dan Bode
{ baz { 'name': test = value, } } Looking over Puppet::Node, I can see how to apply classes to a host, but nothing about individual resources. If someone could point me in the right direction, that'd be greatly appreciated. Dan Bode has some interesting work here, I think - hopefully

Re: [Puppet-dev] Testing defined types

2011-07-17 Thread Dan Bode
On Sun, Jul 17, 2011 at 10:23 PM, Luke Kanies l...@puppetlabs.com wrote: On Jul 17, 2011, at 4:53 PM, Tim Sharpe wrote: Hi Dan, Yeah, I'm focusing mainly on getting a clean RSpec API at the moment. What it looks like currently is require 'rspec-puppet' describe 'sysctl', :type

[Puppet-dev] [PATCH/Cloudpack/puppet-cloudpack 06/17] (#8369) Mocked more Fog::SSH methods

2011-07-14 Thread Dan Bode
Signed-off-by: Dan Bode d...@puppetlabs.com --- spec/unit/puppet/cloudpack_spec.rb | 27 +++ 1 files changed, 27 insertions(+), 0 deletions(-) diff --git a/spec/unit/puppet/cloudpack_spec.rb b/spec/unit/puppet/cloudpack_spec.rb index 27aa94d..160cb9a 100644 --- a/spec/unit

[Puppet-dev] [PATCH/Cloudpack/puppet-cloudpack 11/17] (#8369) Test run_install_script

2011-07-14 Thread Dan Bode
Initial test for run_install_script. tests that the expected commands are called with and without sudo. Reviewed-by: Jeff McCune Signed-off-by: Dan Bode d...@puppetlabs.com --- spec/unit/puppet/cloudpack_spec.rb | 15 +++ 1 files changed, 15 insertions(+), 0 deletions(-) diff

[Puppet-dev] [PATCH/Cloudpack/puppet-cloudpack 02/17] (#8369) moved code for creating tmp directory

2011-07-14 Thread Dan Bode
As part of ths refactor, the code for creating a tmp_dir has changed. - ssh is now connections[:ssh] - the tmp dir should be determined in the install method, because the path is required by multiple other methods. Reviewed-by: Jeff McCune Signed-off-by: Dan Bode d...@puppetlabs.com --- lib

[Puppet-dev] [PATCH/Cloudpack/puppet-cloudpack 04/17] (#8369) Move script compilation to its own method

2011-07-14 Thread Dan Bode
To make testing easier. Moved option assignments out of method for options that are used by other functions. Reviewed-by: Jeff McCune Signed-off-by: Dan Bode d...@puppetlabs.com --- lib/puppet/cloudpack.rb | 13 +++-- 1 files changed, 7 insertions(+), 6 deletions(-) diff --git a/lib

[Puppet-dev] [PATCH/Cloudpack/puppet-cloudpack 05/17] (#8369) Move installation code to its own method

2011-07-14 Thread Dan Bode
To make testing easier. clarified the variables required for running the installation script. Reviewed-by: Jeff McCune Signed-off-by: Dan Bode d...@puppetlabs.com --- lib/puppet/cloudpack.rb |7 +-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/puppet/cloudpack.rb

[Puppet-dev] [PATCH/Cloudpack/puppet-cloudpack 07/17] (#8369) Add common elements for install tests.

2011-07-14 Thread Dan Bode
Add before section to build out a tempfile and mock connections object that can be used in the tests. Reviewed-by: Jeff McCune Signed-off-by: Dan Bode d...@puppetlabs.com --- spec/unit/puppet/cloudpack_spec.rb | 10 +- 1 files changed, 9 insertions(+), 1 deletions(-) diff --git

[Puppet-dev] [PATCH/Cloudpack/puppet-cloudpack 03/17] (#8369) Crate method for copying payloads.

2011-07-14 Thread Dan Bode
Moved code related to files that are scp'ed to its own method to make testing easier. Moved validation of related options to this method Reviewed-by: Jeff McCune Signed-off-by: Dan Bode d...@puppetlabs.com --- lib/puppet/cloudpack.rb | 17 ++--- 1 files changed, 10 insertions

[Puppet-dev] [PATCH/Cloudpack/puppet-cloudpack 14/17] (#8369) Improved wording for tests.

2011-07-14 Thread Dan Bode
Install changed to upload for clarity. Reviewed-by: Jeff McCune Signed-off-by: Dan Bode d...@puppetlabs.com --- spec/unit/puppet/cloudpack_spec.rb |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/unit/puppet/cloudpack_spec.rb b/spec/unit/puppet/cloudpack_spec.rb

[Puppet-dev] [PATCH/Cloudpack/puppet-cloudpack 16/17] (#8369) Documented unclear test

2011-07-14 Thread Dan Bode
Previously it was not so clear that Signed-off-by: Dan Bode d...@puppetlabs.com Reviewed-by: Jeff McCune --- spec/unit/puppet/cloudpack_spec.rb |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/spec/unit/puppet/cloudpack_spec.rb b/spec/unit/puppet/cloudpack_spec.rb

[Puppet-dev] [PATCH/Cloudpack/puppet-cloudpack 01/17] (#8369) split ssh connection into its own method

2011-07-14 Thread Dan Bode
This is part of a refactor to simplify testing. Splitting the ssh connection code into its own method. Reviewed-by: Jeff McCune Signed-off-by: Dan Bode d...@puppetlabs.com --- lib/puppet/cloudpack.rb | 10 ++ 1 files changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/puppet

[Puppet-dev] [PATCH/Cloudpack/puppet-cloudpack 15/17] (#8369) Added require to net/ssh

2011-07-14 Thread Dan Bode
Required in order to identify the ssh exceptions. Reviewed-by: Jeff McCune Signed-off-by: Dan Bode d...@puppetlabs.com --- lib/puppet/cloudpack.rb |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/lib/puppet/cloudpack.rb b/lib/puppet/cloudpack.rb index 3fce683..0ad3f1e

[Puppet-dev] [PATCH/Cloudpack/puppet-cloudpack 08/17] (#8369) Add tests for ssh_connect

2011-07-14 Thread Dan Bode
Adding initial tests of ssh connection code. Reviewed-by: Jeff McCune Signed-off-by: Dan Bode d...@puppetlabs.com --- spec/unit/puppet/cloudpack_spec.rb | 19 +++ 1 files changed, 19 insertions(+), 0 deletions(-) diff --git a/spec/unit/puppet/cloudpack_spec.rb b/spec/unit

[Puppet-dev] [PATCH/Cloudpack/puppet-cloudpack 13/17] (#8369) Use keyfile variable

2011-07-14 Thread Dan Bode
Was incorrectly referring to keyfile as a symbol Reviewed-by: Jeff McCune Signed-off-by: Dan Bode d...@puppetlabs.com --- lib/puppet/cloudpack.rb |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/lib/puppet/cloudpack.rb b/lib/puppet/cloudpack.rb index 1d94f68..3fce683

[Puppet-dev] [PATCH/Cloudpack/puppet-cloudpack 17/17] (#8369) Improve timeout failure test

2011-07-14 Thread Dan Bode
Stubbed sleep to make it retry and fail faster raised an AuthenticationFailed (to emulate a more likely failure) Reviewed-by: Jeff McCune Signed-off-by: Dan Bode d...@puppetlabs.com --- spec/unit/puppet/cloudpack_spec.rb |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff

[Puppet-dev] [PATCH/Cloudpack/puppet-cloudpack 12/17] (#8369) Need to set options[:certname]

2011-07-14 Thread Dan Bode
Template compilation expects this variable to be set. Reviewed-by: Jeff McCune Signed-off-by: Dan Bode d...@puppetlabs.com --- lib/puppet/cloudpack.rb |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/lib/puppet/cloudpack.rb b/lib/puppet/cloudpack.rb index 63f3815

[Puppet-dev] [PATCH/puppet 1/1] (#7699) Help command should only list options once

2011-07-13 Thread Dan Bode
The problem was caused by the fact that the options method returns a list of options that treated the aliases as seperate options. The fix is to only maintain a list of options and not add all aliases to the options list. Signed-off-by: Dan Bode d...@puppetlabs.com --- Local-branch: issue/2.7.x

Re: [Puppet-dev] [PATCH/puppet 1/1] (#7699) Help command should only list options once

2011-07-13 Thread Dan Bode
this behavior. regards, Dan On Wed, Jul 13, 2011 at 3:43 PM, Dan Bode d...@puppetlabs.com wrote: The problem was caused by the fact that the options method returns a list of options that treated the aliases as seperate options. The fix is to only maintain a list of options and not add all aliases

Re: [Puppet-dev] [PATCH/puppet 1/1] (#7699) - Help should only show options once

2011-07-06 Thread Dan Bode
passed after this patch) If anything else is expecting a list of all of the face aliases, it should probably use @options_hash.keys On Wed, Jul 6, 2011 at 10:04 PM, Dan Bode d...@puppetlabs.com wrote: puppet help was reprinting every option once for every alias that is had. This fix involves only

[Puppet-dev] Re: Puppet not accepting hashes from getter method?

2011-06-23 Thread Dan Bode
On Thu, Jun 23, 2011 at 3:33 PM, Carl Caum c...@puppetlabs.com wrote: I'm working on a provider and noticed my getter method for parameters can't pass back a hash or embedded array. I need the user to pass in a hash for a parameter. If the getter method can't return a hash, I don't see how I

Re: [Puppet-dev] Open Source Team planning meeting summary 2011-06-1

2011-06-15 Thread Dan Bode
Hi, I just wanted to clarify something from this email. Although the best way to get traction for a ticket in the future will be voting in the ticketing system, people are always welcome to highlight particular tickets in order to solicit votes. With that in mind, a quick list of things that I

Re: [Puppet-dev] [PATCH/facter 1/1] (#6792) Added osfamily fact.

2011-06-09 Thread Dan Bode
On Wed, Jun 8, 2011 at 1:43 PM, Adrien Thebo adr...@puppetlabs.com wrote: Added osfamily fact to determine if a given operating system is a derivative of a common operating system. Huge +1 Signed-off-by: Adrien Thebo adr...@puppetlabs.com --- Local-branch: ticket/master/6792

Re: [Puppet-dev] [PATCH/facter 1/1] (#6792) Added osfamily fact.

2011-06-09 Thread Dan Bode
On Thu, Jun 9, 2011 at 9:41 AM, markus mar...@reality.com wrote: Huge +1 unmeasurable +1i Because you've reviewed it, or because you think it's a good idea? One convention that works (for me at least) is to use complex numbers where the real part is for the actual code and

Re: [Puppet-dev] issue 7629 against master

2011-05-24 Thread Dan Bode
On Mon, May 23, 2011 at 10:45 PM, Luke Kanies l...@puppetlabs.com wrote: On May 23, 2011, at 11:45 AM, Dan Bode wrote: This is an experimental set of patches that I wrote for composite namevars to work with parsedfile and to support purging. This is not ready to be merged, I would just

Re: [Puppet-dev] issue 7629 against master

2011-05-24 Thread Dan Bode
(namely puppet resouce) to break, I am still looking into those. https://github.com/bodepd/puppet/tree/mastercompositenamevar On Mon, May 23, 2011 at 2:25 PM, Stefan Schulte stefan.schu...@taunusstein.net wrote: On Mon, May 23, 2011 at 11:45:45AM -0700, Dan Bode wrote: This is an experimental set

[Puppet-dev] [PATCH/puppet 2/7] (#7629) parsedfile should use composite namevar to compare records to the resources that we have specified.

2011-05-23 Thread Dan Bode
. Signed-off-by: Dan Bode d...@puppetlabs.com --- Local-branch: issue/master/7629 lib/puppet/provider/parsedfile.rb |7 ++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/lib/puppet/provider/parsedfile.rb b/lib/puppet/provider/parsedfile.rb index 75a215f..522930e 100755

[Puppet-dev] [PATCH/puppet 4/7] (#7629) provider name should be derived using namevar_join.

2011-05-23 Thread Dan Bode
- it was previously hardcoded to use :name param which does not work for composite namevars. Signed-off-by: Dan Bode d...@puppetlabs.com --- Local-branch: issue/master/7629 lib/puppet/provider.rb |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/lib/puppet/provider.rb b

[Puppet-dev] [PATCH/puppet 7/7] (#7629) hash2resource should use namevar_join.

2011-05-23 Thread Dan Bode
For types with composite namevars, hash2resource should use namevar_join to populate tilte with namevar. Signed-off-by: Dan Bode d...@puppetlabs.com --- Local-branch: issue/master/7629 lib/puppet/type.rb |7 +-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/puppet

[Puppet-dev] issue 7629 against master

2011-05-23 Thread Dan Bode
This is an experimental set of patches that I wrote for composite namevars to work with parsedfile and to support purging. This is not ready to be merged, I would just like to get some input on the following: - does this work (for people who have pending composite namevar work) - will this

[Puppet-dev] [PATCH/puppet 5/7] (#7629) should identify resources by uniqueness key during prefetching.

2011-05-23 Thread Dan Bode
- this ensures that resources are unique based on composite namevars. - I need to review why this is required.. Signed-off-by: Dan Bode d...@puppetlabs.com --- Local-branch: issue/master/7629 lib/puppet/transaction.rb |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git

[Puppet-dev] [PATCH/puppet 3/7] (#7629) added namevar_join method to type

2011-05-23 Thread Dan Bode
-by: Dan Bode d...@puppetlabs.com --- Local-branch: issue/master/7629 lib/puppet/type.rb |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/lib/puppet/type.rb b/lib/puppet/type.rb index 1dbf124..dc4764e 100644 --- a/lib/puppet/type.rb +++ b/lib/puppet/type.rb @@ -219,6

[Puppet-dev] [PATCH/puppet 6/7] (#7629) changed name to title since types with composite namevars may not have a :name parmeter.

2011-05-23 Thread Dan Bode
Signed-off-by: Dan Bode d...@puppetlabs.com --- Local-branch: issue/master/7629 lib/puppet/type.rb |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/lib/puppet/type.rb b/lib/puppet/type.rb index dc4764e..e62a764 100644 --- a/lib/puppet/type.rb +++ b/lib/puppet/type.rb

[Puppet-dev] [PATCH/puppet 1/7] (#7625) should fail explicitly if no title_pattern is matched

2011-05-23 Thread Dan Bode
- Introduction of composite namevars places extra restrictions on resource title format (in order to guarantee uniqueness it should be based on all namevars) - Puppet was not explicitly handling the case where the title is invalid Signed-off-by: Dan Bode d...@puppetlabs.com --- Local

Re: [Puppet-dev] isrequired doesn't do anything in a type?

2011-05-23 Thread Dan Bode
its been like that for at least a year: http://projects.puppetlabs.com/issues/4049 On Mon, May 23, 2011 at 11:53 AM, Jacob Helwig ja...@puppetlabs.com wrote: So, I'm working on #7188 and thought hey, it would be great if we had built-in checks that these required parameters were actually

Re: [Puppet-dev] [PATCH/puppet 5/7] (#7629) should identify resources by uniqueness key during prefetching.

2011-05-23 Thread Dan Bode
On Mon, May 23, 2011 at 11:45 AM, Dan Bode d...@puppetlabs.com wrote: - this ensures that resources are unique based on composite namevars. - I need to review why this is required.. Signed-off-by: Dan Bode d...@puppetlabs.com --- Local-branch: issue/master/7629 lib/puppet/transaction.rb

Re: [Puppet-dev] [PATCH/puppet 3/7] (#7629) added namevar_join method to type

2011-05-23 Thread Dan Bode
On Mon, May 23, 2011 at 11:45 AM, Dan Bode d...@puppetlabs.com wrote: - for composite namevars to support purging and 'puppet resource' quiery all, it needs to be possible to map from the composite namevars to a single id. - the basic idea is that authors of types need to implement

Re: [Puppet-dev] [PATCH/puppet 7/7] (#7629) hash2resource should use namevar_join.

2011-05-23 Thread Dan Bode
On Mon, May 23, 2011 at 11:45 AM, Dan Bode d...@puppetlabs.com wrote: For types with composite namevars, hash2resource should use namevar_join to populate tilte with namevar. Signed-off-by: Dan Bode d...@puppetlabs.com --- Local-branch: issue/master/7629 lib/puppet/type.rb |7

Re: [Puppet-dev] issue 7629 against master

2011-05-23 Thread Dan Bode
:name is special (and hardcoded) in several parts of the Puppet code. Could you try using some other name that :name and see if it resolves those issues? On Mon, May 23, 2011 at 2:25 PM, Stefan Schulte stefan.schu...@taunusstein.net wrote: On Mon, May 23, 2011 at 11:45:45AM -0700, Dan Bode

Re: [Puppet-dev] issue 7629 against master

2011-05-23 Thread Dan Bode
can you point me to a branch I can pull from? On Mon, May 23, 2011 at 3:12 PM, Stefan Schulte stefan.schu...@taunusstein.net wrote: On Mon, May 23, 2011 at 02:39:40PM -0700, Dan Bode wrote: :name is special (and hardcoded) in several parts of the Puppet code. Could you try using some

[Puppet-dev] composite namevars (part 1) - purging

2011-05-22 Thread Dan Bode
Hi all, I have been working on getting composite namevars to work with parsedfile. It actually seems to get a little sticky for purging, below I am outlining how it works, I was just curious if anyone has spent time thinking about this use case before and how it should work: As far as I can

Re: [Puppet-dev] composite namevars (part 1) - purging

2011-05-22 Thread Dan Bode
On Sun, May 22, 2011 at 4:42 PM, markus mar...@reality.com wrote: It actually seems to get a little sticky for purging, below I am outlining how it works, I was just curious if anyone has spent time thinking about this use case before and how it should work: As far as I can tell, the

[Puppet-dev] Fwd: questions regarding #5605

2011-05-22 Thread Dan Bode
-- Forwarded message -- From: Dan Bode d...@puppetlabs.com Date: Sun, May 22, 2011 at 3:02 PM Subject: questions regarding #5605 To: stefan.schu...@taunusstein.net Hi Stefan, I recently was trying to used parsedfile with composite namevars, so I, of course ran across all of your

Re: [Puppet-dev] composite namevars (part 1) - purging

2011-05-22 Thread Dan Bode
I just finished something very similar: def self.title_join(hash) #{hash[:domain]}/#{hash[:type]}/#{hash[:item]} end where the default case was: + def self.title_join(hash) +case key_attributes.length +when 0,1; hash[:name] +else + Puppet.warning('you should specify a

Re: [Puppet-dev] [PATCH/puppet 0/3] #6850 and #6851 - Improving ResourceType listing

2011-03-28 Thread Dan Bode
does this resolve: http://projects.puppetlabs.com/issues/6650 ? On Mon, Mar 28, 2011 at 10:49 AM, Luke Kanies l...@puppetlabs.com wrote: This commit series significantly improves interacting with the list of Resource Types over the REST api (or locally). The first patch simplifies the JSON

[Puppet-dev] [PATCH/puppet 1/1] (5909) Function to dyncamically generate resources.

2011-03-17 Thread Dan Bode
webserver instances are deployed to nodes by updating the YAML files. Signed-off-by: Dan Bode bod...@gmail.com --- lib/puppet/parser/functions/create_resources.rb| 47 +++ .../unit/parser/functions/create_resources_spec.rb | 135 2 files changed, 182 insertions(+), 0

Re: [Puppet-dev] [PATCH/puppet 1/1] (5909) Function to dyncamically generate resources.

2011-03-17 Thread Dan Bode
On Thu, Mar 17, 2011 at 6:53 AM, Nigel Kersten ni...@puppetlabs.com wrote: On Thu, Mar 17, 2011 at 2:22 AM, Dan Bode bod...@gmail.com wrote: This function allows you to dynamically generate resources, passing them as a hash to the create_resources function. One of the bits of feedback

Re: [Puppet-dev] [PATCH/puppet 1/1] (5909) Function to dyncamically generate resources.

2011-03-17 Thread Dan Bode
On Thu, Mar 17, 2011 at 8:26 AM, Luke Kanies l...@puppetlabs.com wrote: On Mar 17, 2011, at 6:53 AM, Nigel Kersten ni...@puppetlabs.com wrote: On Thu, Mar 17, 2011 at 2:22 AM, Dan Bode bod...@gmail.com wrote: This function allows you to dynamically generate resources, passing them

Re: [Puppet-dev] [PATCH/puppet 1/1] (5909) Function to dyncamically generate resources.

2011-03-17 Thread Dan Bode
On Thu, Mar 17, 2011 at 10:53 AM, Daniel Pittman dan...@puppetlabs.comwrote: On Thu, Mar 17, 2011 at 02:22, Dan Bode bod...@gmail.com wrote: This function allows you to dynamically generate resources, passing them as a hash to the create_resources function. This was originally written

[Puppet-dev] Re: [Puppet Users] Puppet Parse Trees (for a lint checker)

2011-03-01 Thread Dan Bode
Hi Nick (long time :) ) On Tue, Mar 1, 2011 at 3:14 AM, Nick Moffitt n...@zork.net wrote: I mean to write a lint checker for my manifests, but I am not a ruby developer to any degree of proficiency. What I think I would like is some kind of serialization of the AST for a given .pp file,

Re: [Puppet-dev] [PATCH/puppet 1/1] (#6418) Recursive files shouldn't be audited

2011-02-24 Thread Dan Bode
I just opened http://projects.puppetlabs.com/issues/6443 saying that auditing should be disabled by default: I ran into two instances where auditing was logged: 1. when files updating due to pluginsync 2. any new files where source is managed I know #2 is a regression in 2.6.5, I am not 100%

Re: [Puppet-dev] Feedback on Puppet 'interface' command.

2011-02-22 Thread Dan Bode
On Tue, Feb 22, 2011 at 1:44 PM, Trevor Vaughan tvaug...@onyxpoint.comwrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 So, I got this working and have played around with it a bit. My feedback is below. 1) You need to include the 'interface' lib path before the puppet lib path in

[Puppet-dev] Re: writing a dashboard interface

2011-02-22 Thread Dan Bode
this is the solution that I settled on: Dir.chdir(@dashboard_path) do klasses.collect do |klass| stdout = `rake nodeclass:add name=#{klass.name}` adding class:#{klass.name}:#{stdout} end end lame :( On Tue, Feb 22, 2011 at 5:02 PM, Dan Bode d...@puppetlabs.com wrote

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 tvaug...@onyxpoint.comwrote: 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.

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 goo...@erisiandiscord.dewrote: 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 =

Re: [Puppet Users] Re: [Puppet-dev] Collections and Realizing Resources

2011-02-14 Thread Dan Bode
On Mon, Feb 14, 2011 at 6:49 AM, Nigel Kersten ni...@puppetlabs.com wrote: On Sun, Feb 13, 2011 at 9:59 PM, Dan Bode d...@puppetlabs.com wrote: We have only been teaching | | in the puppetmaster training as a way to realize virtual resources. We do not teach that it is possible to override

Re: [Puppet Users] Re: [Puppet-dev] Collections and Realizing Resources

2011-02-13 Thread Dan Bode
On Sun, Feb 13, 2011 at 7:21 PM, Nigel Kersten ni...@puppetlabs.com wrote: On Sat, Feb 12, 2011 at 7:40 PM, Dan Bode d...@puppetlabs.com wrote: Could we add the ability to query whether a given resource has been realized or not? How much of an ordering problem is this? Package | state

[Puppet-dev] cache vs. terminus

2011-02-10 Thread Dan Bode
Hi devs, Can someone please explain the exact difference between an indirector's terminus and a cache (an example illustrating the differences would be ideal) thanks, Dan -- You received this message because you are subscribed to the Google Groups Puppet Developers group. To post to this

Re: [Puppet-dev] converting 0.25.5 catalogs into 2.6.4

2011-02-06 Thread Dan Bode
: Dan Bode wrote: I'm a little unclear on the context here. just a random question, I am trying to use existing Puppet methods when it feels like I am reimplementing something that may exist. What's the intent though? What are you trying to achieve? Regards James -- James

Re: [Puppet-dev] converting 0.25.5 catalogs into 2.6.4

2011-02-06 Thread Dan Bode
On Sun, Feb 6, 2011 at 7:43 AM, Markus Roberts mar...@puppetlabs.comwrote: D -- The intent is to perform operations on catalogs from 0.25.x using the 2.6.x codebase. things like: - diffs - Writing filters (show me all resources, show me all Files) - eventually some more

[Puppet-dev] converting 0.25.5 catalogs into 2.6.4

2011-02-05 Thread Dan Bode
Is there a method somewhere in puppet to convert 0.25.x catalogs into something that 2.6.x can interact with? I had to monkeypatch the resources: catalog.resources.each do |r| unless r.title # this is for 0.25 catalogs, this is ghetto, # but I think it needs to

Re: [Puppet-dev] converting 0.25.5 catalogs into 2.6.4

2011-02-05 Thread Dan Bode
On Sat, Feb 5, 2011 at 12:37 PM, Markus Roberts mar...@puppetlabs.comwrote: D -- Is there a method somewhere in puppet to convert 0.25.x catalogs into something that 2.6.x can interact with? I had to monkeypatch the resources: catalog.resources.each do |r| unless r.title

Re: [Puppet-dev] RFC - introduction of self keyword

2011-02-02 Thread Dan Bode
On Tue, Feb 1, 2011 at 10:47 PM, Luke Kanies l...@puppetlabs.com wrote: On Feb 1, 2011, at 2:02 PM, Dan Bode wrote: Hi all, I wanted to open the feature request http://projects.puppetlabs.com/issues/5824 for discussion. I like to specify all dependencies not defined within the enclosed

[Puppet-dev] resource deps in catalog

2011-02-01 Thread Dan Bode
Hi all, I am trying to reduce a catalog down to only the resources with their dependencies. I can get all resources in the catalog (including defined resource types, classes, stages, and nodes) with the @catalog.resources method: I can get just the resources that will be applied with:

[Puppet-dev] RFC - introduction of self keyword

2011-02-01 Thread Dan Bode
Hi all, I wanted to open the feature request http://projects.puppetlabs.com/issues/5824 for discussion. I like to specify all dependencies not defined within the enclosed scope using the new relationship syntax. This leads to nice clean error messages if the required resources have not been

Re: [Puppet-dev] Tags

2011-01-28 Thread Dan Bode
On Fri, Jan 28, 2011 at 3:50 PM, James Turnbull ja...@lovedthanlost.netwrote: Is there is way using the node YAML terminus to pull out all of the tags? I can get facts through: Puppet::Node::Facts.search(*) If I do Puppet::Node.search is there a method available that returns tags - I

  1   2   >