diff options
-rw-r--r-- | lib/puppet/node/catalog.rb | 29 |
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 |