Re: [Puppet-dev] self.instances with properties

2011-06-14 Thread Luke Kanies
On Jun 12, 2011, at 8:49 PM, Dan Bode wrote: > [...] > my questions follow: > > 1. Am I doing something blatantly wrong? Kind of - you need to make sure that the provider has a mechanism for storing these values in a way that doesn't result in them being looked up if they're already present. >

Re: [Puppet-dev] self.instances with properties

2011-06-13 Thread Ken Barber
You have to figure out the resource[:name] var yourself for self.instances. The resource hash is not meant to be used at that stage. The goal for self.instances is to retrieve all existing resources (and their attributes) without prior knowledge from Puppet. This is how Puppet creates its internal

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