diff options
author | danielsdeleo <dan@getchef.com> | 2015-02-10 11:10:06 -0800 |
---|---|---|
committer | danielsdeleo <dan@getchef.com> | 2015-02-11 10:52:50 -0800 |
commit | 320a3871d8ac3699e55a063d697537a9538435c6 (patch) | |
tree | 092ccb0123b5c840264ecb120b6a13f20fda97af /lib/chef | |
parent | 5c72aff6a75c749c28b153b576f75ea1e818708c (diff) | |
download | chef-320a3871d8ac3699e55a063d697537a9538435c6.tar.gz |
Add stability warning for policy mode
Diffstat (limited to 'lib/chef')
-rw-r--r-- | lib/chef/cookbook_manifest.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/chef/cookbook_manifest.rb b/lib/chef/cookbook_manifest.rb index 5bde5b1e3e..ef4adfbeb9 100644 --- a/lib/chef/cookbook_manifest.rb +++ b/lib/chef/cookbook_manifest.rb @@ -43,6 +43,15 @@ class Chef # You can subsequently call #to_hash to get a Hash representation of the # cookbook_version in the "manifest" format, or #to_json to get a JSON # representation of the cookbook_version. + # + # @param policy_mode [Boolean] whether to convert cookbooks to Hash/JSON in + # the format used by the `cookbook_artifacts` endpoint (for policyfiles). + # Setting this option also changes the behavior of #save_url and + # #force_save_url such that CookbookVersions will be uploaded to the new + # `cookbook_artifacts` API. This endpoint is currently under active + # development and the format is expected to change frequently, therefore + # the result of #manifest, #to_hash, and #to_json will not be stable when + # `policy_mode` is enabled. def initialize(cookbook_version, policy_mode: false) @cookbook_version = cookbook_version @policy_mode = !!policy_mode |