Issue #9443 has been updated by Daniel Pittman.

Status changed from In Topic Branch Pending Review to Merged - Pending Release
Target version set to 2.7.11

Thanks for this.  Happy to merge it, and very well done. :)
----------------------------------------
Bug #9443: Faces should allow numbers in their names
https://projects.puppetlabs.com/issues/9443

Author: Jeff McCune
Status: Merged - Pending Release
Priority: Normal
Assignee: Franz Pletz
Category: Faces
Target version: 2.7.11
Affected Puppet version: 2.7.3
Keywords: 
Branch: https://github.com/puppetlabs/puppet/pull/367


# Overview #

I have a face I'd like to create named "node_ec2" but Puppet refuses to load 
this face because of the number 2 in the name:

<pre>
[root@centos ~]# puppet help
err: "node_ec2" (String) is not a valid face nameerr: Try 'puppet help help 
help' for usage
</pre>

The problem seems to be in the underscorize method:
<pre>
# /opt/puppet/lib/ruby/site_ruby/1.8/puppet/interface/face_collection.rb
  def self.underscorize(name)
    unless name.to_s =~ /^[-_a-z]+$/i then
      raise ArgumentError, "#{name.inspect} (#{name.class}) is not a valid face 
name"
    end

    name.to_s.downcase.split(/[-_]/).join('_').to_sym
  end
</pre>


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to