Carlos Tapia
2012-Oct-04 13:42 UTC
[Puppet Users] How to remove warnings related to Resource references should now be capitalized when starts with number?
Hi Guys! I want to clean warning messages: "*warning: Deprecation notice: Resource references should now be capitalized*... " It is related to following line: * -> appcmd::32Bit[''32BitappPool'']* If I try to change any piece of the code using caps. for the fisrt letter, a syntax error is displayed. * err: Could not parse for environment production: Syntax error at '':''; expected ''}'' * Any suggestion? (The main issue is that the reference values start with numbers. With the refers that start with letters we have no problem, ''cause we know the structure) Thnx! -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/Oai34whey_8J. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
jcbollinger
2012-Oct-08 14:38 UTC
[Puppet Users] Re: How to remove warnings related to Resource references should now be capitalized when starts with number?
On Thursday, October 4, 2012 8:42:39 AM UTC-5, Carlos Tapia wrote:> > Hi Guys! > > I want to clean warning messages: "*warning: Deprecation notice: > Resource references should now be capitalized*... " > It is related to following line: > > * -> appcmd::32Bit[''32BitappPool'']* > > If I try to change any piece of the code using caps. for the fisrt letter, > a syntax error is displayed. > > * err: Could not parse for environment production: Syntax error at '':''; > expected ''}'' * > > Any suggestion? >What is the actual name of the definition? It probably should be appcmd::32bit (not appcmd::32Bit; type names should not contain capital letters). If you are using an all-lowercase name, I would expect references to it to require the form: Appcmd::32bit[<resource name>] If Puppet raises a syntax error on that then I''ll need to see a more complete piece of code to guess at why. John -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/vBTPJuS3XqkJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
llowder
2012-Oct-08 16:11 UTC
[Puppet Users] Re: How to remove warnings related to Resource references should now be capitalized when starts with number?
comments in line.. On Monday, October 8, 2012 9:38:05 AM UTC-5, jcbollinger wrote:> > > > On Thursday, October 4, 2012 8:42:39 AM UTC-5, Carlos Tapia wrote: >> >> Hi Guys! >> >> I want to clean warning messages: "*warning: Deprecation notice: >> Resource references should now be capitalized*... " >> It is related to following line: >> >> * -> appcmd::32Bit[''32BitappPool'']* >> >> If I try to change any piece of the code using caps. for the fisrt >> letter, a syntax error is displayed. >> >> * err: Could not parse for environment production: Syntax error at >> '':''; expected ''}'' * >> >> Any suggestion? >> > >"32Bit" isn''t a legal name.. the regex is [a-z][a-z0-9_]* for classes and defines. Variables are a little more relaxed, but it is recommended that you stick to that same pattern for forwards compatibility.> What is the actual name of the definition? It probably should be > appcmd::32bit (not appcmd::32Bit; type names should not contain capital > letters). If you are using an all-lowercase name, I would expect > references to it to require the form: > > Appcmd::32bit[<resource name>] > > If Puppet raises a syntax error on that then I''ll need to see a more > complete piece of code to guess at why. > > > John > >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/ebTlLGbC48wJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Henrik Lindberg
2012-Oct-08 22:56 UTC
Re: [Puppet Users] Re: How to remove warnings related to Resource references should now be capitalized when starts with number?
On 2012-08-10 18:11, llowder wrote:> > comments in line.. > On Monday, October 8, 2012 9:38:05 AM UTC-5, jcbollinger wrote: > > > > On Thursday, October 4, 2012 8:42:39 AM UTC-5, Carlos Tapia wrote: > > Hi Guys! > > I want to clean warning messages: "*warning: Deprecation notice: > Resource references should now be capitalized*... " > It is related to following line: > > * -> appcmd::32Bit[''32BitappPool'']* > > If I try to change any piece of the code using caps. for the > fisrt letter, a syntax error is displayed. > > * err: Could not parse for environment production: Syntax > error at '':''; expected ''}'' * > > Any suggestion? > > > > "32Bit" isn''t a legal name.. the regex is [a-z][a-z0-9_]* for classes > and defines. Variables are a little more relaxed, but it is recommended > that you stick to that same pattern for forwards compatibility. >To reference an instance of a resource type (written in Ruby, or a user defined resource type using define) the type name should be used, and each name segment should be initially capitalized. i.e. for something simple like a file, you use File[''name''] (instead of file[''name'']). If you have a complex type you capitalize each segment e.g. Foo::Bar[''name'']. As pointed out "32bit" is not really a valid name, and it is impossible to capitalize "3" ;-) Suggest changing it to say bitsize_32 or somesuch, and then reference the instance with Appcmd::Bitsize_32[''name'']. - henrik> > What is the actual name of the definition? It probably should be > appcmd::32bit (not appcmd::32Bit; type names should not contain > capital letters). If you are using an all-lowercase name, I would > expect references to it to require the form: > > Appcmd::32bit[<resource name>] > > If Puppet raises a syntax error on that then I''ll need to see a more > complete piece of code to guess at why. > > > John > > -- > You received this message because you are subscribed to the Google > Groups "Puppet Users" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/puppet-users/-/ebTlLGbC48wJ. > To post to this group, send email to puppet-users@googlegroups.com. > To unsubscribe from this group, send email to > puppet-users+unsubscribe@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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.