knife 17.7.16 → 17.7.29

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 41e9f40d7033ea39c47dceac32f676ae924e73c97e652482bbc0cb114d3f1531
4
- data.tar.gz: a7cb6bb78b201ebd7fa754f1d0124c117ae8f538a162413cda6cbe017beefbb4
3
+ metadata.gz: be4b06276e35e8607fd42ccf9adab45beb709e3de9812b9f7d9bd026b83d2395
4
+ data.tar.gz: ddc9acce8bde6e250514a4850507c80c1e1b1c2934206c421a9e43d9d1a04e15
5
5
  SHA512:
6
- metadata.gz: ee4140067d3bdfd2a5f2ede6b5b98f3f3a4b9841b80585d827a4f5c1a0160e3a78d5a3e245935e8e68077fa83b9393365c47edc69c0691bfa41795124e272a7f
7
- data.tar.gz: d63e9aba6db87d269caa1fb8526260ed999a4d81eddacf78f4c925158c652d89bcf5f4e24bb7d08d85a136dd44c6fd43f2ffc7ea54eaaadb9688cae8d44cbb01
6
+ metadata.gz: 529677a2f81ba1fe3b9288c56175459108673497ee744e1a2697f6734949d927ff030ad37272ebb7d3a113e62c50e796ba8ed36ed8781a1b90c199e551654334
7
+ data.tar.gz: 06fc0ab9696defb918483b5d6e4d0aa2ca57229a0847d3c457d5b140e715c22ce823e80dd7da08db0b7e65722699d7181df89958c89b02459fff4ef504656a8a
@@ -44,7 +44,7 @@ class Chef
44
44
  org = Chef::Org.new(@org_name)
45
45
  begin
46
46
  org.associate_user(@username)
47
- rescue Net::HTTPServerException => e
47
+ rescue Net::HTTPClientException => e
48
48
  if e.response.code == "409"
49
49
  ui.msg "User #{username} already associated with organization #{org_name}"
50
50
  else
@@ -60,7 +60,7 @@ class Chef
60
60
 
61
61
  begin
62
62
  org.dissociate_user(@username)
63
- rescue Net::HTTPServerException => e
63
+ rescue Net::HTTPClientException => e
64
64
  if e.response.code == "404"
65
65
  ui.msg "User #{username} is not associated with organization #{org_name}"
66
66
  exit 1
@@ -88,7 +88,7 @@ class Chef
88
88
 
89
89
  def remove_user_from_admin_group(org, org_name, username, admin_group_string)
90
90
  org.remove_user_from_group(admin_group_string, username)
91
- rescue Net::HTTPServerException => e
91
+ rescue Net::HTTPClientException => e
92
92
  if e.response.code == "404"
93
93
  ui.warn <<~EOF
94
94
  User #{username} is not in the #{admin_group_string} group for organization #{org_name}.
@@ -17,7 +17,7 @@
17
17
  class Chef
18
18
  class Knife
19
19
  KNIFE_ROOT = File.expand_path("../..", __dir__)
20
- VERSION = "17.7.16".freeze
20
+ VERSION = "17.7.29".freeze
21
21
  end
22
22
  end
23
23
 
@@ -992,7 +992,7 @@ describe "knife delete", :workstation do
992
992
  end
993
993
 
994
994
  it "knife delete /policies/x-1.2.3.json succeeds" do
995
- knife("raw /policies/x/revisions/1.2.3").should_succeed "{\n \"name\": \"x\",\n \"revision_id\": \"1.2.3\",\n \"run_list\": [\n\n ],\n \"cookbook_locks\": {\n\n }\n}\n"
995
+ knife("raw /policies/x/revisions/1.2.3").should_succeed "{\n \"policy_group_list\": [\n \"x\"\n ],\n \"name\": \"x\",\n \"revision_id\": \"1.2.3\",\n \"run_list\": [\n\n ],\n \"cookbook_locks\": {\n\n }\n}\n"
996
996
  knife("delete /policies/x-1.2.3.json").should_succeed "Deleted /policies/x-1.2.3.json\n"
997
997
  knife("raw /policies/x/revisions/1.2.3").should_fail(/404/)
998
998
  end
@@ -1276,8 +1276,8 @@ describe "knife download", :workstation do
1276
1276
  file "members.json", [ "bar" ]
1277
1277
  file "nodes/x.json", { "normal" => { "tags" => [] } }
1278
1278
  file "org.json", { "full_name" => "Something" }
1279
- file "policies/x-1.0.0.json", {}
1280
- file "policies/blah-1.0.0.json", {}
1279
+ file "policies/x-1.0.0.json", { "policy_group_list" => [ "x" ] }
1280
+ file "policies/blah-1.0.0.json", { "policy_group_list" => [ "x" ] }
1281
1281
  file "policy_groups/x.json", { "policies" => { "x" => { "revision_id" => "1.0.0" }, "blah" => { "revision_id" => "1.0.0" } } }
1282
1282
  file "roles/x.json", {}
1283
1283
  end
@@ -1383,8 +1383,8 @@ describe "knife upload", :workstation do
1383
1383
  file "members.json", [ "bar" ]
1384
1384
  file "org.json", { "full_name" => "wootles" }
1385
1385
  file "nodes/x.json", { "normal" => { "tags" => [] } }
1386
- file "policies/x-1.0.0.json", {}
1387
- file "policies/blah-1.0.0.json", {}
1386
+ file "policies/x-1.0.0.json", { "policy_group_list" => [ "x" ] }
1387
+ file "policies/blah-1.0.0.json", { "policy_group_list" => [ "x" ] }
1388
1388
  file "policy_groups/x.json", { "policies" => { "x" => { "revision_id" => "1.0.0" }, "blah" => { "revision_id" => "1.0.0" } } }
1389
1389
  file "roles/x.json", {}
1390
1390
  end
@@ -1484,12 +1484,11 @@ describe "knife upload", :workstation do
1484
1484
  environment "x", { "description" => "foo" }
1485
1485
  group "x", { "groups" => [ "admin" ] }
1486
1486
  node "x", { "run_list" => [ "blah" ] }
1487
- policy "x", "1.0.0", {}
1488
- policy "x", "1.0.1", {}
1489
- policy "y", "1.0.0", {}
1487
+ policy "x", "1.0.0", { "policy_group_list" => [ "x" ] }
1488
+ policy "y", "1.0.0", { "policy_group_list" => [ "x" ] }
1490
1489
  policy_group "x", {
1491
1490
  "policies" => {
1492
- "x" => { "revision_id" => "1.0.1" },
1491
+ "x" => { "revision_id" => "1.0.0" },
1493
1492
  "y" => { "revision_id" => "1.0.0" },
1494
1493
  },
1495
1494
  }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: knife
3
3
  version: !ruby/object:Gem::Version
4
- version: 17.7.16
4
+ version: 17.7.29
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Jacob
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-10-22 00:00:00.000000000 Z
11
+ date: 2021-10-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: chef-config