Revision 8283d6c1 snf-cyclades-app/synnefo/api/management/commands/server-show.py

b/snf-cyclades-app/synnefo/api/management/commands/server-show.py
34 34
from django.core.management.base import BaseCommand, CommandError
35 35
from synnefo.management.common import (format_bool, format_date,
36 36
                                       format_vm_state, get_vm,
37
                                       get_image, UUIDCache)
37
                                       get_image, UserCache)
38 38

  
39 39

  
40 40
class Command(BaseCommand):
......
61 61
            'id': server.id,
62 62
            'name': server.name,
63 63
            'owner_uuid': userid,
64
            'owner_name': UUIDCache().get_user(userid),
64
            'owner_name': UserCache().get_name(userid),
65 65
            'created': format_date(server.created),
66 66
            'updated': format_date(server.updated),
67 67
            'image': image,
......
69 69
            'flavor': flavor,
70 70
            'deleted': format_bool(server.deleted),
71 71
            'suspended': format_bool(server.suspended),
72
            'state': format_vm_state(server)
72
            'state': format_vm_state(server),
73 73
        }
74 74

  
75 75
        for key, val in sorted(kv.items()):

Also available in: Unified diff