diff options
| author | Luke Kanies <luke@madstop.com> | 2007-11-19 01:36:48 -0600 |
|---|---|---|
| committer | Luke Kanies <luke@madstop.com> | 2007-11-19 01:36:48 -0600 |
| commit | 2b14f627aca1d5be69cf6606044df4d6e67f6eba (patch) | |
| tree | a20db3a608af483f598f482e743868413da8fd8f /lib/puppet/node | |
| parent | 9cf477b6cc771eab7bd29d18c49128571e877987 (diff) | |
| download | puppet-2b14f627aca1d5be69cf6606044df4d6e67f6eba.tar.gz puppet-2b14f627aca1d5be69cf6606044df4d6e67f6eba.tar.xz puppet-2b14f627aca1d5be69cf6606044df4d6e67f6eba.zip | |
Reverting the changes I'd made toward removing the global
resources. These are commits:
c19835ce9f8a5138b30a1a32ca741c996b0916d2
9290cc89a2206fb5204578f8e91208857a48b147
ffb4c2dbc7314b364d25e4f7be599ef05b767b44
Diffstat (limited to 'lib/puppet/node')
| -rw-r--r-- | lib/puppet/node/configuration.rb | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/lib/puppet/node/configuration.rb b/lib/puppet/node/configuration.rb index e131839df..804f357d1 100644 --- a/lib/puppet/node/configuration.rb +++ b/lib/puppet/node/configuration.rb @@ -60,22 +60,11 @@ class Puppet::Node::Configuration < Puppet::PGraph end ref = resource.ref - if @resource_table.include?(ref) raise ArgumentError, "Resource %s is already defined" % ref else @resource_table[ref] = resource end - - # If the name and title differ, set up an alias - if ! resource.is_a?(Puppet::Type::Component) and resource.respond_to?(:title) and resource.name != resource.title - if obj = resource(resource.class.name, resource.name) - raise Puppet::Error, "%s already exists with name %s" % [obj.title, self.name] if resource.class.isomorphic? - else - self.alias(resource, resource.name) - end - end - resource.configuration = self unless is_relationship_graph add_vertex!(resource) end @@ -194,11 +183,6 @@ class Puppet::Node::Configuration < Puppet::PGraph unless klass = Puppet::Type.type(type) raise ArgumentError, "Unknown resource type %s" % type end - if options.is_a?(Puppet::TransObject) - options.configuration = self - else - options[:configuration] = self - end return unless resource = klass.create(options) @transient_resources << resource if applying? @@ -386,11 +370,6 @@ class Puppet::Node::Configuration < Puppet::PGraph end end - # Return an array of the currently-defined resources. - def resources - @resource_table.keys - end - # Add a tag. def tag(*names) names.each do |name| |
