Revision f66d8b04 snf-cyclades-app/synnefo/api/management/commands/server-list.py
b/snf-cyclades-app/synnefo/api/management/commands/server-list.py | ||
---|---|---|
37 | 37 |
|
38 | 38 |
from synnefo.api.util import get_image |
39 | 39 |
from synnefo.db.models import VirtualMachine, Backend |
40 |
from ._common import format_vm_state |
|
40 | 41 |
|
41 | 42 |
|
42 | 43 |
class Command(BaseCommand): |
... | ... | |
101 | 102 |
image = cache.get_image(server.imageid, server.userid)['name'] |
102 | 103 |
except: |
103 | 104 |
image = server.imageid |
104 |
fields = (id, name, server.userid, flavor, image, server.operstate, |
|
105 |
|
|
106 |
state = format_vm_state(server) |
|
107 |
fields = (id, name, server.userid, flavor, image, state, |
|
105 | 108 |
str(server.backend)) |
106 | 109 |
|
107 | 110 |
if options['csv']: |
Also available in: Unified diff