object_storage.get_object doesn't retrieve the contents

Bug #1747580 reported by TAKAHASHI Yuto
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack SDK
New
Undecided
Unassigned

Bug Description

Both of `object_store.get_object` and `object_store.get_object_metadata` return only the metadata of objects.

Assume the pre-condition:

```
$ openstack object list test-container
+-------------+
| Name |
+-------------+
| sample.json |
+-------------+
```

Execute the script:

```
#!/usr/bin/env python
# -*- coding: utf-8 -*-

from openstack import connection

if __name__ == "__main__":
    conn = connection.from_config("my-cloud")
    res1 = conn.object_store.get_object(
            obj="sample.json",
            container="test-container"
    )
    res2 = conn.object_store.get_object_metadata(
            obj="sample.json",
            container="test-container"
    )
    print(res1)
    print(res2)
    print(res1 == res2)
```

Then the result is:

```
$ ./main.py
openstack.object_store.v1.obj.Object(content-type=application/json, content-length=43, etag=80ab0a2947eed0f35cf187281a2c50b5, accept-ranges=bytes, container=test-container, x-timestamp=1517899240.42680, last-modified=Tue, 06 Feb 2018 06:40:41 GMT, id=sample.json)
openstack.object_store.v1.obj.Object(content-type=application/json, content-length=43, etag=80ab0a2947eed0f35cf187281a2c50b5, accept-ranges=bytes, container=test-container, x-timestamp=1517899240.42680, last-modified=Tue, 06 Feb 2018 06:40:41 GMT, id=sample.json)
True
```

It shows that `get_object` and `get_object_metadata` return the same results.

Tags: objectstore
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.