Revision 76a13815 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.webproject.management.util import format_bool, format_date |
36 | 36 |
from synnefo.management.common import (format_vm_state, get_vm, |
37 |
get_image, UserCache) |
|
37 |
get_image) |
|
38 |
from synnefo.lib.astakos import UserCache |
|
39 |
from synnefo.settings import (CYCLADES_ASTAKOS_SERVICE_TOKEN as ASTAKOS_TOKEN, |
|
40 |
ASTAKOS_URL) |
|
38 | 41 |
|
39 | 42 |
|
40 | 43 |
class Command(BaseCommand): |
... | ... | |
61 | 64 |
'id': server.id, |
62 | 65 |
'name': server.name, |
63 | 66 |
'owner_uuid': userid, |
64 |
'owner_name': UserCache().get_name(userid), |
|
67 |
'owner_name': UserCache(ASTAKOS_URL, ASTAKOS_TOKEN).get_name(userid),
|
|
65 | 68 |
'created': format_date(server.created), |
66 | 69 |
'updated': format_date(server.updated), |
67 | 70 |
'image': image, |
Also available in: Unified diff