knife 17.4.46 → 17.7.29
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/knife.gemspec +2 -2
- data/lib/chef/knife/acl_base.rb +1 -1
- data/lib/chef/knife/org_user_add.rb +1 -1
- data/lib/chef/knife/org_user_remove.rb +2 -2
- data/lib/chef/knife/version.rb +1 -1
- data/spec/integration/delete_spec.rb +1 -1
- data/spec/integration/download_spec.rb +2 -2
- data/spec/integration/upload_spec.rb +5 -6
- metadata +2 -30
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: be4b06276e35e8607fd42ccf9adab45beb709e3de9812b9f7d9bd026b83d2395
|
4
|
+
data.tar.gz: ddc9acce8bde6e250514a4850507c80c1e1b1c2934206c421a9e43d9d1a04e15
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 529677a2f81ba1fe3b9288c56175459108673497ee744e1a2697f6734949d927ff030ad37272ebb7d3a113e62c50e796ba8ed36ed8781a1b90c199e551654334
|
7
|
+
data.tar.gz: 06fc0ab9696defb918483b5d6e4d0aa2ca57229a0847d3c457d5b140e715c22ce823e80dd7da08db0b7e65722699d7181df89958c89b02459fff4ef504656a8a
|
data/knife.gemspec
CHANGED
@@ -28,9 +28,9 @@ Gem::Specification.new do |s|
|
|
28
28
|
s.add_dependency "ffi-yajl", "~> 2.2"
|
29
29
|
s.add_dependency "net-ssh", ">= 5.1", "< 7"
|
30
30
|
s.add_dependency "net-ssh-multi", "~> 1.2", ">= 1.2.1"
|
31
|
-
s.add_dependency "ed25519", "~> 1.2" # ed25519 ssh key support
|
32
31
|
s.add_dependency "bcrypt_pbkdf", "~> 1.1" # ed25519 ssh key support
|
33
|
-
|
32
|
+
# disabling this until we get get it to compile on RHEL 7
|
33
|
+
# s.add_dependency "x25519", ">= 1.0.9" # ed25519 KEX module. 1.0.9+ required to resolve sigill failures
|
34
34
|
s.add_dependency "highline", ">= 1.6.9", "< 3" # Used in UI to present a list, no other usage.
|
35
35
|
|
36
36
|
s.add_dependency "tty-prompt", "~> 0.21" # knife ui.ask prompt
|
data/lib/chef/knife/acl_base.rb
CHANGED
@@ -25,7 +25,7 @@ class Chef
|
|
25
25
|
|
26
26
|
PERM_TYPES = %w{create read update delete grant}.freeze unless defined? PERM_TYPES
|
27
27
|
MEMBER_TYPES = %w{client group user}.freeze unless defined? MEMBER_TYPES
|
28
|
-
OBJECT_TYPES = %w{clients containers cookbooks data environments groups nodes roles policies policy_groups}.freeze unless defined? OBJECT_TYPES
|
28
|
+
OBJECT_TYPES = %w{clients containers cookbook_artifacts cookbooks data environments groups nodes roles policies policy_groups}.freeze unless defined? OBJECT_TYPES
|
29
29
|
OBJECT_NAME_SPEC = /^[\-[:alnum:]_\.]+$/.freeze unless defined? OBJECT_NAME_SPEC
|
30
30
|
|
31
31
|
def validate_object_type!(type)
|
@@ -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::
|
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::
|
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::
|
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}.
|
data/lib/chef/knife/version.rb
CHANGED
@@ -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 "
|
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.
|
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.
|
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-
|
11
|
+
date: 2021-10-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: chef-config
|
@@ -228,20 +228,6 @@ dependencies:
|
|
228
228
|
- - ">="
|
229
229
|
- !ruby/object:Gem::Version
|
230
230
|
version: 1.2.1
|
231
|
-
- !ruby/object:Gem::Dependency
|
232
|
-
name: ed25519
|
233
|
-
requirement: !ruby/object:Gem::Requirement
|
234
|
-
requirements:
|
235
|
-
- - "~>"
|
236
|
-
- !ruby/object:Gem::Version
|
237
|
-
version: '1.2'
|
238
|
-
type: :runtime
|
239
|
-
prerelease: false
|
240
|
-
version_requirements: !ruby/object:Gem::Requirement
|
241
|
-
requirements:
|
242
|
-
- - "~>"
|
243
|
-
- !ruby/object:Gem::Version
|
244
|
-
version: '1.2'
|
245
231
|
- !ruby/object:Gem::Dependency
|
246
232
|
name: bcrypt_pbkdf
|
247
233
|
requirement: !ruby/object:Gem::Requirement
|
@@ -256,20 +242,6 @@ dependencies:
|
|
256
242
|
- - "~>"
|
257
243
|
- !ruby/object:Gem::Version
|
258
244
|
version: '1.1'
|
259
|
-
- !ruby/object:Gem::Dependency
|
260
|
-
name: x25519
|
261
|
-
requirement: !ruby/object:Gem::Requirement
|
262
|
-
requirements:
|
263
|
-
- - ">="
|
264
|
-
- !ruby/object:Gem::Version
|
265
|
-
version: 1.0.9
|
266
|
-
type: :runtime
|
267
|
-
prerelease: false
|
268
|
-
version_requirements: !ruby/object:Gem::Requirement
|
269
|
-
requirements:
|
270
|
-
- - ">="
|
271
|
-
- !ruby/object:Gem::Version
|
272
|
-
version: 1.0.9
|
273
245
|
- !ruby/object:Gem::Dependency
|
274
246
|
name: highline
|
275
247
|
requirement: !ruby/object:Gem::Requirement
|