Revision 5029ff36 snf-cyclades-app/synnefo/api/images.py
b/snf-cyclades-app/synnefo/api/images.py | ||
---|---|---|
105 | 105 |
d['status'] = 'DELETED' if image['deleted_at'] else 'ACTIVE' |
106 | 106 |
d['progress'] = 100 if image['status'] == 'available' else 0 |
107 | 107 |
if image['properties']: |
108 |
d['metadata'] = {'values': image['properties']}
|
|
108 |
d['metadata'] = image['properties']
|
|
109 | 109 |
return d |
110 | 110 |
|
111 | 111 |
|
... | ... | |
135 | 135 |
data = render_to_string('list_images.xml', |
136 | 136 |
dict(images=reply, detail=detail)) |
137 | 137 |
else: |
138 |
data = json.dumps(dict(images={'values': reply}))
|
|
138 |
data = json.dumps(dict(images=reply))
|
|
139 | 139 |
|
140 | 140 |
return HttpResponse(data, status=200) |
141 | 141 |
|
... | ... | |
210 | 210 |
with image_backend(request.user_uniq) as backend: |
211 | 211 |
image = backend.get_image(image_id) |
212 | 212 |
metadata = image['properties'] |
213 |
return util.render_metadata(request, metadata, use_values=True, status=200) |
|
213 |
return util.render_metadata(request, metadata, use_values=False, |
|
214 |
status=200) |
|
214 | 215 |
|
215 | 216 |
|
216 | 217 |
@api.api_method('POST', user_required=True, logger=log) |
Also available in: Unified diff