]> git.proxmox.com Git - ceph.git/blobdiff - ceph/qa/tasks/radosgw_admin.py
import new upstream nautilus stable release 14.2.8
[ceph.git] / ceph / qa / tasks / radosgw_admin.py
index 8686f7ad21fc33e79e86baea128fffecca0cf5bd..81906bea0a2b7d73f20a36ba0f1a0bb381ed7992 100644 (file)
@@ -16,7 +16,6 @@ import logging
 import time
 import datetime
 import Queue
-import bunch
 
 import sys
 
@@ -207,7 +206,7 @@ class requestlog_queue():
            pass
        elif response.status < 200 or response.status >= 400:
            error = True
-        self.q.put(bunch.Bunch({'t': now, 'o': request, 'i': response, 'e': error}))
+        self.q.put({'t': now, 'o': request, 'i': response, 'e': error})
     def clear(self):
         with self.q.mutex:
             self.q.queue.clear()
@@ -215,16 +214,16 @@ class requestlog_queue():
         while not self.q.empty():
             j = self.q.get()
            bytes_out = 0
-            if 'Content-Length' in j.o.headers:
-               bytes_out = int(j.o.headers['Content-Length'])
+            if 'Content-Length' in j['o'].headers:
+               bytes_out = int(j['o'].headers['Content-Length'])
             bytes_in = 0
-            if 'content-length' in j.i.msg.dict:
-               bytes_in = int(j.i.msg.dict['content-length'])
+            if 'content-length' in j['i'].msg.dict:
+               bytes_in = int(j['i'].msg.dict['content-length'])
             log.info('RL: %s %s %s bytes_out=%d bytes_in=%d failed=%r'
-               % (cat, bucket, user, bytes_out, bytes_in, j.e))
+               % (cat, bucket, user, bytes_out, bytes_in, j['e']))
            if add_entry == None:
                add_entry = self.adder
-           add_entry(cat, bucket, user, bytes_out, bytes_in, j.e)
+           add_entry(cat, bucket, user, bytes_out, bytes_in, j['e'])
 
 def create_presigned_url(conn, method, bucket_name, key_name, expiration):
     return conn.generate_url(expires_in=expiration,