Class Chef::Environment
In: lib/chef/environment.rb
Parent: Object

Methods

Included Modules

Chef::Mixin::ParamsValidate Chef::Mixin::FromFile Chef::IndexQueue::Indexable

Constants

DEFAULT = "default"
COMBINED_COOKBOOK_CONSTRAINT = /(.+)(?:[\s]+)((?:#{Chef::VersionConstraint::OPS.join('|')})(?:[\s]+).+)$/.freeze
DESIGN_DOCUMENT = { "version" => 1, "language" => "javascript", "views" => { "all" => { "map" => <<-EOJS function(doc) { if (doc.chef_type == "environment") { emit(doc.name, doc); } } EOJS

Attributes

couchdb  [RW] 
couchdb_id  [R] 
couchdb_rev  [RW] 

Public Class methods

Loads the set of Chef::CookbookVersion objects available to a given environment

Returns

Hash i.e. {

  "cookbook_name" => [ Chef::CookbookVersion ... ] ## the array of CookbookVersions is sorted highest to lowest

}

There will be a key for every cookbook. If no CookbookVersions are available for the specified environment the value will be an empty list.

Like cdb_load_filtered_cookbook_versions, loads the set of cookbooks available in a given environment. The difference is that this method will load Chef::MinimalCookbookVersion objects that contain only the information necessary for solving a cookbook collection for a given run list. The user of this method must call Chef::MinimalCookbookVersion.load_full_versions_of() after solving the cookbook collection to get the full objects.

Returns

Hash i.e. {

  "cookbook_name" => [ Chef::CookbookVersion ... ] ## the array of CookbookVersions is sorted highest to lowest

}

There will be a key for every cookbook. If no CookbookVersions are available for the specified environment the value will be an empty list.

Public Instance methods

[Validate]