diff options
author | Brice Figureau <brice-puppet@daysofwonder.com> | 2010-04-25 17:52:37 +0200 |
---|---|---|
committer | test branch <puppet-dev@googlegroups.com> | 2010-02-17 06:50:53 -0800 |
commit | f35c59f83b8df2e595ec44a6258dbae30c81237e (patch) | |
tree | 6412ef4027d99e2cc70d6f0dcdb80d1c60649f13 /lib/puppet | |
parent | 938fbe914a811b10146f817368883df8180ef224 (diff) | |
download | puppet-f35c59f83b8df2e595ec44a6258dbae30c81237e.tar.gz puppet-f35c59f83b8df2e595ec44a6258dbae30c81237e.tar.xz puppet-f35c59f83b8df2e595ec44a6258dbae30c81237e.zip |
Fix #3667 - Fix class namespace
Class namespace is different than namespace of nodes and definition as
it contains the whole qualified name.
This bit was left out in the type are not AST anymore refactoring.
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
Diffstat (limited to 'lib/puppet')
-rw-r--r-- | lib/puppet/resource/type.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/puppet/resource/type.rb b/lib/puppet/resource/type.rb index e60f87953..ab57f962f 100644 --- a/lib/puppet/resource/type.rb +++ b/lib/puppet/resource/type.rb @@ -289,7 +289,11 @@ class Puppet::Resource::Type @namespace = "" else @name = name.to_s.downcase - @namespace, ignored_shortname = namesplit(@name) + + # Note we're doing something somewhat weird here -- we're setting + # the class's namespace to its fully qualified name. This means + # anything inside that class starts looking in that namespace first. + @namespace, ignored_shortname = @type == :hostclass ? [@name, ''] : namesplit(@name) end end |