]> 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>
Tue, 7 Apr 2020 13:51:23 +0000 (21:51 +0800)
commit96ed9c87c0ca336d13b3da81bc26484426e24f28
tree7db95571dff44e1dc7ceb694aa277a8065c856ad
parentea63b52b1705e80977ce1fe6d2dc276ea9477344
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>
qa/tasks/radosgw_admin.py