summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2008-02-11 18:15:27 -0600
committerLuke Kanies <luke@madstop.com>2008-02-11 18:15:27 -0600
commitcf21ade9abf4541920b535b0e2643b30e44b067b (patch)
tree0e582c50fb022074c9856c045db7bbbbc4954360
parent744cd45378384d33b3118351536e70cd6ea8370d (diff)
downloadpuppet-cf21ade9abf4541920b535b0e2643b30e44b067b.tar.gz
puppet-cf21ade9abf4541920b535b0e2643b30e44b067b.tar.xz
puppet-cf21ade9abf4541920b535b0e2643b30e44b067b.zip
Switching the Node catalog to use the Tagging module
instead of its own tag methods.
-rw-r--r--lib/puppet/node/catalog.rb29
1 files changed, 4 insertions, 25 deletions
diff --git a/lib/puppet/node/catalog.rb b/lib/puppet/node/catalog.rb
index 2b9291680..96f60b179 100644
--- a/lib/puppet/node/catalog.rb
+++ b/lib/puppet/node/catalog.rb
@@ -1,5 +1,7 @@
require 'puppet/indirector'
+require 'puppet/util/tagging'
+
# This class models a node catalog. It is the thing
# meant to be passed from server to client, and it contains all
# of the information in the catalog, including the resources
@@ -8,6 +10,8 @@ class Puppet::Node::Catalog < Puppet::PGraph
extend Puppet::Indirector
indirects :catalog, :terminus_class => :compiler
+ include Puppet::Util::Tagging
+
# The host name this is a catalog for.
attr_accessor :name
@@ -268,7 +272,6 @@ class Puppet::Node::Catalog < Puppet::PGraph
super()
@name = name if name
@extraction_format ||= :transportable
- @tags = []
@classes = []
@resource_table = {}
@transient_resources = []
@@ -381,30 +384,6 @@ class Puppet::Node::Catalog < Puppet::PGraph
@resource_table.keys
end
- # Add a tag.
- def tag(*names)
- names.each do |name|
- name = name.to_s
- @tags << name unless @tags.include?(name)
- if name.include?("::")
- name.split("::").each do |sub|
- @tags << sub unless @tags.include?(sub)
- end
- end
- end
- nil
- end
-
- # Does our tag list include this tag?
- def tagged?(tag)
- @tags.include?(tag)
- end
-
- # Return the list of tags.
- def tags
- @tags.dup
- end
-
# Convert our catalog into a RAL catalog.
def to_ral
to_catalog :to_type