td 0.15.8 → 0.15.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ChangeLog +5 -0
- data/Rakefile +1 -0
- data/lib/td/command/list.rb +1 -9
- data/lib/td/version.rb +1 -1
- data/td.gemspec +1 -1
- metadata +4 -5
- data/lib/td/command/acl.rb +0 -53
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f678ed9a6f000112a64bd9a86cd05d7d4bb0382e
|
4
|
+
data.tar.gz: ba6f79ddbf05bc67dccec2201c536eb4f508ff35
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6ee3352ff5b7d72a3573365e8b23d2331a9f50cf60499be207ec393098f30368dd2f35dd4717cf248fad959fc23debde14f0018657733f671b4b57c2d335a65f
|
7
|
+
data.tar.gz: 2ca8f66b7e4311be225f8fe8456a935a7db785331135878986e5de7e9b493198690b9cd01cf4d774e3a2e77cbe8fc4dd1d60a1b60237fd309bf259b49cc72eee
|
data/ChangeLog
CHANGED
data/Rakefile
CHANGED
data/lib/td/command/list.rb
CHANGED
@@ -137,7 +137,7 @@ module List
|
|
137
137
|
LIST = []
|
138
138
|
COMMAND = {}
|
139
139
|
GUESS = {}
|
140
|
-
HELP_EXCLUDE = [/^help/, /^account/, /^update/, /^user
|
140
|
+
HELP_EXCLUDE = [/^help/, /^account/, /^update/, /^user/]
|
141
141
|
USAGE_EXCLUDE = [/bulk_import:upload_part\z/, /bulk_import:delete_part\z/]
|
142
142
|
|
143
143
|
def self.add_list(name, args, description, examples = [], cmd_req_conn = true)
|
@@ -323,11 +323,6 @@ module List
|
|
323
323
|
add_list 'user:apikey:remove', %w[name apikey], 'Remove an API key from an user'
|
324
324
|
add_list 'user:password:change', %w[name], 'Change password for any user (must be an Administrator)'
|
325
325
|
|
326
|
-
add_list 'acl:list', %w[], 'Show list of access controls'
|
327
|
-
add_list 'acl:grant', %w[subject action scope], 'Grant an access control'
|
328
|
-
add_list 'acl:revoke', %w[subject action scope], 'Revoke an access control'
|
329
|
-
# TODO acl:test
|
330
|
-
|
331
326
|
add_list 'server:status', %w[], 'Show status of the Treasure Data server'
|
332
327
|
add_list 'server:endpoint', %w[api_endpoint], "Set the Treasure Data API server's endpoint (must be a valid URI)", ["server:endpoint 'https://api.treasuredata.com'"]
|
333
328
|
|
@@ -415,9 +410,6 @@ module List
|
|
415
410
|
add_alias 'user:apikey', 'user:apikey:list'
|
416
411
|
add_alias 'user:apikeys', 'user:apikey:list'
|
417
412
|
|
418
|
-
add_alias 'acl', 'acl:list'
|
419
|
-
add_alias 'acls', 'acl:list'
|
420
|
-
|
421
413
|
add_alias 'apikey', 'apikey:show'
|
422
414
|
add_alias 'server', 'server:status'
|
423
415
|
add_alias 'sample', 'sample:apache'
|
data/lib/td/version.rb
CHANGED
data/td.gemspec
CHANGED
@@ -21,7 +21,7 @@ Gem::Specification.new do |gem|
|
|
21
21
|
gem.add_dependency "yajl-ruby", "~> 1.1"
|
22
22
|
gem.add_dependency "hirb", ">= 0.4.5"
|
23
23
|
gem.add_dependency "parallel", "~> 1.8"
|
24
|
-
gem.add_dependency "td-client", ">= 1.0.
|
24
|
+
gem.add_dependency "td-client", ">= 1.0.6", "< 2"
|
25
25
|
gem.add_dependency "td-logger", ">= 0.3.21", "< 2"
|
26
26
|
gem.add_dependency "rubyzip", ">= 1.2.1"
|
27
27
|
gem.add_dependency "zip-zip", "~> 0.3"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: td
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.15.
|
4
|
+
version: 0.15.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Treasure Data, Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-04-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: msgpack
|
@@ -72,7 +72,7 @@ dependencies:
|
|
72
72
|
requirements:
|
73
73
|
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 1.0.
|
75
|
+
version: 1.0.6
|
76
76
|
- - "<"
|
77
77
|
- !ruby/object:Gem::Version
|
78
78
|
version: '2'
|
@@ -82,7 +82,7 @@ dependencies:
|
|
82
82
|
requirements:
|
83
83
|
- - ">="
|
84
84
|
- !ruby/object:Gem::Version
|
85
|
-
version: 1.0.
|
85
|
+
version: 1.0.6
|
86
86
|
- - "<"
|
87
87
|
- !ruby/object:Gem::Version
|
88
88
|
version: '2'
|
@@ -227,7 +227,6 @@ files:
|
|
227
227
|
- java/logging.properties
|
228
228
|
- lib/td.rb
|
229
229
|
- lib/td/command/account.rb
|
230
|
-
- lib/td/command/acl.rb
|
231
230
|
- lib/td/command/apikey.rb
|
232
231
|
- lib/td/command/bulk_import.rb
|
233
232
|
- lib/td/command/common.rb
|
data/lib/td/command/acl.rb
DELETED
@@ -1,53 +0,0 @@
|
|
1
|
-
|
2
|
-
module TreasureData
|
3
|
-
module Command
|
4
|
-
|
5
|
-
def acl_list(op)
|
6
|
-
op.cmd_parse
|
7
|
-
|
8
|
-
client = get_client
|
9
|
-
|
10
|
-
acl = client.access_controls
|
11
|
-
|
12
|
-
rows = []
|
13
|
-
acl.each {|ac|
|
14
|
-
rows << {:Subject => ac.subject, :Action => ac.action, :Scope => ac.scope, :"Grant option" => ac.grant_option}
|
15
|
-
}
|
16
|
-
|
17
|
-
$stdout.puts cmd_render_table(rows, :fields => [:Subject, :Action, :Scope, :"Grant option"])
|
18
|
-
|
19
|
-
if rows.empty?
|
20
|
-
$stderr.puts "There are no access controls."
|
21
|
-
$stderr.puts "Use '#{$prog} " + Config.cl_options_string + "acl:grant <subject> <action> <scope>' to grant permissions."
|
22
|
-
end
|
23
|
-
end
|
24
|
-
|
25
|
-
def acl_grant(op)
|
26
|
-
grant_option = true
|
27
|
-
|
28
|
-
op.on('--no-grant-option', '-N', 'Grant without grant option', TrueClass) {|b|
|
29
|
-
grant_option = !b
|
30
|
-
}
|
31
|
-
|
32
|
-
subject, action, scope = op.cmd_parse
|
33
|
-
|
34
|
-
client = get_client
|
35
|
-
|
36
|
-
client.grant_access_control(subject, action, scope, grant_option)
|
37
|
-
|
38
|
-
$stderr.puts "Access control [#{subject} #{action} #{scope}] is created #{grant_option ? 'with' : 'without'} grant option."
|
39
|
-
end
|
40
|
-
|
41
|
-
def acl_revoke(op)
|
42
|
-
subject, action, scope = op.cmd_parse
|
43
|
-
|
44
|
-
client = get_client
|
45
|
-
|
46
|
-
client.revoke_access_control(subject, action, scope)
|
47
|
-
|
48
|
-
$stderr.puts "Access control [#{subject} #{action} #{scope}] is removed."
|
49
|
-
end
|
50
|
-
|
51
|
-
# TODO acl_test
|
52
|
-
end
|
53
|
-
end
|