oneops-admin/lib/shared/cookbooks/artifact/libraries/chef_artifact.rb
def encrypted_data_bag_for(node, data_bag)
        @encrypted_data_bags = {} unless @encrypted_data_bags

        if encrypted_data_bags[data_bag]
          return get_from_data_bags_cache(data_bag)
        else
          data_bag_item = encrypted_data_bag_item(data_bag, node.chef_environment)
          data_bag_item ||= encrypted_data_bag_item(data_bag, WILDCARD_DATABAG_ITEM)
          data_bag_item ||= encrypted_data_bag_item(data_bag, "nexus")
          data_bag_item ||= {}
          @encrypted_data_bags[data_bag] = data_bag_item
          return data_bag_item
        end
      end
# Looks for the given data bag in the cache and if not found, will load a
# data bag item named for the chef_environment, '_wildcard', or the old 
# 'nexus' value.
#
# @param  node [Chef::Node] the node
# @param  data_bag [String] the data bag to load
# 
# @return [Chef::Mash] the data bag item in Mash form
Looks for the given data bag in the cache and if not found, will load a
data bag item named for the chef_environment, '_wildcard', or the old
'nexus' value.
Looks for the given data bag in the cache and if not found will load a data bag item named for the chef_environment ' _wildcard ' or the old ' nexus ' value .
def encrypted_data_bag_for(node, data_bag)
        @encrypted_data_bags = {} unless @encrypted_data_bags
        if encrypted_data_bags[data_bag]
          return get_from_data_bags_cache(data_bag)
        else
          data_bag_item = encrypted_data_bag_item(data_bag, node.chef_environment)
          data_bag_item ||= encrypted_data_bag_item(data_bag, WILDCARD_DATABAG_ITEM)
          data_bag_item ||= encrypted_data_bag_item(data_bag, "nexus")
          data_bag_item ||= {}
          @encrypted_data_bags[data_bag] = data_bag_item
          return data_bag_item
        end
      end
def encrypted_data_bag_for ( node , data_bag ) @encrypted_data_bags = { } unless @encrypted_data_bags if encrypted_data_bags [ data_bag ] return get_from_data_bags_cache ( data_bag ) else data_bag_item = encrypted_data_bag_item ( data_bag , node . chef_environment ) data_bag_item ||= encrypted_data_bag_item ( data_bag , WILDCARD_DATABAG_ITEM ) data_bag_item ||= encrypted_data_bag_item ( data_bag , "nexus" ) data_bag_item ||= { } @encrypted_data_bags [ data_bag ] = data_bag_item return data_bag_item end end
Looks for the given data bag in the cache and if not found, will load a
data bag item named for the chef_environment, '_wildcard', or the old
'nexus' value.
Looks for the given data bag in the cache and if not found will load a data bag item named for the chef_environment ' _wildcard ' or the old ' nexus ' value .
the data bag item in Mash form
the data bag item in Mash form
Chef::Mash
node
None
data_bag
the data bag to load
the data bag to load