Certainly works for me in a simplified example ... can you simplify
your example so it just does a notify?

class firewall_extras (
   $services   = undef,
) {
  notify { "msg": message => $services }
}

class myfirewall {
  class { "firewall_extras": services => $::firewall_services }
}

Also - just for kicks - what is the yaml output of your external_nodes
command when you run this on the command line?

(you probably already know how to do this but ...)

To figure out the path its just:

puppet master --configprint external_nodes

Then run it like:

/somepath/external_nodes unxslet01.ucop.edu

ken.

On Wed, Jun 15, 2011 at 5:41 PM, Ashley Gould <ago...@ucop.edu> wrote:
> On Wed, Jun 15, 2011 at 02:16:27PM +0100, Ken Barber wrote:
>> What errors are you getting when you use this pattern? Do you have
>> sample code and errors for your use case?
>>
>> I presume you are doing an:
>>
>> include foo::wrapper
>>
>> At some point to evaluate that wrapper class? Otherwise nothing will happen.
>>
>> ken.
>
> There is no error.  but nothing happens.  the class seems to be
> quietly ignored.
>
> The basic construct works from within nodes.pp file, but not from
> dashboard:
>
> class firewall_extras (
>    $services   = undef,
> ) inherits firewall {
>
>    Firewall::Firewall_conf["default"] {
>        fw_services_ext_tcp   => $services,
>        fw_configurations_ext => $configs,
>        fw_trusted_nets       => $trusted,
>    }
>
> }
>
> # Dashboard class
> class firewall_extras::wrapper {
>  class { firewall_extras: services => $::firewall_services }
> }
>
>
> Here was my node def that worked:
>
> $firewall_services = "8000"
> node /unxslet0\d+/ {
>    include "common::suse"
>    include "aig_vhost"
>    include "firewall_extras::wrapper"
> }
>
> I'm attaching a jpg of the node from dashboard.
>
>
>
>
>>
>> On Wed, Jun 15, 2011 at 12:40 AM, Ashley Gould <ago...@ucop.edu> wrote:
>> > Looking at the release notes for dashboard 1.1.1, I see that param
>> > classes are not yet supported within dashboard's external node
>> > classifier feature.  A few months ago I saw a post suggesting the
>> > following work around until there is support:
>> >
>> > class foo ($var="default") {
>> >   notify { $var: }
>> > }
>> >
>> > Parametrized classes are new in Puppet 2.6. Support for parametrized
>> > classes via ENC was introduced in 2.6.5. Support for parametrized
>> > classes in dashboard is on the road map.
>> >
>> > Currently here's the way to declare parametrized classes in site.pp:
>> >
>> > node node01 {
>> >  class { foo:
>> >    var => "hello world!",
>> >  }
>> > }
>> >
>> > To support parametrized class in dashboard, I write a wrapper class
>> > (necessary until Dashboard fully supports parametrized classes):
>> > class foo::wrapper {
>> >  class { foo:
>> >     var =>  $::foo_var,
>> >  }
>> > }
>> >
>> > In this case assign class foo::wrapper to node1 in dashboard and
>> > configure the parameter foo_var="hello world!".
>> >
>> > ---
>> >
>> >
>> > I am tring to replicate this workaround without success.  Has anyone
>> > else gotten param classes working within dashboard ENC?
>> >
>> >
>> >
>> >
>> >
>> > --
>> >
>> > -ashley
>> >
>> > Did you try poking at it with a stick?
>> >
>> > --
>> > You received this message because you are subscribed to the Google Groups 
>> > "Puppet Users" group.
>> > To post to this group, send email to puppet-users@googlegroups.com.
>> > To unsubscribe from this group, send email to 
>> > puppet-users+unsubscr...@googlegroups.com.
>> > For more options, visit this group at 
>> > http://groups.google.com/group/puppet-users?hl=en.
>> >
>> >
>
> --
>
> -ashley
>
> Did you try poking at it with a stick?
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To post to this group, send email to puppet-users@googlegroups.com.
> To unsubscribe from this group, send email to 
> puppet-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/puppet-users?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to