[Puppet Users] Re: Composite namevars for custom Type
Eric, Thanks that addressed it. I should have tried that. :} Thanks again Len On Sunday, January 26, 2014 10:34:46 AM UTC-5, badgerious wrote: Len, I tried out your code, and it looks good (the resource in the puppet manifest doesn't conform to the title pattern format, which causes a different error, but the title_patterns method itself is being recognized). I'd try restarting the puppetmaster. I've found this to be necessary when making changes to types. Eric On Saturday, January 25, 2014 10:20:46 PM UTC-6, Len wrote: John, Thanks for the link. What I think is happening, is that I am not overloading the title_patterns function/method correctly. I've followed some other examples I came across, including the one in the link. But it does not seem to be picking up the def self.title_patterns from the custom type. And I'm still learning ruby and the inner workings of puppet. Len On Saturday, January 25, 2014 12:08:18 PM UTC-5, Len wrote: Jan 23 To all, I am on puppet 2.7.3 and I'm working on a custom RabbitMQ type, that will use composite namevar. I did not see any work out there already for managing rabbitMQ bindings so I've started on one and I'm running into problems with the composite namevar. I have a very basic type ( below ) but when I run the puppet as an agent I still get the error Error 400 on SERVER: Could not render to pson: you must specify title patterns when there are two or more key attributes Any help or pointers would be appreciated. #Puppet Manifest: rabbitmq_binding { 'testing': source = src, destination = dest, } # Puppet Type Puppet::Type.newtype(:rabbitmq_binding) do desc 'rabbitmq_binding creates a puppet type for managing rabbitMQ binding' def self.title_patterns [ [ /^(.*):(.*)$/, # pattern to parse source:destination [ [:source, lambda{|x| x} ], [:destination, lambda{|x| x} ] ] ] ] end newparam( :source ) do isnamevar end newparam( :destination ) do isnamevar end end -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/b8a82622-7064-48d2-9160-a0dbde46f206%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] Re: Composite namevars for custom Type
Len, I tried out your code, and it looks good (the resource in the puppet manifest doesn't conform to the title pattern format, which causes a different error, but the title_patterns method itself is being recognized). I'd try restarting the puppetmaster. I've found this to be necessary when making changes to types. Eric On Saturday, January 25, 2014 10:20:46 PM UTC-6, Len wrote: John, Thanks for the link. What I think is happening, is that I am not overloading the title_patterns function/method correctly. I've followed some other examples I came across, including the one in the link. But it does not seem to be picking up the def self.title_patterns from the custom type. And I'm still learning ruby and the inner workings of puppet. Len On Saturday, January 25, 2014 12:08:18 PM UTC-5, Len wrote: Jan 23 To all, I am on puppet 2.7.3 and I'm working on a custom RabbitMQ type, that will use composite namevar. I did not see any work out there already for managing rabbitMQ bindings so I've started on one and I'm running into problems with the composite namevar. I have a very basic type ( below ) but when I run the puppet as an agent I still get the error Error 400 on SERVER: Could not render to pson: you must specify title patterns when there are two or more key attributes Any help or pointers would be appreciated. #Puppet Manifest: rabbitmq_binding { 'testing': source = src, destination = dest, } # Puppet Type Puppet::Type.newtype(:rabbitmq_binding) do desc 'rabbitmq_binding creates a puppet type for managing rabbitMQ binding' def self.title_patterns [ [ /^(.*):(.*)$/, # pattern to parse source:destination [ [:source, lambda{|x| x} ], [:destination, lambda{|x| x} ] ] ] ] end newparam( :source ) do isnamevar end newparam( :destination ) do isnamevar end end -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/e2d75037-3b6a-472a-8545-da94ed69a7dd%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] Re: Composite namevars for custom Type
John, Thanks for the link. What I think is happening, is that I am not overloading the title_patterns function/method correctly. I've followed some other examples I came across, including the one in the link. But it does not seem to be picking up the def self.title_patterns from the custom type. And I'm still learning ruby and the inner workings of puppet. Len On Saturday, January 25, 2014 12:08:18 PM UTC-5, Len wrote: Jan 23 To all, I am on puppet 2.7.3 and I'm working on a custom RabbitMQ type, that will use composite namevar. I did not see any work out there already for managing rabbitMQ bindings so I've started on one and I'm running into problems with the composite namevar. I have a very basic type ( below ) but when I run the puppet as an agent I still get the error Error 400 on SERVER: Could not render to pson: you must specify title patterns when there are two or more key attributes Any help or pointers would be appreciated. #Puppet Manifest: rabbitmq_binding { 'testing': source = src, destination = dest, } # Puppet Type Puppet::Type.newtype(:rabbitmq_binding) do desc 'rabbitmq_binding creates a puppet type for managing rabbitMQ binding' def self.title_patterns [ [ /^(.*):(.*)$/, # pattern to parse source:destination [ [:source, lambda{|x| x} ], [:destination, lambda{|x| x} ] ] ] ] end newparam( :source ) do isnamevar end newparam( :destination ) do isnamevar end end -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/d5bdb354-96f5-46a3-80df-f10075b579dd%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.