Re: [Puppet-dev] Re: Validation Resources

2015-05-14 Thread Dan Bode
for external service': fail => $fail } service {'local_service': 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 dis

[Puppet-dev] Re: Validation Resources

2015-05-14 Thread Dan Bode
This is tracked in jira: > https://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 O

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 wrote: > On Fri, Nov 28, 2014 at 8:30 AM, Dan Bode wrote: > >> On Tue, Nov 25, 2014 at 5:25 PM, Trevor Vaughan >> wrote: >> >>> Hi All, >>> >>> I've got a couple of issues running rspec-puppe

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 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 parsed *after* the in

[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 wrote: > 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: > &g

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 wrote: > On Wed, Dec 11, 2013 at 8:51 AM, Dan Bode 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

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 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 large module bas

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

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

Re: [Puppet-dev] Referencing other resources in parameters

2013-08-21 Thread Dan Bode
I've done it before and didn't have any problems. On Wed, Aug 21, 2013 at 11:15 AM, Trevor Vaughan wrote: > This probably won't do what you want in all cases as it will probably be > manifest parse order dependent. > I'm not sure what part you are saying would be parse order dependent. Referenc

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 wrote: > I noticed puppetlabs/openstack and puppetlabs/cinder sets the cinder > volume group inconsistently. It allows sett

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 wrote: > 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, e.g. if > 'create' is

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 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 I guess > it's fa

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 wrote: > On Oct 3, 2012, at 3:53 PM, Dan Bode 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 inher

[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 => Puppet::Type::Ini_settin

[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? Fo

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 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 the other r

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 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] Re: question regarding hashes/class parameter defaults

2012-05-02 Thread Dan Bode
into account the data 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' %>" > >

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

2012-05-01 Thread Dan Bode
ion of my question is rather or not nil can be treated the same as undefined in Puppet. On Tue, May 1, 2012 at 9:06 PM, Dan Bode 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

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

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

2012-04-11 Thread Dan Bode
+1 On Mon, Apr 9, 2012 at 2:09 PM, Michael Stahnke wrote: > 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 it. With the informa

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

2012-03-31 Thread Dan Bode
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 wrote:

[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 wrote: > We've been developing puppet manifests for the Essex release of > OpenStack including nova, keystone, glance and swift. Did you fork the exiting modules? https://github.com/pu

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 wrote: > On Sun, Sep 11, 2011 at 8:09 PM, Rob Terhaar

[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 --- lib/puppet/parser/functions/merge.rb| 28 spec/unit/puppet/parser/functions

[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 --- lib/puppet/parser/functions/has_key.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 --- .../provider/{append_line => whole_line}/ruby.rb |2 +- lib/puppet/type/{append_line.rb => whole_line.rb}

[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

Re: [Puppet-dev] Re: Kwalify validation

2011-07-27 Thread Dan Bode
On Wed, Jul 27, 2011 at 10:00 AM, Ken Barber 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: > > > https://github.com/kbarber/puppet/commit/74d32f3d8c565567f

[Puppet-dev] [PATCH/Cloudpack/puppet-cloudpack 1/1] (#8528) Removed terminate signal from bootstrap

2011-07-20 Thread Dan Bode
methods. Reviewed-by: Jeff McCune Signed-off-by: Dan Bode --- lib/puppet/cloudpack.rb |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/lib/puppet/cloudpack.rb b/lib/puppet/cloudpack.rb index b2d27b8..38c1796 100644 --- a/lib/puppet/cloudpack.rb +++ b/lib/puppet

[Puppet-dev] [PATCH/Cloudpack/puppet-cloudpack 4/4] (#8517) Should install dashboard for testing

2011-07-20 Thread Dan Bode
Renamed the master_source script to indicate that it is only intended to be used for development/testing. Added more logic for installing the dashboard for testing. Signed-off-by: Dan Bode --- .../{master_source.erb => master_source_dev.erb} | 35 +++- 1 files changed,

[Puppet-dev] [PATCH/Cloudpack/puppet-cloudpack 2/4] (#8501) Making ssh connections more robust.

2011-07-20 Thread Dan Bode
There were some timing issues where net/ssh could get stuck in a loop when connecting to ubuntu. This has been resolved by specifying a 10 second timeout on the method call that tests the initial connection. Signed-off-by: Dan Bode --- lib/puppet/cloudpack.rb | 14 +- 1 files

[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 --- lib/puppet/cloudpack.rb |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/lib/puppet/cloudpack.rb b/lib

[Puppet-dev] [PATCH/Cloudpack/puppet-cloudpack 1/4] (#8513) Make classifcation of node optional

2011-07-20 Thread Dan Bode
been removed. Signed-off-by: Dan Bode --- lib/puppet/cloudpack.rb |9 - spec/unit/puppet/face/node/bootstrap_spec.rb |6 -- spec/unit/puppet/face/node/classify_spec.rb | 13 +++-- spec/unit/puppet/face/node/init_spec.rb |7 --- 4

Re: [Puppet-dev] [PATCH/puppet 1/1] (#7637) certificate action should only save 1 csr

2011-07-19 Thread Dan Bode
please disregard the first email in the thread. I decided to clean up the wording of the unit tests and resubmitted. On Tue, Jul 19, 2011 at 11:40 AM, Dan Bode wrote: > The certificate generate action was previously > attepting to save the csr twice. > > This patch resolves t

[Puppet-dev] [PATCH/puppet 1/1] (#7637) certificate action should only save 1 csr

2011-07-19 Thread Dan Bode
The certificate generate action was previously attepting to save the csr twice. This patch resolves the issue and eliminates the resulting error message. Signed-off-by: Dan Bode --- Local-branch: issue/2.7.x/7637_creates_csr_twice lib/puppet/face/certificate.rb |1 - spec/unit/face

[Puppet-dev] [PATCH/puppet 1/1] (#7637) certificate action should only save 1 csr

2011-07-19 Thread Dan Bode
The certificate generate action was previously attepting to save the csr twice. This patch resolves the issue and eliminates the resulting error message. Signed-off-by: Dan Bode --- Local-branch: issue/2.7.x/7637_creates_csr_twice lib/puppet/face/certificate.rb |1 - spec/unit/face

[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 --- lib/puppet/cloudpack/scripts

[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 --- lib/puppet/cloudpack.rb|1

[Puppet-dev] [PATCH/Cloudpack/puppet-cloudpack 3/4] (#8437) Sets server as options[:public_dns_name]

2011-07-18 Thread Dan Bode
This allows install_scripts access to the public dns name of the server. Used in the master installation script to supply public_dns_name as a certdnsname Signed-off-by: Dan Bode --- lib/puppet/cloudpack.rb|1 + spec/unit/puppet/cloudpack_spec.rb |7 +++ 2 files changed

[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 --- lib/puppet

Re: [Puppet-dev] Testing defined types

2011-07-17 Thread Dan Bode
On Sun, Jul 17, 2011 at 10:23 PM, Luke Kanies 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 => :defin

Re: [Puppet-dev] Testing defined types

2011-07-16 Thread Dan Bode
> (probably using rspec) to test that node with facts applying > define with params creates a catalogue with the following > resources... > > Basically, I want to generate the catalogue for the following and then > inspect it's contents. > > node "foo"

[Puppet-dev] [PATCH/Cloudpack/puppet-cloudpack 09/17] (#8369) Test upload_payload function

2011-07-14 Thread Dan Bode
- initial tests for upload_payloads function - test that files are uploaded when specified - verify validation of combination of params. Reviewed-by: Jeff McCune Signed-off-by: Dan Bode --- spec/unit/puppet/cloudpack_spec.rb | 41 1 files changed, 41

[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 --- lib/puppet/cloudpack.rb | 13 +++-- 1 files changed, 7 insertions(+), 6 deletions(-) diff --git a/lib/puppet

[Puppet-dev] [PATCH/Cloudpack/puppet-cloudpack 10/17] (#8369) Test template compilation

2011-07-14 Thread Dan Bode
Verifying that given a valid script, the compile template method can create a compiled temp file. Reviewed-by: Jeff McCune Signed-off-by: Dan Bode --- spec/unit/puppet/cloudpack_spec.rb | 22 ++ 1 files changed, 22 insertions(+), 0 deletions(-) diff --git a/spec/unit

[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 --- lib/puppet/cloudpack.rb |7 +-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/puppet/cloudpack.rb b/lib/puppet

[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 --- spec/unit/puppet/cloudpack_spec.rb | 10 +- 1 files changed, 9 insertions(+), 1 deletions(-) diff --git a/spec/unit/puppet

[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 --- lib/puppet/cloudpack.rb | 17 ++--- 1 files changed, 10 insertions(+), 7 dele

[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 --- 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 index 4f88e87

[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 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 index 107dd07..f33dc06

[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 --- lib/puppet/cloudpack.rb | 10 ++ 1 files changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/puppet/cloudpack.rb b/lib

[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 --- 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 100644 --- a/lib

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

[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 --- 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 100644 --- a/lib

[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 --- spec/unit/puppet/cloudpack_spec.rb |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/spec/unit

[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 --- 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..1d94f68 100644 --- a/lib

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

[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 --- spec/unit/puppet/cloudpack_spec.rb | 15 +++ 1 files changed, 15 insertions(+), 0 deletions(-) diff --git a/spec/unit

[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 --- lib/puppet/cloudpack.rb

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

2011-07-13 Thread Dan Bode
behavior. regards, Dan On Wed, Jul 13, 2011 at 3:43 PM, Dan Bode 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

[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 --- Local-branch: issue/2.7.x/7699 lib/puppet

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 wrote: > puppet help was reprinting every option once > for every alias that is had. > > This fix involves only

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

2011-07-06 Thread Dan Bode
puppet help was reprinting every option once for every alias that is had. This fix involves only storing the option.name in the @options instance var for both face and actions options. The @options_hash still maintains the list of options and aliases as its keys. Signed-off-by: Dan Bode

[Puppet-dev] [PATCH/puppet 1/1] (#8273) Default options text to ''

2011-07-06 Thread Dan Bode
This allows the puppet man command to succeed if an option exists without documentation. It was previously failing with 'err: private method `gsub' called for nil:NilClass; Signed-off-by: Dan Bode --- Local-branch: issue/master/8273 lib/puppet/face/help/man.erb |2 +- 1 files

[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 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 can > see if the

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 ha

[Puppet-dev] self.instances with properties

2011-06-12 Thread Dan Bode
Hi all, I am trying to understand how self.instances is supposed to work. I have implemented it as below (which I tried to construct based on examples I found in puppet's source) : def self.instances rabbitmqctl('list_users').split(/\n/)[1..-2].collect do |line| if line =~ /^(\S+)\s+

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

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 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 > --- > Local-branch: ticket/master/6792 > lib/facter/osfamily.rb | 24

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

Re: [Puppet-dev] issue 7629 against master

2011-05-24 Thread Dan Bode
On Mon, May 23, 2011 at 10:45 PM, Luke Kanies 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 t

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

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,

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 wrote: > For types with composite namevars, hash2resource > should use namevar_join to populate tilte with > namevar. > > Signed-off-by: Dan Bode > --- > Local-branch: issue/master/7629 > lib/puppet/type.rb |7 +

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

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 wrote: > - this ensures that resources are unique based on > composite namevars. > - I need to review why this is required.. > > Signed-off-by: Dan Bode > --- > Local-branch: issue/master/7629 > lib/puppet/transaction.r

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 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 specified". > Especial

[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 --- Local-branch: issue/master

[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 --- 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 --- a/lib/puppet

[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 --- 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/lib/puppet

[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 --- Local-branch: issue/master/7629 lib/puppet/type.rb |7 +-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/puppet/type.rb b/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 b

[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 --- Local-branch: issue/master/7629 lib/puppet/transaction.rb |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/lib/puppet

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

2011-05-23 Thread Dan Bode
ned-off-by: Dan Bode --- 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 +219,14 @@

[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 --- 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 @@ -893,8 +893,7

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

[Puppet-dev] Fwd: questions regarding #5605

2011-05-22 Thread Dan Bode
-- Forwarded message -- From: Dan Bode 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 tickets/patches

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

2011-05-22 Thread Dan Bode
On Sun, May 22, 2011 at 4:42 PM, markus 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 title_pat

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

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 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 form of the typ

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 wrote: > On Thu, Mar 17, 2011 at 02:22, Dan Bode wrote: > > > This function allows you to dynamically generate resources, > > passing them as a hash to the create_resources function. > > > > This was originally writt

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:08 AM, Luke Kanies wrote: > On Mar 17, 2011, at 8:35 AM, Dan Bode wrote: > > > > On Thu, Mar 17, 2011 at 8:26 AM, Luke Kanies wrote: > >> On Mar 17, 2011, at 6:53 AM, Nigel Kersten wrote: >> >> > On Thu, Mar 17, 2011 at 2:22 A

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 wrote: > On Mar 17, 2011, at 6:53 AM, Nigel Kersten wrote: > > > On Thu, Mar 17, 2011 at 2:22 AM, Dan Bode wrote: > >> This function allows you to dynamically generate resources, > >> passing them as a hash to

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 wrote: > On Thu, Mar 17, 2011 at 2:22 AM, Dan Bode 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 we're

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

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

[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 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, which I can > t

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

2011-02-24 Thread Dan Bode
On Thu, Feb 24, 2011 at 6:57 PM, Jesse Wolfe wrote: > > > > 1. when files updating due to pluginsync > > 2. any new files where source is managed > > Actually, I suspect that these are all manifestations of the same bug. > If you have time, try out 2.6.next and see if you still see either of > th

  1   2   >