Exception: Chef::Exceptions::CookbookVersionSelection::InvalidRunListItems
- Inherits:
-
StandardError
- Object
- StandardError
- Chef::Exceptions::CookbookVersionSelection::InvalidRunListItems
- Defined in:
- lib/chef/exceptions.rb
Overview
Compound exception: In run_list expansion and resolution, run_list items referred to cookbooks that don’t exist and/or have no versions available.
Instance Attribute Summary collapse
-
#cookbooks_with_no_matching_versions ⇒ Object
readonly
Returns the value of attribute cookbooks_with_no_matching_versions.
-
#non_existent_cookbooks ⇒ Object
readonly
Returns the value of attribute non_existent_cookbooks.
Instance Method Summary collapse
-
#initialize(message, non_existent_cookbooks, cookbooks_with_no_matching_versions) ⇒ InvalidRunListItems
constructor
A new instance of InvalidRunListItems.
- #to_json(*a) ⇒ Object
Constructor Details
#initialize(message, non_existent_cookbooks, cookbooks_with_no_matching_versions) ⇒ InvalidRunListItems
Returns a new instance of InvalidRunListItems.
277 278 279 280 281 282 |
# File 'lib/chef/exceptions.rb', line 277 def initialize(, non_existent_cookbooks, cookbooks_with_no_matching_versions) super() @non_existent_cookbooks = non_existent_cookbooks @cookbooks_with_no_matching_versions = cookbooks_with_no_matching_versions end |
Instance Attribute Details
#cookbooks_with_no_matching_versions ⇒ Object (readonly)
Returns the value of attribute cookbooks_with_no_matching_versions.
275 276 277 |
# File 'lib/chef/exceptions.rb', line 275 def cookbooks_with_no_matching_versions @cookbooks_with_no_matching_versions end |
#non_existent_cookbooks ⇒ Object (readonly)
Returns the value of attribute non_existent_cookbooks.
274 275 276 |
# File 'lib/chef/exceptions.rb', line 274 def non_existent_cookbooks @non_existent_cookbooks end |
Instance Method Details
#to_json(*a) ⇒ Object
284 285 286 287 288 289 290 291 |
# File 'lib/chef/exceptions.rb', line 284 def to_json(*a) result = { "message" => , "non_existent_cookbooks" => non_existent_cookbooks, "cookbooks_with_no_versions" => cookbooks_with_no_matching_versions } Chef::JSONCompat.to_json(result, *a) end |