diff options
| author | Luke Kanies <luke@madstop.com> | 2008-11-06 12:39:40 -0600 |
|---|---|---|
| committer | Luke Kanies <luke@madstop.com> | 2008-11-06 12:39:40 -0600 |
| commit | 7e20f06136f524187f64269e39cb95a0a81d4100 (patch) | |
| tree | e490a3b11c8753b08862af8ce7dc6eb30ea190e4 /lib/puppet/node | |
| parent | 2ba03364309c2347ba4e5bf7dd815beef7563b7b (diff) | |
| download | puppet-7e20f06136f524187f64269e39cb95a0a81d4100.tar.gz puppet-7e20f06136f524187f64269e39cb95a0a81d4100.tar.xz puppet-7e20f06136f524187f64269e39cb95a0a81d4100.zip | |
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 <luke@madstop.com>
Diffstat (limited to 'lib/puppet/node')
| -rw-r--r-- | lib/puppet/node/catalog.rb | 11 |
1 files changed, 3 insertions, 8 deletions
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 |
