Parameters / variables / parameterized classes

I have a number of 'defines' and not actual classes.

I switched one of them over to a parameterized class and I was able to use parameters to pass in the needed values so I know I can make it work but I can sense that I will have to do a little refactoring because I can't have identically named parameters (untested but I am sure this will be a headache).

But one of the things I really want to do is to be able to have multiple apache/nginx vhosts which in the 'define' world, allowed me to separately define each vhost and I can't think of a way I can get that done using the parameters as I understand them.

for example, in one of my test nodes, I have…

apache::vhost { "test.ttinet":
port => 8080,
docroot => "/var/www/test.ttinet",
ssl => false,
priority => 10,
rails_env => 'development',
passenger_enable => 'no',
serveraliases => ['test', 'test2'],
}
apache::vhost { "test2.ttinet":
port => 8080,
docroot => "/var/www/test2.ttinet",
ssl => false,
priority => 10,
serveraliases => ['test4', 'test3'],
}

do I change apache::vhost to parameterized classes?

how can I keep array 'form' for parameters, use define and be able to accomplish what I am doing in the flat file arrangement?

(I note that I have been doing a bunch of googling and saw that the recommended method is to 'split' and I know the ruby method split($some_var,",") but I can't envision how this gets done in multiple vhosts and invokes a 'define' and not a class

··· -- Craig White ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ craig.white@ttiltd.com 1.800.869.6908 ~~~~~~~~~~~~~~~~~~~~~~~~~~~ www.ttiassessments.com

Need help communicating between generations at work to achieve your desired success? Let us help!

> I have a number of 'defines' and not actual classes.

Based on the usage below they should be defines and not classes. If
your issue is defines are resources and you have no ability to create
resources via the ENC, look at create_resource function (in 2.7 and
backported as a module for 2.6), essentially you will write a wrapper
class that accepts a list of attributes and then create the
appropriate resources.

··· On Fri, Jul 15, 2011 at 12:34 PM, Craig White wrote:

I switched one of them over to a parameterized class and I was able to use parameters to pass in the needed values so I know I can make it work but I can sense that I will have to do a little refactoring because I can’t have identically named parameters (untested but I am sure this will be a headache).

But one of the things I really want to do is to be able to have multiple apache/nginx vhosts which in the ‘define’ world, allowed me to separately define each vhost and I can’t think of a way I can get that done using the parameters as I understand them.

for example, in one of my test nodes, I have…

apache::vhost { “test.ttinet”:
port => 8080,
docroot => “/var/www/test.ttinet”,
ssl => false,
priority => 10,
rails_env => ‘development’,
passenger_enable => ‘no’,
serveraliases => [‘test’, ‘test2’],
}
apache::vhost { “test2.ttinet”:
port => 8080,
docroot => “/var/www/test2.ttinet”,
ssl => false,
priority => 10,
serveraliases => [‘test4’, ‘test3’],
}

do I change apache::vhost to parameterized classes?

how can I keep array ‘form’ for parameters, use define and be able to accomplish what I am doing in the flat file arrangement?

(I note that I have been doing a bunch of googling and saw that the recommended method is to ‘split’ and I know the ruby method split($some_var,",") but I can’t envision how this gets done in multiple vhosts and invokes a ‘define’ and not a class


Craig White ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ craig.white@ttiltd.com
1.800.869.6908 ~~~~~~~~~~~~~~~~~~~~~~~~~~~ www.ttiassessments.com

Need help communicating between generations at work to achieve your desired success? Let us help!


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

Join us in PDX for PuppetConf: http://bit.ly/puppetconfsig

>> I have a number of 'defines' and not actual classes.
>
> Based on the usage below they should be defines and not classes. If
> your issue is defines are resources and you have no ability to create
> resources via the ENC, look at create_resource function (in 2.7 and
> backported as a module for 2.6), essentially you will write a wrapper
> class that accepts a list of attributes and then create the
> appropriate resources.
>
>> I switched one of them over to a parameterized class and I was able to use parameters to pass in the needed values so I know I can make it work but I can sense that I will have to do a little refactoring because I can't have identically named parameters (untested but I am sure this will be a headache).
>>
>> But one of the things I really want to do is to be able to have multiple apache/nginx vhosts which in the 'define' world, allowed me to separately define each vhost and I can't think of a way I can get that done using the parameters as I understand them.
>>
>> for example, in one of my test nodes, I have…
>>
>> apache::vhost { "test.ttinet":
>> port => 8080,
>> docroot => "/var/www/test.ttinet",
>> ssl => false,
>> priority => 10,
>> rails_env => 'development',
>> passenger_enable => 'no',
>> serveraliases => ['test', 'test2'],
>> }
>> apache::vhost { "test2.ttinet":
>> port => 8080,
>> docroot => "/var/www/test2.ttinet",
>> ssl => false,
>> priority => 10,
>> serveraliases => ['test4', 'test3'],
>> }
>>
>> do I change apache::vhost to parameterized classes?
>>
>> how can I keep array 'form' for parameters, use define and be able to accomplish what I am doing in the flat file arrangement?
>>
>> (I note that I have been doing a bunch of googling and saw that the recommended method is to 'split' and I know the ruby method split($some_var,",") but I can't envision how this gets done in multiple vhosts and invokes a 'define' and not a class

··· On Jul 15, 2011, at 1:05 PM, Nan Liu wrote: > On Fri, Jul 15, 2011 at 12:34 PM, Craig White wrote: ---- OK - downloaded & create_resources into /var/lib/puppet/modules && restarted apache (using passenger so that is where foreman/puppetmaster live)

cat /var/lib/puppet/yaml/foreman/ubuntu5.ttinet


parameters:
puppetmaster: ubuntu.ttinet
nginx::vhosts: "name => ‘vhost1’, port => 8080, docroot => “/var/www/test.ttinet”, ssl => false, priority => 10, rails_env => ‘development’, passenger_enable => ‘no’, serveraliases => [‘test’, ‘test2’]"
classes:
- subversion
- ntp
- etc::timezone
- etc::resolv
- etc
- apt::updates
- apt::get_update
- apt
- mod_puppet::service
- mod_puppet
- mod_puppet::deployment_files
- mod_puppet::config
- gems::passenger
- git
- prerequisite::compiler
- prerequisite::compression
- prerequisite::ssl
- nginx::service
- nginx::install
- memcached
- memcached::install
- memcached::service
environment: production

root@ubuntu:/etc/puppet/modules/nginx/manifests# cat vhosts.pp
class nginx::vhosts (
$vhostss = {}
) {
create_resources(‘nginx::vhost’, $vhosts)
}

root@ubuntu:/etc/puppet/modules/nginx/manifests# cat vhost.pp
define nginx::vhost(
$ip="*",
$port=“80”,
$docroot="/var/www/sites/$name",
$ssl=false,
$template=‘nginx/vhost.conf.erb’,
$priority=10,
$serveraliases=’’,
$passenger_enable=“no”,
$rails_env=“production”,
$location_file_inc=’’,
$admin="webmaster@ttiltd.com")
{
include nginx
case $operatingsystem {
centos, redhat: {
file {"/opt/nginx/sites/${priority}-${name}":
content => template($template),
owner => root,
group => root,
mode => 777,
require => Class[“nginx::install”],
notify => Class[“nginx::service”],
}
}
debian, ubuntu: {
file {"/opt/nginx/sites/${priority}-${name}":
content => template($template),
owner => root,
group => root,
mode => 777,
require => Class[“nginx::install”],
notify => Class[“nginx::service”],
}
}
}
}

Doesn’t flinch or do anything if I run 'puppet apply on ubuntu5

;-(

Craig

>
>
>>> I have a number of 'defines' and not actual classes.
>>
>> Based on the usage below they should be defines and not classes. If
>> your issue is defines are resources and you have no ability to create
>> resources via the ENC, look at create_resource function (in 2.7 and
>> backported as a module for 2.6), essentially you will write a wrapper
>> class that accepts a list of attributes and then create the
>> appropriate resources.
>>
>>> I switched one of them over to a parameterized class and I was able to use parameters to pass in the needed values so I know I can make it work but I can sense that I will have to do a little refactoring because I can't have identically named parameters (untested but I am sure this will be a headache).
>>>
>>> But one of the things I really want to do is to be able to have multiple apache/nginx vhosts which in the 'define' world, allowed me to separately define each vhost and I can't think of a way I can get that done using the parameters as I understand them.
>>>
>>> for example, in one of my test nodes, I have…
>>>
>>> apache::vhost { "test.ttinet":
>>> port => 8080,
>>> docroot => "/var/www/test.ttinet",
>>> ssl => false,
>>> priority => 10,
>>> rails_env => 'development',
>>> passenger_enable => 'no',
>>> serveraliases => ['test', 'test2'],
>>> }
>>> apache::vhost { "test2.ttinet":
>>> port => 8080,
>>> docroot => "/var/www/test2.ttinet",
>>> ssl => false,
>>> priority => 10,
>>> serveraliases => ['test4', 'test3'],
>>> }
>>>
>>> do I change apache::vhost to parameterized classes?
>>>
>>> how can I keep array 'form' for parameters, use define and be able to accomplish what I am doing in the flat file arrangement?
>>>
>>> (I note that I have been doing a bunch of googling and saw that the recommended method is to 'split' and I know the ruby method split($some_var,",") but I can't envision how this gets done in multiple vhosts and invokes a 'define' and not a class
> ----
> OK - downloaded & create_resources into /var/lib/puppet/modules && restarted apache (using passenger so that is where foreman/puppetmaster live)

Hmm, maybe start with smaller steps, make sure create resource is working
>
> # cat /var/lib/puppet/yaml/foreman/ubuntu5.ttinet
> —
> parameters:
> puppetmaster: ubuntu.ttinet
> nginx::vhosts: "name => 'vhost1', port => 8080, docroot => "/var/www/test.ttinet", ssl => false, priority => 10, rails_env => 'development', passenger_enable => 'no', serveraliases => ['test', 'test2']"

Two problems:

  1. You can't pass the variable to the nginx scope by specifying
    nginx::vhosts, ENC parameters are all top scope, so this is
    effectively ::"nginx::vhosts". If you are using dynamic scoping, just
    use the parameter vhosts and that will get passed to the class
    nginx::vhost.
  2. This isn't yaml representation of a hash, it's just a string. Use
    irb and to_yaml to get an idea what it should look like:
··· On Fri, Jul 15, 2011 at 2:59 PM, Craig White wrote: > On Jul 15, 2011, at 1:05 PM, Nan Liu wrote: >> On Fri, Jul 15, 2011 at 12:34 PM, Craig White wrote:

puts({‘parameters’=>{“key1” => “val1”, “hash1” => {“key”=>“val”, “key2”=>“val2”}}}.to_yaml)


parameters:
hash1:
key: val
key2: val2
key1: val1

Let me know if we can improve the information at:
https://github.com/puppetlabs/puppetlabs-create_resources

Thanks,

Nan

>>
>>
>>>> I have a number of 'defines' and not actual classes.
>>>
>>> Based on the usage below they should be defines and not classes. If
>>> your issue is defines are resources and you have no ability to create
>>> resources via the ENC, look at create_resource function (in 2.7 and
>>> backported as a module for 2.6), essentially you will write a wrapper
>>> class that accepts a list of attributes and then create the
>>> appropriate resources.
>>>
>>>> I switched one of them over to a parameterized class and I was able to use parameters to pass in the needed values so I know I can make it work but I can sense that I will have to do a little refactoring because I can't have identically named parameters (untested but I am sure this will be a headache).
>>>>
>>>> But one of the things I really want to do is to be able to have multiple apache/nginx vhosts which in the 'define' world, allowed me to separately define each vhost and I can't think of a way I can get that done using the parameters as I understand them.
>>>>
>>>> for example, in one of my test nodes, I have…
>>>>
>>>> apache::vhost { "test.ttinet":
>>>> port => 8080,
>>>> docroot => "/var/www/test.ttinet",
>>>> ssl => false,
>>>> priority => 10,
>>>> rails_env => 'development',
>>>> passenger_enable => 'no',
>>>> serveraliases => ['test', 'test2'],
>>>> }
>>>> apache::vhost { "test2.ttinet":
>>>> port => 8080,
>>>> docroot => "/var/www/test2.ttinet",
>>>> ssl => false,
>>>> priority => 10,
>>>> serveraliases => ['test4', 'test3'],
>>>> }
>>>>
>>>> do I change apache::vhost to parameterized classes?
>>>>
>>>> how can I keep array 'form' for parameters, use define and be able to accomplish what I am doing in the flat file arrangement?
>>>>
>>>> (I note that I have been doing a bunch of googling and saw that the recommended method is to 'split' and I know the ruby method split($some_var,",") but I can't envision how this gets done in multiple vhosts and invokes a 'define' and not a class
>> ----
>> OK - downloaded & create_resources into /var/lib/puppet/modules && restarted apache (using passenger so that is where foreman/puppetmaster live)
>
> Hmm, maybe start with smaller steps, make sure create resource is working
>>
>> # cat /var/lib/puppet/yaml/foreman/ubuntu5.ttinet
>> —
>> parameters:
>> puppetmaster: ubuntu.ttinet
>> nginx::vhosts: "name => 'vhost1', port => 8080, docroot => "/var/www/test.ttinet", ssl => false, priority => 10, rails_env => 'development', passenger_enable => 'no', serveraliases => ['test', 'test2']"
>
> Two problems:
> 1. You can't pass the variable to the nginx scope by specifying
> nginx::vhosts, ENC parameters are all top scope, so this is
> effectively ::"nginx::vhosts". If you are using dynamic scoping, just
> use the parameter vhosts and that will get passed to the class
> nginx::vhost.
> 2. This isn't yaml representation of a hash, it's just a string. Use
> irb and to_yaml to get an idea what it should look like:
>
>> puts({'parameters'=>{"key1" => "val1", "hash1" => {"key"=>"val", "key2"=>"val2"}}}.to_yaml)
> —
> parameters:
> hash1:
> key: val
> key2: val2
> key1: val1
>
> Let me know if we can improve the information at:
> https://github.com/puppetlabs/puppetlabs-create_resources

··· On Jul 15, 2011, at 3:20 PM, Nan Liu wrote: > On Fri, Jul 15, 2011 at 2:59 PM, Craig White wrote: >> On Jul 15, 2011, at 1:05 PM, Nan Liu wrote: >>> On Fri, Jul 15, 2011 at 12:34 PM, Craig White wrote: ---- thanks - I needed the bigger spoon. I am only here for a little while and won't be able to finish this until Monday and yes, I think if I get my head around it, I will try to help with documentation for this because this is rather obtuse (at least to me).

Craig

>>
>>
>>>> I have a number of 'defines' and not actual classes.
>>>
>>> Based on the usage below they should be defines and not classes. If
>>> your issue is defines are resources and you have no ability to create
>>> resources via the ENC, look at create_resource function (in 2.7 and
>>> backported as a module for 2.6), essentially you will write a wrapper
>>> class that accepts a list of attributes and then create the
>>> appropriate resources.
>>>
>>>> I switched one of them over to a parameterized class and I was able to use parameters to pass in the needed values so I know I can make it work but I can sense that I will have to do a little refactoring because I can't have identically named parameters (untested but I am sure this will be a headache).
>>>>
>>>> But one of the things I really want to do is to be able to have multiple apache/nginx vhosts which in the 'define' world, allowed me to separately define each vhost and I can't think of a way I can get that done using the parameters as I understand them.
>>>>
>>>> for example, in one of my test nodes, I have…
>>>>
>>>> apache::vhost { "test.ttinet":
>>>> port => 8080,
>>>> docroot => "/var/www/test.ttinet",
>>>> ssl => false,
>>>> priority => 10,
>>>> rails_env => 'development',
>>>> passenger_enable => 'no',
>>>> serveraliases => ['test', 'test2'],
>>>> }
>>>> apache::vhost { "test2.ttinet":
>>>> port => 8080,
>>>> docroot => "/var/www/test2.ttinet",
>>>> ssl => false,
>>>> priority => 10,
>>>> serveraliases => ['test4', 'test3'],
>>>> }
>>>>
>>>> do I change apache::vhost to parameterized classes?
>>>>
>>>> how can I keep array 'form' for parameters, use define and be able to accomplish what I am doing in the flat file arrangement?
>>>>
>>>> (I note that I have been doing a bunch of googling and saw that the recommended method is to 'split' and I know the ruby method split($some_var,",") but I can't envision how this gets done in multiple vhosts and invokes a 'define' and not a class
>> ----
>> OK - downloaded & create_resources into /var/lib/puppet/modules && restarted apache (using passenger so that is where foreman/puppetmaster live)
>
> Hmm, maybe start with smaller steps, make sure create resource is working
>>
>> # cat /var/lib/puppet/yaml/foreman/ubuntu5.ttinet
>> —
>> parameters:
>> puppetmaster: ubuntu.ttinet
>> nginx::vhosts: "name => 'vhost1', port => 8080, docroot => "/var/www/test.ttinet", ssl => false, priority => 10, rails_env => 'development', passenger_enable => 'no', serveraliases => ['test', 'test2']"
>
> Two problems:
> 1. You can't pass the variable to the nginx scope by specifying
> nginx::vhosts, ENC parameters are all top scope, so this is
> effectively ::"nginx::vhosts". If you are using dynamic scoping, just
> use the parameter vhosts and that will get passed to the class
> nginx::vhost.
> 2. This isn't yaml representation of a hash, it's just a string. Use
> irb and to_yaml to get an idea what it should look like:
>
>> puts({'parameters'=>{"key1" => "val1", "hash1" => {"key"=>"val", "key2"=>"val2"}}}.to_yaml)
> —
> parameters:
> hash1:
> key: val
> key2: val2
> key1: val1
>
> Let me know if we can improve the information at:
> https://github.com/puppetlabs/puppetlabs-create_resources

··· On Jul 15, 2011, at 3:20 PM, Nan Liu wrote: > On Fri, Jul 15, 2011 at 2:59 PM, Craig White wrote: >> On Jul 15, 2011, at 1:05 PM, Nan Liu wrote: >>> On Fri, Jul 15, 2011 at 12:34 PM, Craig White wrote: ---- have spent most of the morning on this but still can't seem to figure out the magical incantation.

grep nginx_vhosts yaml/foreman/ubuntu7.ttinet.yaml

nginx_vhosts: "'vhost1' => { 'port'  => '8080', 'docroot' => '/var/www/test.ttinet', 'ssl' => 'false', 'priority' => '10', 'rails_env' => 'development', 'passenger_enable' => 'no', 'serveraliases' => ['test', 'test2'] }"

that’s my parameter string

irb…
irb(main):105:0> test = “{‘vhost1’ => { ‘port’ => ‘8080’, ‘docroot’ => ‘/var/www/test.ttinet’, ‘ssl’ => ‘false’, ‘priority’ => ‘10’, ‘rails_env’ => ‘development’, ‘passenger_enable’ => ‘no’, ‘serveraliases’ => [‘test’, ‘test2’] }”
=> "{‘vhost1’ => { ‘port’ => ‘8080’, ‘docroot’ => ‘/var/www/test.ttinet’, ‘ssl’ => ‘false’, ‘priority’ => ‘10’, ‘rails_env’ => ‘development’, ‘passenger_enable’ => ‘no’, ‘serveraliases’ => [‘test’, ‘test2’] }"
irb(main):106:0> test.to_yaml=> “— “{‘vhost1’ => { ‘port’ => ‘8080’, ‘docroot’ => ‘/var/www/test.ttinet’, ‘ssl’ => ‘false’, ‘priority’ => ‘10’, ‘rails_env’ => ‘development’, ‘passenger_enable’ => ‘no’, ‘serveraliases’ => [‘test’, ‘test2’] }”\n”

so class nginx::vhosts (vhosts.pp)

class nginx::vhosts {
create_resources(‘nginx::vhost’, $nginx_vhosts.to_yaml)
}

gives me this error…

err: Could not retrieve catalog from remote server: Error 400 on SERVER: Syntax error at ‘.’; expected ‘)’ at /etc/puppet/modules/nginx/manifests/vhosts.pp:2 on node ubuntu7.ttinet

If I put outer hash braces in parameters…

grep nginx_vhosts yaml/foreman/ubuntu7.ttinet.yaml
nginx_vhosts: “{‘vhost1’ => { ‘port’ => ‘8080’, ‘docroot’ => ‘/var/www/test.ttinet’, ‘ssl’ => ‘false’, ‘priority’ => ‘10’, ‘rails_env’ => ‘development’, ‘passenger_enable’ => ‘no’, ‘serveraliases’ => [‘test’, ‘test2’] }}”

my error becomes…

err: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not find class nginx::vhosts in namespaces nginx at /etc/puppet/modules/nginx/manifests/init.pp:2 on node ubuntu7.ttinet

and I have tried it a whole lot of different ways in/out of irb but I keep running into a wall when I try to put it into a class within puppet

Craig

>
> Two problems:
> 1. You can't pass the variable to the nginx scope by specifying
> nginx::vhosts, ENC parameters are all top scope, so this is
> effectively ::"nginx::vhosts". If you are using dynamic scoping, just
> use the parameter vhosts and that will get passed to the class
> nginx::vhost.
> 2. This isn't yaml representation of a hash, it's just a string. Use
> irb and to_yaml to get an idea what it should look like:
>
>> puts({'parameters'=>{"key1" => "val1", "hash1" => {"key"=>"val", "key2"=>"val2"}}}.to_yaml)
> —
> parameters:
> hash1:
> key: val
> key2: val2
> key1: val1
>
> Let me know if we can improve the information at:
> https://github.com/puppetlabs/puppetlabs-create_resources
>
> Thanks,

··· On Jul 15, 2011, at 3:20 PM, Nan Liu wrote: > On Fri, Jul 15, 2011 at 2:59 PM, Craig White wrote: ---- I am slamming my head against the wall...

This works…
class nginx::vhosts {
$vhosts = {‘vhost1’ => {
‘port’ => ‘8080’,
‘docroot’ => ‘/var/www/test.ttinet’,
‘ssl’ => ‘false’, ‘priority’ => ‘10’,
‘rails_env’ => ‘development’,
‘passenger_enable’ => ‘no’,
‘serveraliases’ => [‘test’, ‘test2’]
}
}
create_resources(‘nginx::vhost’, $vhosts)
}

This doesn’t work…

grep nvhosts yaml/foreman/ubuntu7.ttinet.yaml

nvhosts: "'vhost1' => { 'port'  => '8080', 'docroot' => '/var/www/test.ttinet', 'ssl' => 'false', 'priority' => '10', 'rails_env' => 'development', 'passenger_enable' => 'no', 'serveraliases' => ['test', 'test2'] }"

class nginx::vhosts {
$vhosts = {
{$nvhosts}.to_yaml
}
create_resources(‘nginx::vhost’, $vhosts)
}

and no apparent variation of this will work (converting the string to a hash although converting a string to hash in irb seems to be no problem)

foreman (0.3), rails (2.6.8 from gem)

Craig

You shouldn't quote the hash, because you are getting a string this
should be more like it:

··· On Mon, Jul 18, 2011 at 3:22 PM, Craig White wrote: > > On Jul 15, 2011, at 3:20 PM, Nan Liu wrote: > >> On Fri, Jul 15, 2011 at 2:59 PM, Craig White wrote: >>> >>> On Jul 15, 2011, at 1:05 PM, Nan Liu wrote: >>> >>>> On Fri, Jul 15, 2011 at 12:34 PM, Craig White wrote: >>>>> I have a number of 'defines' and not actual classes. >>>> >>>> Based on the usage below they should be defines and not classes. If >>>> your issue is defines are resources and you have no ability to create >>>> resources via the ENC, look at create_resource function (in 2.7 and >>>> backported as a module for 2.6), essentially you will write a wrapper >>>> class that accepts a list of attributes and then create the >>>> appropriate resources. >>>> >>>>> I switched one of them over to a parameterized class and I was able to use parameters to pass in the needed values so I know I can make it work but I can sense that I will have to do a little refactoring because I can't have identically named parameters (untested but I am sure this will be a headache). >>>>> >>>>> But one of the things I really want to do is to be able to have multiple apache/nginx vhosts which in the 'define' world, allowed me to separately define each vhost and I can't think of a way I can get that done using the parameters as I understand them. >>>>> >>>>> for example, in one of my test nodes, I have... >>>>> >>>>> apache::vhost { "test.ttinet": >>>>> port => 8080, >>>>> docroot => "/var/www/test.ttinet", >>>>> ssl => false, >>>>> priority => 10, >>>>> rails_env => 'development', >>>>> passenger_enable => 'no', >>>>> serveraliases => ['test', 'test2'], >>>>> } >>>>> apache::vhost { "test2.ttinet": >>>>> port => 8080, >>>>> docroot => "/var/www/test2.ttinet", >>>>> ssl => false, >>>>> priority => 10, >>>>> serveraliases => ['test4', 'test3'], >>>>> } >>>>> >>>>> do I change apache::vhost to parameterized classes? >>>>> >>>>> how can I keep array 'form' for parameters, use define and be able to accomplish what I am doing in the flat file arrangement? >>>>> >>>>> (I note that I have been doing a bunch of googling and saw that the recommended method is to 'split' and I know the ruby method split($some_var,",") but I can't envision how this gets done in multiple vhosts and invokes a 'define' and not a class >>> ---- >>> OK - downloaded & create_resources into /var/lib/puppet/modules && restarted apache (using passenger so that is where foreman/puppetmaster live) >> >> Hmm, maybe start with smaller steps, make sure create resource is working >>> >>> # cat /var/lib/puppet/yaml/foreman/ubuntu5.ttinet >>> --- >>> parameters: >>> puppetmaster: ubuntu.ttinet >>> nginx::vhosts: "name => 'vhost1', port => 8080, docroot => \"/var/www/test.ttinet\", ssl => false, priority => 10, rails_env => 'development', passenger_enable => 'no', serveraliases => ['test', 'test2']" >> >> Two problems: >> 1. You can't pass the variable to the nginx scope by specifying >> nginx::vhosts, ENC parameters are all top scope, so this is >> effectively ::"nginx::vhosts". If you are using dynamic scoping, just >> use the parameter vhosts and that will get passed to the class >> nginx::vhost. >> 2. This isn't yaml representation of a hash, it's just a string. Use >> irb and to_yaml to get an idea what it should look like: >> >>> puts({'parameters'=>{"key1" => "val1", "hash1" => {"key"=>"val", "key2"=>"val2"}}}.to_yaml) >> --- >> parameters: >> hash1: >> key: val >> key2: val2 >> key1: val1 >> >> Let me know if we can improve the information at: >> https://github.com/puppetlabs/puppetlabs-create_resources > ---- > have spent most of the morning on this but still can't seem to figure out the magical incantation. > > # grep nginx_vhosts yaml/foreman/ubuntu7.ttinet.yaml > nginx_vhosts: "'vhost1' => { 'port' => '8080', 'docroot' => '/var/www/test.ttinet', 'ssl' => 'false', 'priority' => '10', 'rails_env' => 'development', 'passenger_enable' => 'no', 'serveraliases' => ['test', 'test2'] }" >

parameters:
nginx_vhosts:
vhost1:
ssl: "false"
port: "8080"
priority: "10"
docroot: /var/www/test.ttinet
serveraliases:
- test
- test2
rails_env: development
passenger_enable: “no”

Thanks,

Nan

==========================================
Join us in PDX for PuppetConf: http://bit.ly/puppetconfsig

Hello Craig, did you ever get this to work.

Just playing around with the puppetlabs-nginx module, which also uses
resources to create vhosts and am also struggeling to figure out on how to
call the following from foreman:

nginx::resource::vhost { 'test2.local':
ensure => present,
www_root => '/var/www/nginx-default',
ssl => 'true',
ssl_cert => '/tmp/server.crt',
ssl_key => '/tmp/server.pem',
}

Thanks,

>>
>>
>>>>
>>>>
>>>>>> I have a number of 'defines' and not actual classes.
>>>>>
>>>>> Based on the usage below they should be defines and not classes. If
>>>>> your issue is defines are resources and you have no ability to create
>>>>> resources via the ENC, look at create_resource function (in 2.7 and
>>>>> backported as a module for 2.6), essentially you will write a wrapper
>>>>> class that accepts a list of attributes and then create the
>>>>> appropriate resources.
>>>>>
>>>>>> I switched one of them over to a parameterized class and I was able to use parameters to pass in the needed values so I know I can make it work but I can sense that I will have to do a little refactoring because I can't have identically named parameters (untested but I am sure this will be a headache).
>>>>>>
>>>>>> But one of the things I really want to do is to be able to have multiple apache/nginx vhosts which in the 'define' world, allowed me to separately define each vhost and I can't think of a way I can get that done using the parameters as I understand them.
>>>>>>
>>>>>> for example, in one of my test nodes, I have…
>>>>>>
>>>>>> apache::vhost { "test.ttinet":
>>>>>> port => 8080,
>>>>>> docroot => "/var/www/test.ttinet",
>>>>>> ssl => false,
>>>>>> priority => 10,
>>>>>> rails_env => 'development',
>>>>>> passenger_enable => 'no',
>>>>>> serveraliases => ['test', 'test2'],
>>>>>> }
>>>>>> apache::vhost { "test2.ttinet":
>>>>>> port => 8080,
>>>>>> docroot => "/var/www/test2.ttinet",
>>>>>> ssl => false,
>>>>>> priority => 10,
>>>>>> serveraliases => ['test4', 'test3'],
>>>>>> }
>>>>>>
>>>>>> do I change apache::vhost to parameterized classes?
>>>>>>
>>>>>> how can I keep array 'form' for parameters, use define and be able to accomplish what I am doing in the flat file arrangement?
>>>>>>
>>>>>> (I note that I have been doing a bunch of googling and saw that the recommended method is to 'split' and I know the ruby method split($some_var,",") but I can't envision how this gets done in multiple vhosts and invokes a 'define' and not a class
>>>> ----
>>>> OK - downloaded & create_resources into /var/lib/puppet/modules && restarted apache (using passenger so that is where foreman/puppetmaster live)
>>>
>>> Hmm, maybe start with smaller steps, make sure create resource is working
>>>>
>>>> # cat /var/lib/puppet/yaml/foreman/ubuntu5.ttinet
>>>> —
>>>> parameters:
>>>> puppetmaster: ubuntu.ttinet
>>>> nginx::vhosts: "name => 'vhost1', port => 8080, docroot => "/var/www/test.ttinet", ssl => false, priority => 10, rails_env => 'development', passenger_enable => 'no', serveraliases => ['test', 'test2']"
>>>
>>> Two problems:
>>> 1. You can't pass the variable to the nginx scope by specifying
>>> nginx::vhosts, ENC parameters are all top scope, so this is
>>> effectively ::"nginx::vhosts". If you are using dynamic scoping, just
>>> use the parameter vhosts and that will get passed to the class
>>> nginx::vhost.
>>> 2. This isn't yaml representation of a hash, it's just a string. Use
>>> irb and to_yaml to get an idea what it should look like:
>>>
>>>> puts({'parameters'=>{"key1" => "val1", "hash1" => {"key"=>"val", "key2"=>"val2"}}}.to_yaml)
>>> —
>>> parameters:
>>> hash1:
>>> key: val
>>> key2: val2
>>> key1: val1
>>>
>>> Let me know if we can improve the information at:
>>> https://github.com/puppetlabs/puppetlabs-create_resources
>> ----
>> have spent most of the morning on this but still can't seem to figure out the magical incantation.
>>
>> # grep nginx_vhosts yaml/foreman/ubuntu7.ttinet.yaml
>> nginx_vhosts: "'vhost1' => { 'port' => '8080', 'docroot' => '/var/www/test.ttinet', 'ssl' => 'false', 'priority' => '10', 'rails_env' => 'development', 'passenger_enable' => 'no', 'serveraliases' => ['test', 'test2'] }"
>>
>
> You shouldn't quote the hash, because you are getting a string this
> should be more like it:
> —
> parameters:
> nginx_vhosts:
> vhost1:
> ssl: "false"
> port: "8080"
> priority: "10"
> docroot: /var/www/test.ttinet
> serveraliases:
> - test
> - test2
> rails_env: development
> passenger_enable: "no"
>
> Thanks,

··· On Jul 18, 2011, at 2:25 PM, Nan Liu wrote: > On Mon, Jul 18, 2011 at 3:22 PM, Craig White wrote: >> On Jul 15, 2011, at 3:20 PM, Nan Liu wrote: >>> On Fri, Jul 15, 2011 at 2:59 PM, Craig White wrote: >>>> On Jul 15, 2011, at 1:05 PM, Nan Liu wrote: >>>>> On Fri, Jul 15, 2011 at 12:34 PM, Craig White wrote: ---- the 'quote the hash' that I shouldn't be doing isn't my doing at all, it's what is happening when I add the parameter in foreman. Thus the quoting of the hash is the way it is presented from /var/lib/puppet/yaml/foreman/ubuntu7.ttinet.yaml under parameters.

As far as I can tell, any attempt to coerce the string to hash within a puppet class results in a syntax error.

I am going to stop trying to do this from within a class.

Thanks

Craig

>>
>>>> parameters:
>>>> puppetmaster: ubuntu.ttinet
>>>> nginx::vhosts: "name => 'vhost1', port => 8080, docroot => "/var/www/test.ttinet", ssl => false, priority => 10, rails_env => 'development', passenger_enable => 'no', serveraliases => ['test', 'test2']"
>>>
>>> Two problems:
>>> 1. You can't pass the variable to the nginx scope by specifying
>>> nginx::vhosts, ENC parameters are all top scope, so this is
>>> effectively ::"nginx::vhosts". If you are using dynamic scoping, just
>>> use the parameter vhosts and that will get passed to the class
>>> nginx::vhost.
>>> 2. This isn't yaml representation of a hash, it's just a string. Use
>>> irb and to_yaml to get an idea what it should look like:
>>>
>>>> puts({'parameters'=>{"key1" => "val1", "hash1" => {"key"=>"val", "key2"=>"val2"}}}.to_yaml)
>>> —
>>> parameters:
>>> hash1:
>>> key: val
>>> key2: val2
>>> key1: val1
>>>
>>> Let me know if we can improve the information at:
>>> https://github.com/puppetlabs/puppetlabs-create_resources
>> ----
>> have spent most of the morning on this but still can't seem to figure out the magical incantation.
>>
>> # grep nginx_vhosts yaml/foreman/ubuntu7.ttinet.yaml
>> nginx_vhosts: "'vhost1' => { 'port' => '8080', 'docroot' => '/var/www/test.ttinet', 'ssl' => 'false', 'priority' => '10', 'rails_env' => 'development', 'passenger_enable' => 'no', 'serveraliases' => ['test', 'test2'] }"
>>
>
> You shouldn't quote the hash, because you are getting a string this
> should be more like it:
> —
> parameters:
> nginx_vhosts:
> vhost1:
> ssl: "false"
> port: "8080"
> priority: "10"
> docroot: /var/www/test.ttinet
> serveraliases:
> - test
> - test2
> rails_env: development
> passenger_enable: "no"

··· On Jul 18, 2011, at 2:25 PM, Nan Liu wrote: > On Mon, Jul 18, 2011 at 3:22 PM, Craig White wrote: ---- this just isn't working for me and I've been struggling all week. I am now down to trying to output the values in an erb file just to see what is there and how I could possibly access them (foreman parameters).

<%= ‘parameters’ %>

simply doesn’t work

nor does <%= nginx_vhosts %> (errors because it says it is not a defined variable)

I need some way I can access the parameters and I simply can’t figure out how to access them. I certainly can see the yaml representation of them in /var/lib/puppet/yaml/foreman/SYSTEM) but I can’t seem to get any type of handle on the data or string itself

Craig

I settled on using parameters in Foreman and it turned out that my boss didn't want vhosts locked in by puppet and wanted to freely maintain them the old fashioned way.

Craig

··· On Feb 23, 2012, at 10:02 PM, Sachar de Vries wrote:

Hello Craig, did you ever get this to work.

Just playing around with the puppetlabs-nginx module, which also uses resources to create vhosts and am also struggeling to figure out on how to call the following from foreman:

nginx::resource::vhost { ‘test2.local’:
ensure => present,
www_root => ‘/var/www/nginx-default’,
ssl => ‘true’,
ssl_cert => ‘/tmp/server.crt’,
ssl_key => ‘/tmp/server.pem’,
}

Thanks,


You received this message because you are subscribed to the Google Groups “Foreman users” group.
To view this discussion on the web visit https://groups.google.com/d/msg/foreman-users/-/OONHKZkVZtQJ.
To post to this group, send email to foreman-users@googlegroups.com.
To unsubscribe from this group, send email to foreman-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/foreman-users?hl=en.


Craig White ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ craig.white@ttiltd.com
1.800.869.6908 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ www.ttiassessments.com

Need help communicating between generations at work to achieve your desired success? Let us help!

In that case at best what you get is nginx_vhosts that a string that
looks like "vhosts1 => …", it's not a hash, so you don't have a
direct way of accessing the key/value like a hash.

With this constraint, you are going to have to write some code to get
around it. In puppet you should have access to the variable
nginx_vhosts, so write some function to convert it back to a hash.
$var = string_to_hash($nginx_vhosts)

Personally, I would simply use yaml format i.e. a string
"—\nport:'8080'\npriority:'high'\n" and use YAML.load function to
return it back to a hash. This is going to get really ugly if you have
a large amount of data, and there is no inheritance or concept of
merging the data.

Thanks,

Nan

··· On Tue, Jul 19, 2011 at 10:39 AM, Craig White wrote: > > On Jul 18, 2011, at 2:25 PM, Nan Liu wrote: > >> On Mon, Jul 18, 2011 at 3:22 PM, Craig White wrote: >>> >>> On Jul 15, 2011, at 3:20 PM, Nan Liu wrote: >>> >>>> On Fri, Jul 15, 2011 at 2:59 PM, Craig White wrote: >>>>> >>>>> On Jul 15, 2011, at 1:05 PM, Nan Liu wrote: >>>>> >>>>>> On Fri, Jul 15, 2011 at 12:34 PM, Craig White wrote: >>>>>>> I have a number of 'defines' and not actual classes. >>>>>> >>>>>> Based on the usage below they should be defines and not classes. If >>>>>> your issue is defines are resources and you have no ability to create >>>>>> resources via the ENC, look at create_resource function (in 2.7 and >>>>>> backported as a module for 2.6), essentially you will write a wrapper >>>>>> class that accepts a list of attributes and then create the >>>>>> appropriate resources. >>>>>> >>>>>>> I switched one of them over to a parameterized class and I was able to use parameters to pass in the needed values so I know I can make it work but I can sense that I will have to do a little refactoring because I can't have identically named parameters (untested but I am sure this will be a headache). >>>>>>> >>>>>>> But one of the things I really want to do is to be able to have multiple apache/nginx vhosts which in the 'define' world, allowed me to separately define each vhost and I can't think of a way I can get that done using the parameters as I understand them. >>>>>>> >>>>>>> for example, in one of my test nodes, I have... >>>>>>> >>>>>>> apache::vhost { "test.ttinet": >>>>>>> port => 8080, >>>>>>> docroot => "/var/www/test.ttinet", >>>>>>> ssl => false, >>>>>>> priority => 10, >>>>>>> rails_env => 'development', >>>>>>> passenger_enable => 'no', >>>>>>> serveraliases => ['test', 'test2'], >>>>>>> } >>>>>>> apache::vhost { "test2.ttinet": >>>>>>> port => 8080, >>>>>>> docroot => "/var/www/test2.ttinet", >>>>>>> ssl => false, >>>>>>> priority => 10, >>>>>>> serveraliases => ['test4', 'test3'], >>>>>>> } >>>>>>> >>>>>>> do I change apache::vhost to parameterized classes? >>>>>>> >>>>>>> how can I keep array 'form' for parameters, use define and be able to accomplish what I am doing in the flat file arrangement? >>>>>>> >>>>>>> (I note that I have been doing a bunch of googling and saw that the recommended method is to 'split' and I know the ruby method split($some_var,",") but I can't envision how this gets done in multiple vhosts and invokes a 'define' and not a class >>>>> ---- >>>>> OK - downloaded & create_resources into /var/lib/puppet/modules && restarted apache (using passenger so that is where foreman/puppetmaster live) >>>> >>>> Hmm, maybe start with smaller steps, make sure create resource is working >>>>> >>>>> # cat /var/lib/puppet/yaml/foreman/ubuntu5.ttinet >>>>> --- >>>>> parameters: >>>>> puppetmaster: ubuntu.ttinet >>>>> nginx::vhosts: "name => 'vhost1', port => 8080, docroot => \"/var/www/test.ttinet\", ssl => false, priority => 10, rails_env => 'development', passenger_enable => 'no', serveraliases => ['test', 'test2']" >>>> >>>> Two problems: >>>> 1. You can't pass the variable to the nginx scope by specifying >>>> nginx::vhosts, ENC parameters are all top scope, so this is >>>> effectively ::"nginx::vhosts". If you are using dynamic scoping, just >>>> use the parameter vhosts and that will get passed to the class >>>> nginx::vhost. >>>> 2. This isn't yaml representation of a hash, it's just a string. Use >>>> irb and to_yaml to get an idea what it should look like: >>>> >>>>> puts({'parameters'=>{"key1" => "val1", "hash1" => {"key"=>"val", "key2"=>"val2"}}}.to_yaml) >>>> --- >>>> parameters: >>>> hash1: >>>> key: val >>>> key2: val2 >>>> key1: val1 >>>> >>>> Let me know if we can improve the information at: >>>> https://github.com/puppetlabs/puppetlabs-create_resources >>> ---- >>> have spent most of the morning on this but still can't seem to figure out the magical incantation. >>> >>> # grep nginx_vhosts yaml/foreman/ubuntu7.ttinet.yaml >>> nginx_vhosts: "'vhost1' => { 'port' => '8080', 'docroot' => '/var/www/test.ttinet', 'ssl' => 'false', 'priority' => '10', 'rails_env' => 'development', 'passenger_enable' => 'no', 'serveraliases' => ['test', 'test2'] }" >>> >> >> You shouldn't quote the hash, because you are getting a string this >> should be more like it: >> --- >> parameters: >> nginx_vhosts: >> vhost1: >> ssl: "false" >> port: "8080" >> priority: "10" >> docroot: /var/www/test.ttinet >> serveraliases: >> - test >> - test2 >> rails_env: development >> passenger_enable: "no" >> >> Thanks, > ---- > the 'quote the hash' that I shouldn't be doing isn't my doing at all, it's what is happening when I add the parameter in foreman. Thus the quoting of the hash is the way it is presented from /var/lib/puppet/yaml/foreman/ubuntu7.ttinet.yaml under parameters.

>
>
>>>
>>>>> parameters:
>>>>> puppetmaster: ubuntu.ttinet
>>>>> nginx::vhosts: "name => 'vhost1', port => 8080, docroot => &quot;/var/www/test.ttinet&quot;, ssl => false, priority => 10, rails_env => 'development', passenger_enable => 'no', serveraliases => ['test', 'test2']"
>>>>
>>>> Two problems:
>>>> 1. You can't pass the variable to the nginx scope by specifying
>>>> nginx::vhosts, ENC parameters are all top scope, so this is
>>>> effectively ::"nginx::vhosts". If you are using dynamic scoping, just
>>>> use the parameter vhosts and that will get passed to the class
>>>> nginx::vhost.
>>>> 2. This isn't yaml representation of a hash, it's just a string. Use
>>>> irb and to_yaml to get an idea what it should look like:
>>>>
>>>>> puts({'parameters'=>{"key1" => "val1", "hash1" => {"key"=>"val", "key2"=>"val2"}}}.to_yaml)
>>>> —
>>>> parameters:
>>>> hash1:
>>>> key: val
>>>> key2: val2
>>>> key1: val1
>>>>
>>>> Let me know if we can improve the information at:
>>>> https://github.com/puppetlabs/puppetlabs-create_resources
>>> ----
>>> have spent most of the morning on this but still can't seem to figure out the magical incantation.
>>>
>>> # grep nginx_vhosts yaml/foreman/ubuntu7.ttinet.yaml
>>> nginx_vhosts: "'vhost1' => { 'port' => '8080', 'docroot' => '/var/www/test.ttinet', 'ssl' => 'false', 'priority' => '10', 'rails_env' => 'development', 'passenger_enable' => 'no', 'serveraliases' => ['test', 'test2'] }"
>>>
>>
>> You shouldn't quote the hash, because you are getting a string this
>> should be more like it:
>> —
>> parameters:
>> nginx_vhosts:
>> vhost1:
>> ssl: "false"
>> port: "8080"
>> priority: "10"
>> docroot: /var/www/test.ttinet
>> serveraliases:
>> - test
>> - test2
>> rails_env: development
>> passenger_enable: "no"
> ----
> this just isn't working for me and I've been struggling all week. I am now down to trying to output the values in an erb file just to see what is there and how I could possibly access them (foreman parameters).
>
> <%= 'parameters' %>
>
> simply doesn't work

Nope, parameters isn't available.

> nor does <%= nginx_vhosts %> (errors because it says it is not a defined variable)

This should work. Try this, where it will dump all variables that are
in scope to get you moving in the right direction.

$myvar = '{"hi"=>"bye"}'
$myvar2 = {}
$myvar2['hi'] = "bye"

notice (inline_template("<%=scope.to_hash.inspect %>"))

If you look at the output, you'll see the difference between a
variable that's a hash and a variable that's a string (that looks like
a hash):

"myvar2"=>{"hi"=>"bye"},
"myvar"=>"{&quot;hi&quot;=>&quot;bye&quot;}",

HTH,

Nan

··· On Thu, Jul 21, 2011 at 6:55 PM, Craig White wrote: > On Jul 18, 2011, at 2:25 PM, Nan Liu wrote: >> On Mon, Jul 18, 2011 at 3:22 PM, Craig White wrote:

>>
>>
>>>>
>>>>>> parameters:
>>>>>> puppetmaster: ubuntu.ttinet
>>>>>> nginx::vhosts: "name => 'vhost1', port => 8080, docroot => &quot;/var/www/test.ttinet&quot;, ssl => false, priority => 10, rails_env => 'development', passenger_enable => 'no', serveraliases => ['test', 'test2']"
>>>>>
>>>>> Two problems:
>>>>> 1. You can't pass the variable to the nginx scope by specifying
>>>>> nginx::vhosts, ENC parameters are all top scope, so this is
>>>>> effectively ::"nginx::vhosts". If you are using dynamic scoping, just
>>>>> use the parameter vhosts and that will get passed to the class
>>>>> nginx::vhost.
>>>>> 2. This isn't yaml representation of a hash, it's just a string. Use
>>>>> irb and to_yaml to get an idea what it should look like:
>>>>>
>>>>>> puts({'parameters'=>{"key1" => "val1", "hash1" => {"key"=>"val", "key2"=>"val2"}}}.to_yaml)
>>>>> —
>>>>> parameters:
>>>>> hash1:
>>>>> key: val
>>>>> key2: val2
>>>>> key1: val1
>>>>>
>>>>> Let me know if we can improve the information at:
>>>>> https://github.com/puppetlabs/puppetlabs-create_resources
>>>> ----
>>>> have spent most of the morning on this but still can't seem to figure out the magical incantation.
>>>>
>>>> # grep nginx_vhosts yaml/foreman/ubuntu7.ttinet.yaml
>>>> nginx_vhosts: "'vhost1' => { 'port' => '8080', 'docroot' => '/var/www/test.ttinet', 'ssl' => 'false', 'priority' => '10', 'rails_env' => 'development', 'passenger_enable' => 'no', 'serveraliases' => ['test', 'test2'] }"
>>>>
>>>
>>> You shouldn't quote the hash, because you are getting a string this
>>> should be more like it:
>>> —
>>> parameters:
>>> nginx_vhosts:
>>> vhost1:
>>> ssl: "false"
>>> port: "8080"
>>> priority: "10"
>>> docroot: /var/www/test.ttinet
>>> serveraliases:
>>> - test
>>> - test2
>>> rails_env: development
>>> passenger_enable: "no"
>> ----
>> this just isn't working for me and I've been struggling all week. I am now down to trying to output the values in an erb file just to see what is there and how I could possibly access them (foreman parameters).
>>
>> <%= 'parameters' %>
>>
>> simply doesn't work
>
> Nope, parameters isn't available.
>
>> nor does <%= nginx_vhosts %> (errors because it says it is not a defined variable)
>
> This should work. Try this, where it will dump all variables that are
> in scope to get you moving in the right direction.
>
> $myvar = '{"hi"=>"bye"}'
> $myvar2 = {}
> $myvar2['hi'] = "bye"
>
> notice (inline_template("<%=scope.to_hash.inspect %>"))
>
> If you look at the output, you'll see the difference between a
> variable that's a hash and a variable that's a string (that looks like
> a hash):
>
> "myvar2"=>{"hi"=>"bye"},
> "myvar"=>"{&quot;hi&quot;=>&quot;bye&quot;}",
>
> HTH,

··· On Jul 22, 2011, at 12:21 PM, Nan Liu wrote: > On Thu, Jul 21, 2011 at 6:55 PM, Craig White wrote: >> On Jul 18, 2011, at 2:25 PM, Nan Liu wrote: >>> On Mon, Jul 18, 2011 at 3:22 PM, Craig White wrote: ---- indeed it did - I finally got a few minutes to play around with this and see now that a parameter is essentially like a fact (at least to a class).

I think my biggest problem was trying to use parameterized classes and using this to override and I haven’t quite figured out a way to do that but at least I have a handle on how to get parameter assignments.

Thanks

Craig