Revision c4b9ea4c snf-cyclades-app/synnefo/api/management/commands/server-list.py
b/snf-cyclades-app/synnefo/api/management/commands/server-list.py | ||
---|---|---|
124 | 124 |
for x in self.fields] |
125 | 125 |
|
126 | 126 |
def handle_db_objects(self, rows, *args, **kwargs): |
127 |
icache = ImageCache() |
|
128 |
for vm in rows: |
|
129 |
vm.image = icache.get_image(vm.imageid, vm.userid) |
|
127 |
if "image.name" in self.fields: |
|
128 |
icache = ImageCache() |
|
129 |
for vm in rows: |
|
130 |
vm.image = icache.get_image(vm.imageid, vm.userid) |
|
130 | 131 |
|
131 | 132 |
|
132 | 133 |
class ImageCache(object): |
Also available in: Unified diff