radosgw-s3 0.10 → 0.11
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/README.rdoc +3 -3
- data/lib/ceph/user.rb +14 -2
- data/lib/s3/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 664f2751fdcab0d53899f9aabc9c214543e9647f
|
4
|
+
data.tar.gz: a25ec9c2fd36f33037154eecec29fe14f1b1407e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 110baeaa04422a192a0f24ebb6563adb1c4f67436f2fe18602400e442461e1368861742bdb5579c990005e61ed0e3591d63f7f8976c2d491589ef6671edf1abf
|
7
|
+
data.tar.gz: 66e77d2ed11487d4a4c96922684aec201741406bb6a8b12a759842981fd0a8bde973762422e0c8c0e9f8aa73095d0a9e3d07705baac4839e0cee5843e111dfad
|
data/README.rdoc
CHANGED
@@ -18,7 +18,7 @@ radosgw-admin guide to {create radosgw user}[http://docs.ceph.com/docs/master/ra
|
|
18
18
|
=== Initialize the service
|
19
19
|
|
20
20
|
require "radosgw-s3"
|
21
|
-
service = CEPH::
|
21
|
+
service = CEPH::User.new(:ipaddress => "RADOSGW_HOST_IP",
|
22
22
|
:username => "RADOSGW_HOST_USERNAME",
|
23
23
|
:user_password => "RADOSGW_HOST_USER_PASSWORD",
|
24
24
|
)
|
@@ -26,7 +26,7 @@ radosgw-admin guide to {create radosgw user}[http://docs.ceph.com/docs/master/ra
|
|
26
26
|
|
27
27
|
=== create user
|
28
28
|
|
29
|
-
service.
|
29
|
+
service.create("UID_NAME", "DISPLAY_NAME")
|
30
30
|
|
31
31
|
It will give you the access_key and secret_key in hash format
|
32
32
|
|
@@ -34,7 +34,7 @@ It will give you the access_key and secret_key in hash format
|
|
34
34
|
|
35
35
|
=== Get user Usage
|
36
36
|
|
37
|
-
service.
|
37
|
+
service.usage("UID_NAME")
|
38
38
|
|
39
39
|
It will return something like
|
40
40
|
|
data/lib/ceph/user.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
module CEPH
|
2
2
|
class User < Radosgw
|
3
3
|
def execution(command)
|
4
|
-
radosgw_json =
|
4
|
+
radosgw_json =""
|
5
5
|
begin
|
6
6
|
Net::SSH.start( @ipaddress, @username, :password => @user_password, :non_interactive=>true ) do|ssh|
|
7
7
|
radosgw_json = ssh.exec!(command)
|
@@ -31,7 +31,7 @@ module CEPH
|
|
31
31
|
|
32
32
|
def create(uid, display_name)
|
33
33
|
ceph_user_json = ""
|
34
|
-
ceph_user_json = execution("sudo radosgw-admin user
|
34
|
+
ceph_user_json = execution("sudo radosgw-admin user create --uid='#{uid}' --display-name='#{display_name}'")
|
35
35
|
begin
|
36
36
|
ceph_user_hash = JSON.parse(ceph_user_json)
|
37
37
|
secret_hash = {"access_key" => "#{ceph_user_hash['keys'][0]['access_key']}", "secret_key" => "#{ceph_user_hash['keys'][0]['secret_key']}" }
|
@@ -62,5 +62,17 @@ module CEPH
|
|
62
62
|
end
|
63
63
|
end
|
64
64
|
|
65
|
+
def info(uid)
|
66
|
+
user_info_json=""
|
67
|
+
user_info_json = execution("sudo radosgw-admin user info --uid='#{uid}'")
|
68
|
+
begin
|
69
|
+
user_info_hash = JSON.parse(user_info_json)
|
70
|
+
info_hash={"secret_key" => "#{user_info_hash['keys'][0]['secret_key']}","access_key" => "#{user_info_hash['keys'][0]['access_key']}","user_id"=>"#{user_info_hash['user_id']}","User_name"=>"#{user_info_hash['display_name']}"}
|
71
|
+
info_hash
|
72
|
+
rescue JSON::ParserError => e
|
73
|
+
return user_info_json
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
65
77
|
end
|
66
78
|
end
|
data/lib/s3/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: radosgw-s3
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '0.
|
4
|
+
version: '0.11'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thomas Alrin, Kishorekumar Neelamegam, Rajthilak, Kuba Kuźma
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-03-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: proxies
|
@@ -165,7 +165,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
165
165
|
version: 1.3.6
|
166
166
|
requirements: []
|
167
167
|
rubyforge_project: s3
|
168
|
-
rubygems_version: 2.
|
168
|
+
rubygems_version: 2.5.1
|
169
169
|
signing_key:
|
170
170
|
specification_version: 4
|
171
171
|
summary: Library for accessing ceph objects and buckets
|