lib/octofacts_updater/fact_index.rb
# Get a list of all of the nodes in the index. This supports a quick mode (default) where the
# TOP_LEVEL_NODES_KEY key is used, and a more detailed mode where this digs through each indexed
# fact and value to build a list of nodes.
#
# quick_mode - Boolean whether to use quick mode (default=true)
#
# Returns an Array of nodes whose facts are indexed.
Get a list of all of the nodes in the index. This supports a quick mode (default) where the
TOP_LEVEL_NODES_KEY key is used, and a more detailed mode where this digs through each indexed
fact and value to build a list of nodes.

Boolean whether to use quick mode (default=true)

Returns an Array of nodes whose facts are indexed.
Get a list of all of the nodes in the index . This supports a quick mode ( default ) where the TOP_LEVEL_NODES_KEY key is used and a more detailed mode where this digs through each indexed fact and value to build a list of nodes . Boolean whether to use quick mode ( default = true ) Returns an Array of nodes whose facts are indexed .
def nodes(quick_mode = true)
      if quick_mode && @index_data.key?(TOP_LEVEL_NODES_KEY)
        return @index_data[TOP_LEVEL_NODES_KEY]
      end
      seen_hosts = Set.new
      @index_data.each do |fact_name, fact_values|
        next if fact_name == TOP_LEVEL_NODES_KEY
        fact_values.each do |_fact_value, nodes|
          seen_hosts.merge(nodes)
        end
      end
      seen_hosts.to_a.sort
    end
def nodes ( quick_mode = true ) if quick_mode && @index_data . key? ( TOP_LEVEL_NODES_KEY ) return @index_data [ TOP_LEVEL_NODES_KEY ] end seen_hosts = Set . new @index_data . each do | fact_name , fact_values | next if fact_name == TOP_LEVEL_NODES_KEY fact_values . each do | _fact_value , nodes | seen_hosts . merge ( nodes ) end end seen_hosts . to_a . sort end
Get a list of all of the nodes in the index.
Get a list of all of the nodes in the index .
quick_mode
<not_specific>