From 7e20f06136f524187f64269e39cb95a0a81d4100 Mon Sep 17 00:00:00 2001 From: Luke Kanies Date: Thu, 6 Nov 2008 12:39:40 -0600 Subject: Changing the catalog's relationship graph into a normal graph. It was previously another catalog instance, but I was only ever actually using the graphing abilities. Signed-off-by: Luke Kanies --- lib/puppet/node/catalog.rb | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'lib/puppet/node') diff --git a/lib/puppet/node/catalog.rb b/lib/puppet/node/catalog.rb index 0138fd8cb..76fc8f940 100644 --- a/lib/puppet/node/catalog.rb +++ b/lib/puppet/node/catalog.rb @@ -38,11 +38,6 @@ class Puppet::Node::Catalog < Puppet::SimpleGraph # that the host catalog needs. attr_accessor :host_config - # Whether this graph is another catalog's relationship graph. - # We don't want to accidentally create a relationship graph for another - # relationship graph. - attr_accessor :is_relationship_graph - # Whether this catalog was retrieved from the cache, which affects # whether it is written back out again. attr_accessor :from_cache @@ -77,7 +72,7 @@ class Puppet::Node::Catalog < Puppet::SimpleGraph self.alias(resource, resource.name) if resource.isomorphic? end - resource.catalog = self if resource.respond_to?(:catalog=) and ! is_relationship_graph + resource.catalog = self if resource.respond_to?(:catalog=) add_vertex(resource) end @@ -157,7 +152,7 @@ class Puppet::Node::Catalog < Puppet::SimpleGraph @resource_table.clear if defined?(@relationship_graph) and @relationship_graph - @relationship_graph.clear(false) + @relationship_graph.clear @relationship_graph = nil end end @@ -202,7 +197,7 @@ class Puppet::Node::Catalog < Puppet::SimpleGraph add_resource(resource) if @relationship_graph - @relationship_graph.add_resource(resource) unless @relationship_graph.resource(resource.ref) + @relationship_graph.add_vertex(resource) end resource end -- cgit