Neil, The error you're getting definitely sounds like it doesn't like the square brackets in the isvariable call, so that would seem to answer my first question the negative, meaning my entire attempt to create classes from an array is probably not valid, unless there's a bug.
Justin -----Original Message----- From: nwat...@symcor.com [mailto:nwat...@symcor.com] Sent: Wednesday, February 03, 2010 11:57 AM To: Justin Lloyd Cc: help-cfengine@cfengine.org; help-cfengine-boun...@cfengine.org Subject: Re: Defining classes using array values I get a similar message but still a report: [r...@unxxhd01 inputs]# cf-agent -f ./foo.cf Validation: Scalar item in built-in FnCall isvariable-arg => { foo[1] } in rvalue is out of bounds (value should match pattern [a-zA-Z0-9_$.]+) R: foo[1] is a variable with value one Validation: Scalar item in built-in FnCall isvariable-arg => { foo[1] } in rvalue is out of bounds (value should match pattern [a-zA-Z0-9_$.]+) Validation: Scalar item in built-in FnCall isvariable-arg => { foo[1] } in rvalue is out of bounds (value should match pattern [a-zA-Z0-9_$.]+) [r...@unxxhd01 inputs]# cat foo.cf ###################### body common control { bundlesequence => { "neil" }; } bundle agent neil { vars: "foo[1]" string => "one"; "foo[2]" string => "two"; "foo[3]" string => "three"; classes: "runtime_${foo[1]}" expression => isvariable("foo[1]"); reports: redhat:: "foo[1] is a variable with value ${foo[1]}", ifvarclass => "runtime_${foo[1]}"; } Sincerely, -- Neil Watson 416-673-3465 This electronic communication and any attachments may contain confidential and proprietary information of DigitalGlobe, Inc. If you are not the intended recipient, or an agent or employee responsible for delivering this communication to the intended recipient, or if you have received this communication in error, please do not print, copy, retransmit, disseminate or otherwise use the information. Please indicate to the sender that you have received this communication in error, and delete the copy you received. DigitalGlobe reserves the right to monitor any electronic communication sent or received by its employees, agents or representatives. _______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine