X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=ceph%2Fqa%2Ftasks%2Fradosgw_admin.py;h=81906bea0a2b7d73f20a36ba0f1a0bb381ed7992;hb=92f5a8d42d07f9929ae4fa7e01342fe8d96808a8;hp=8686f7ad21fc33e79e86baea128fffecca0cf5bd;hpb=a0324939f9d0e1905d5df8f57442f09dc70af83d;p=ceph.git diff --git a/ceph/qa/tasks/radosgw_admin.py b/ceph/qa/tasks/radosgw_admin.py index 8686f7ad2..81906bea0 100644 --- a/ceph/qa/tasks/radosgw_admin.py +++ b/ceph/qa/tasks/radosgw_admin.py @@ -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,