]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
qa/tasks/radosgw_admin.py: coerce key.name and key.acl to str
authorKefu Chai <kchai@redhat.com>
Mon, 6 Apr 2020 16:51:12 +0000 (00:51 +0800)
committerKefu Chai <kchai@redhat.com>
Wed, 3 Jun 2020 11:56:59 +0000 (19:56 +0800)
commit2df11aa62593c848168c0531dc947faa3c1edb11
treeb8dc2c0985e00bd17026747cb9f643d5e6bdeffa
parent3478b149ca18cc920a7fee44e5647c844a9b1dba
qa/tasks/radosgw_admin.py: coerce key.name and key.acl to str

if `key.name` is not set, boto fills it with md5, in that case, it comes
from `base64.b64encode()`. so we need to make sure it's str before
passing it to shell.

the same applies to `key.get_xml_acl()`, as its return value comes
directly from something like
```
        response = self.connection.make_request('GET', self.name, key_name,
                                                query_args=query_args,
                                                headers=headers)
        body = response.read()
        # ...
        return body
```

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 96ed9c87c0ca336d13b3da81bc26484426e24f28)
qa/tasks/radosgw_admin.py