knife-pinnings 1.4.7 → 1.4.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/chef/knife/pinnings_mixin.rb +12 -1
- data/lib/knife-pinnings/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1a55a70ff01995fddd5aa797bbfad84595d4a873bdf4c729c786b84a8c420b60
|
|
4
|
+
data.tar.gz: 26847f094f983deff538eaa156462ed306fea86ef473d221ca380136397547e9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 74982f797d704af8ce30cb8116d0b63deb300af00f994187c0be41c83c7c198e2b7976cb93095e0419f34def7d60769ec65f658d055ff2038b81e63aebe39cf9
|
|
7
|
+
data.tar.gz: 8144cd876ea2de490d68a70295f0f8741d65043f52cc785dea77b6c7486025807efe528983940c48b93f75e223b547519fab58ce9b640e937d01e200b66a8b75
|
|
@@ -175,7 +175,18 @@ end
|
|
|
175
175
|
def solve_recipes(rest, environment, cookbooks_with_contraints)
|
|
176
176
|
run_list = Hash.new
|
|
177
177
|
run_list["run_list"] = cookbooks_with_contraints
|
|
178
|
-
|
|
178
|
+
begin
|
|
179
|
+
response = rest.post_rest("/environments/#{environment}/cookbook_versions",{:run_list => cookbooks_with_contraints})
|
|
180
|
+
rescue Net::HTTPClientException => e
|
|
181
|
+
puts "REST API Error #{e.response.code}"
|
|
182
|
+
case e.response.code
|
|
183
|
+
when "412"
|
|
184
|
+
puts "A set of cookbooks and/or cookbook versions could not be found that met all of the requirements of the list. A cookbook in the list may not exist. A dependency may be present for a cookbook that does not exist. A constraint on a cookbook made by a run-list, environment, or cookbook version, may not match an available cookbook version."
|
|
185
|
+
else
|
|
186
|
+
raise
|
|
187
|
+
end
|
|
188
|
+
exit 255
|
|
189
|
+
end
|
|
179
190
|
solution = Hash.new
|
|
180
191
|
response.sort.each do |name, cb|
|
|
181
192
|
solution[name]=cb['version']
|