summaryrefslogtreecommitdiffstats
path: root/lib/puppet/parser
diff options
context:
space:
mode:
authorluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2006-02-10 22:00:30 +0000
committerluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2006-02-10 22:00:30 +0000
commit2be25d51f38f53c92bcc6b9688344fdb1c06f48f (patch)
tree883fb30254b637312ec4518d189df10ef13fd159 /lib/puppet/parser
parent7f7b5c679ff4957dcd94b4652033b9fad871cad2 (diff)
downloadpuppet-2be25d51f38f53c92bcc6b9688344fdb1c06f48f.tar.gz
puppet-2be25d51f38f53c92bcc6b9688344fdb1c06f48f.tar.xz
puppet-2be25d51f38f53c92bcc6b9688344fdb1c06f48f.zip
Making the language name a real alias. Now all objects in Puppet support specifying both the name and the namevar, or just a name and having the namevar set.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@896 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib/puppet/parser')
-rw-r--r--lib/puppet/parser/ast/objectdef.rb4
-rw-r--r--lib/puppet/parser/scope.rb1
2 files changed, 3 insertions, 2 deletions
diff --git a/lib/puppet/parser/ast/objectdef.rb b/lib/puppet/parser/ast/objectdef.rb
index 8b40bda71..cf1525540 100644
--- a/lib/puppet/parser/ast/objectdef.rb
+++ b/lib/puppet/parser/ast/objectdef.rb
@@ -21,10 +21,10 @@ class Puppet::Parser::AST
when Puppet::Type:
raise Puppet::Error,
"Built-in types must be provided with a name"
- when HostClass:
+ when Node:
return type
else
- Puppet.info "Autogenerating name for object of type %s" %
+ Puppet.debug "Autogenerating name for object of type %s" %
type
return [type, "-", self.object_id].join("")
end
diff --git a/lib/puppet/parser/scope.rb b/lib/puppet/parser/scope.rb
index 3e88490e3..d05ccac03 100644
--- a/lib/puppet/parser/scope.rb
+++ b/lib/puppet/parser/scope.rb
@@ -727,6 +727,7 @@ module Puppet
if defined? @name
bucket = TransBucket.new
bucket.name = @name
+ bucket.autoname = self.autoname
# it'd be nice not to have to do this...
results.each { |result|