Is your code published? You should be using a util class loaded by
both the function and the type, and it doesn't look like you are.
--
Luke Kanies | +1-615-594-8199
On Mar 22, 2011, at 5:45 PM, Trevor Vaughan wrote:
> Ok, so after futzing around with that for a while, I came up with a
> solu
Ok, so after futzing around with that for a while, I came up with a
solution, but it feels...well...bad.
In my custom type, I do the following:
s = Puppet::Parser::Scope.new
Puppet::Parser::Functions.autoloader.loadall
I can then call my function with s.function_functionname(args)
What are the
Hmm...I spoke too soon.
Adding the util directory allows the custom function to call it with
no problem however the custom type says that the call is an
uninitialized constant.
I've tried pretty much everything that I can think of while still
keeping this in a module.
Any examples?
Thanks,
Tre
On Mar 23, 6:53 am, Dominic Cleal wrote:
> Yep, fixed with pkg.dup.
Works for me, too. I've ran a few test with package names and aliases.
Juerg
--
You received this message because you are subscribed to the Google Groups
"Puppet Developers" group.
To post to this group, send email to puppet
Ok, you made that too easy
Thanks!
Trevor
On Tue, Mar 22, 2011 at 7:08 PM, Luke Kanies wrote:
> It should generally work in a module, yes.
>
> On Mar 22, 2011, at 4:06 PM, Trevor Vaughan wrote:
>
>> Does that work in a module, or would I be placing that into the normal
>> util space?
>>
>>
Does that work in a module, or would I be placing that into the normal
util space?
I'm trying to keep everything in a module.
Thanks,
Trevor
On Tue, Mar 22, 2011 at 7:02 PM, Luke Kanies wrote:
> On Mar 22, 2011, at 3:34 PM, Trevor Vaughan wrote:
>
>> All,
>>
>> I'm trying to figure out if I ca
It should generally work in a module, yes.
On Mar 22, 2011, at 4:06 PM, Trevor Vaughan wrote:
> Does that work in a module, or would I be placing that into the normal
> util space?
>
> I'm trying to keep everything in a module.
>
> Thanks,
>
> Trevor
>
> On Tue, Mar 22, 2011 at 7:02 PM, Luke
On Mar 22, 2011, at 3:34 PM, Trevor Vaughan wrote:
> All,
>
> I'm trying to figure out if I can call a custom function that I've
> written from a custom type that I'm writing.
>
> Basically, I'm trying to reuse code and not repeat it all in the type.
Kind of, assuming that it's all distributed
On 21/03/11 11:50, Dominic Cleal wrote:
> On 21/03/11 09:08, Dominic Cleal wrote:
>> On 21/03/11 03:54, Juerg Walz wrote:
>>> diff --git a/lib/puppet/provider/package/pkgutil.rb
>>> b/lib/puppet/provider/package/pkgutil.rb
>>> index 350cacc..97625f2 100755
>>> --- a/lib/puppet/provider/package/pkg
This new type "port" handles entries in /etc/services. It uses multiple
key_attributes (name and protocol), so you are able to add e.g.
multiple telnet lines for tcp and udp. Sample usage
port { 'telnet':
number => '23',
protocol=> 'tcp',
description => 'Telnet'
From: Richard Crowley
Python's pip package manager is analogous to RubyGems and should be included in
Puppet.
Reviewed-by: Matt Robinson
Signed-off-by: Matt Robinson
---
Local-branch: feature/next/6257-pip_package_provider
lib/puppet/provider/package/pip.rb | 115 +++
sp
Uninstall wasn't working properly because the instances method relied on
the pip command having been defined by calling lazy_pip. This lazy_pip
pattern is a nice way of getting around Puppet's problem of
disqualifying providers at the beginning of a run because the command
doesn't yet exist even t
This provider uses parsedfile to parse entries in /etc/services. Because
we use composite keys we have to provide an individual match method to
find resources for a single record.
Signed-off-by: Stefan Schulte
---
Local-branch: feature/next/5660N
lib/puppet/provider/port/parsed.rb
The tests now work
- The provider-spec for the port type now uses the
»all_parsedfile_providers« helper to test correct file parsing.
- add a validate function to satisfy a failing test
- improve documentation of the type (including your corrections)
- changed separator in the title_pattern from
All,
I'm trying to figure out if I can call a custom function that I've
written from a custom type that I'm writing.
Basically, I'm trying to reuse code and not repeat it all in the type.
Thanks,
Trevor
--
Trevor Vaughan
Vice President, Onyx Point, Inc
(410) 541-6699
tvaug...@onyxpoint.com
From: Ohad Levy
ARP facts on large network might lead to inconstant values
as we are always using the first ARP entry from the output of the ARP
command
Signed-off-by: Ohad Levy
---
lib/facter/arp.rb | 12
lib/facter/ec2.rb | 16 +---
2 files changed, 13 insertions
On 22/03/11 20:05, Adrien Thebo wrote:
> - prtdiag would hang in specific cases, subsequently hanging facter.
>This should kill prtdiag if it takes excessively long.
I added a call to prtdiag in the manufacturer/product facts (only for
SPARC), so it might be worth updating util/manufacturer.r
- Refactored code to make testing simpler
Signed-off-by: Adrien Thebo
---
Local-branch: tickets/next/5135
lib/facter/physicalprocessorcount.rb | 14 ++
spec/unit/physicalprocessorcount_spec.rb | 40 ++
2 files changed, 48 insertions(+), 6 deletions(-)
From: Krzysztof Wilczynski
Signed-off-by: Adrien Thebo
---
Local-branch: tickets/next/5135
lib/facter/physicalprocessorcount.rb | 12 +---
1 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/lib/facter/physicalprocessorcount.rb
b/lib/facter/physicalprocessorcount.rb
index
From: Krzysztof Wilczynski
Signed-off-by: Adrien Thebo
---
Local-branch: tickets/next/5135
lib/facter/physicalprocessorcount.rb | 41 ++---
1 files changed, 37 insertions(+), 4 deletions(-)
diff --git a/lib/facter/physicalprocessorcount.rb
b/lib/facter/physicalp
From: Ohad Levy
ARP facts on large network might lead to inconstant values
as we are always using the first ARP entry from the output of the ARP
command
Signed-off-by: Ohad Levy
---
lib/facter/arp.rb | 12
lib/facter/ec2.rb | 16 +---
2 files changed, 13 insertions
- prtdiag would hang in specific cases, subsequently hanging facter.
This should kill prtdiag if it takes excessively long.
Signed-off-by: Adrien Thebo
---
Local-branch: tickets/next/2714
lib/facter/virtual.rb |7 +--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/lib
- Looks like some copy/paste added some linux tests that relied on
prtdiag, which isn't possible. Corrected them to check against
solaris.
Signed-off-by: Adrien Thebo
---
Local-branch: tickets/next/2714
spec/unit/virtual_spec.rb | 30 --
1 files changed, 16 i
On Tue, Mar 22, 2011 at 12:39 PM, Jeffrey Goldschrafe
wrote:
> On Monday, March 21, 2011 9:53:26 PM UTC-4, Nigel Kersten wrote:
>>
>> The file{} type can do all of the following:
>>
>> * manage single files
>> * manage directories
>> * manage symlinks
>> * manage recursive file copies
>>
>> The in
Reviewed-by: Nick Lewis
Signed-off-by: Matt Robinson
---
Local-branch: ticket/next/maint-fix_require_spec_helper_for_ruby_19
lib/puppet/type/macauthorization.rb |6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/puppet/type/macauthorization.rb
b/lib/puppet/type/ma
Running the specs under Ruby 1.9 didn't work using the lambda to recurse
down directories to find the spec_helper. Standardizing the way to find
spec_helper like the rest of specs seemed like the way to go.
Here's the command line perl I used to make the change:
perl -p -i -e "s/Dir.chdir.*lambd
- Original Message -
> On Tue, Mar 22, 2011 at 7:55 AM, R.I.Pienaar wrote:
> > hello,
> >
> > In the absence of http://projects.puppetlabs.com/issues/show/4339
> > is there any way we can hook into the reporting process on the
> > agent side? I don't have a central node as such so sendin
On Tue, Mar 22, 2011 at 7:55 AM, R.I.Pienaar wrote:
> hello,
>
> In the absence of http://projects.puppetlabs.com/issues/show/4339 is there
> any way we can hook into the reporting process on the agent side? I don't
> have a central node as such so sending reports is pointless but I want to get
On Monday, March 21, 2011 9:53:26 PM UTC-4, Nigel Kersten wrote:
>
> The file{} type can do all of the following:
>
> * manage single files
> * manage directories
> * manage symlinks
> * manage recursive file copies
>
> The intersection of all these bits of functionality makes it difficult
> to und
On Sat, Dec 4, 2010 at 9:06 AM, Brice Figureau
wrote:
> On 01/12/10 00:41, Nick Lewis wrote:
>> It would be nice to have a simple alternate authentication system (even
>> a "none" system like we tried to write) which would help motivate these
>> changes. That would also help figure out the API, si
> >validate do |value|
> > raise Puppet::Error, "number has to be numeric, not #{value}"
> unless value =~ /^[0-9]+$/
> > -raise Puppet::Error, "number #{value} out of range" unless
> (0...2**16).include?(Integer(value))
>
> just out of curiosity: Will (0...2**16) generate
On Tue, Mar 22, 2011 at 4:13 AM, David Schmitt wrote:
> On 22.03.2011 02:53, Nigel Kersten wrote:
>>
>> The file{} type can do all of the following:
>>
>> * manage single files
>> * manage directories
>> * manage symlinks
>> * manage recursive file copies
>>
>> The intersection of all these bits o
Nigel Kersten:
> The file{} type can do all of the following:
>
> * manage single files
> * manage directories
> * manage symlinks
> * manage recursive file copies
I tend to use different defaults for the different types, so I would
love to be able to do:
File { mode => 0444 }
Di
On 22.03.2011 02:53, Nigel Kersten wrote:
The file{} type can do all of the following:
* manage single files
* manage directories
* manage symlinks
* manage recursive file copies
The intersection of all these bits of functionality makes it difficult
to understand exactly what is going on when y
- Original Message -
> On Mar 21, 2011, at 1:55 PM, R.I.Pienaar wrote:
>
> > hello,
> >
> > In the absence of http://projects.puppetlabs.com/issues/show/4339
> > is there any way we can hook into the reporting process on the
> > agent side? I don't have a central node as such so sending
- Original Message -
> This would be a greatly missing feature since I don't use a central
> puppetmaster model either. In fact it would be nice to be able to
> generate a classes list as well so that I can use it for MCollective
> facter attributes to filter against.
but mcollective do
This would be a greatly missing feature since I don't use a central
puppetmaster model either. In fact it would be nice to be able to
generate a classes list as well so that I can use it for MCollective
facter attributes to filter against.
On Mar 21, 1:55 pm, "R.I.Pienaar" wrote:
> hello,
>
> In
On Mon, Mar 21, 2011 at 03:42:33PM -0700, Jacob Helwig wrote:
> On Fri, 24 Dec 2010 01:04:12 +0100, Stefan Schulte wrote:
> >
> > I talked about a resourcetype for /etc/services on the list and a
> > resourcetype with name and protoco as a composite key seems be be the
> > best way to implement it
38 matches
Mail list logo