Comment 4 for bug 1315175

Revision history for this message
M L (leongmzreg) wrote :

I ran into this problem as well trying to set the metadata on a snapshot. I'm using python-cinderclient 1.0.8 on CentOS 6. The metadata does get set despite the error.

>>> print snapshot.id
51c007cc-404d-406a-96ec-95fbbab1de17
>>> cinder.volume_snapshots.set_metadata(snapshot = snapshot, metadata = {"owner": "bla"})
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.6/site-packages/cinderclient/v1/volume_snapshots.py", line 34, in __repr__
    return "<Snapshot: %s>" % self.id
  File "/usr/lib/python2.6/site-packages/cinderclient/base.py", line 268, in __getattr__
    self.get()
  File "/usr/lib/python2.6/site-packages/cinderclient/base.py", line 287, in get
    new = self.manager.get(self.id)
  File "/usr/lib/python2.6/site-packages/cinderclient/base.py", line 271, in __getattr__
    raise AttributeError(k)
AttributeError: id