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 | |
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')
-rw-r--r-- | lib/puppet/node/catalog.rb | 11 | ||||
-rw-r--r-- | lib/puppet/type/component.rb | 1 |
2 files changed, 3 insertions, 9 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 diff --git a/lib/puppet/type/component.rb b/lib/puppet/type/component.rb index 1d1bc9ee8..17ab5b130 100644 --- a/lib/puppet/type/component.rb +++ b/lib/puppet/type/component.rb @@ -5,7 +5,6 @@ require 'puppet' require 'puppet/type' require 'puppet/transaction' -require 'puppet/pgraph' Puppet::Type.newtype(:component) do include Enumerable |