Code review comment for lp:~rconradharris/glance/lp615675

Revision history for this message
Christopher MacGown (0x44) wrote :

Actually, hold that. In the below, any instance of chunk_dicts and chunk should be replaced by file, since they're the files that make up an image. Teller uses the term 'chunk' to mean an arbitrary sized piece of the read file buffer yielded to the requester.

82 + chunk_dicts = []
1683 + for chunk in image.image_chunks:
1684 + chunk_dict = dict(location=chunk.location, size=chunk.size)
1685 + chunk_dicts.append(chunk_dict)
1686 +
1687 + metadata_dicts = []
1688 + for metadatum in image.image_metadata:
1689 + metadatum_dict = dict(key=metadatum.key, value=metadatum.value)
1690 + metadata_dicts.append(metadatum_dict)
1691 +
1692 + image_dict = dict(id=image.id, name=image.name, state=image.state,
1693 + public=image.public, chunks=chunk_dicts,

review: Needs Fixing

« Back to merge proposal