radosgw-s3 0.4 → 0.5

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
  SHA1:
3
- metadata.gz: 103bcdb77d57ac4c1d660ba97bda904b2519ed37
4
- data.tar.gz: 7fa6c624c2e3d641a4c748e5ade3bc573800a333
3
+ metadata.gz: de2e6c6190b45b9b75aae4043eb248ebe80752aa
4
+ data.tar.gz: 5eaf652702ee6343ba519b099db3a6436442f9a9
5
5
  SHA512:
6
- metadata.gz: 7f670800ea35dd1ba27b4cee2556e71e96c03a2d4beed1b85a973c561bd9923dea04b5c70789140aab6b4a211717622d40642d63383c357fd19e60c77c11446f
7
- data.tar.gz: 1b3fa3b26b2c3e3833fe50192840d550ec741f8763e882edc31102e165ef45283e18e3ac3fa50ee44ce33271432d0c8fb3e32c4315bbf837f952e18fb4567b4e
6
+ metadata.gz: 20d3f333a2a7091f2246fbb4fbf9fe98d8252493d790040c898e02c6c9b1026b7ee12d9ad58ae4fb52d13497a7fb641183a68ba02c4af14f7a002bdbd59bff7a
7
+ data.tar.gz: 828fed5272e3946575c92c86958ad317c243a57468df73600b023edf1f9d365d7f270a7ead77287d8043390400d5dba405dfd7725611430e57fffd263cac0e60
data/lib/ceph/radosgw.rb CHANGED
@@ -37,11 +37,14 @@ module CEPH
37
37
  user_usage_json = ssh.exec!("sudo radosgw-admin user stats --uid='#{uid}'")
38
38
  end
39
39
 
40
-
40
+ if user_usage_json.include? "ERROR: can't read user header: (2) No such file or directory"
41
+ usage_hash = {"total_objects" => "0", "total_bytes" => "0", "last_update" => "#{Time.now}" }
42
+ else
41
43
  user_usage_hash = JSON.parse(user_usage_json)
42
44
  usage_hash = {"total_objects" => "#{user_usage_hash['stats']['total_entries']}", "total_bytes" => "#{user_usage_hash['stats']['total_bytes_rounded']}", "last_update" => "#{user_usage_hash['last_stats_update']}" }
43
45
  usage_hash
44
46
  end
47
+ end
45
48
 
46
49
  end
47
50
  end
data/lib/s3/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module S3
2
- VERSION = "0.4"
2
+ VERSION = "0.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: radosgw-s3
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.4'
4
+ version: '0.5'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas Alrin, Kishorekumar Neelamegam, Rajthilak, Kuba Kuźma