Revision a6e6fe48 snf-cyclades-app/synnefo/logic/management/commands/server-show.py

b/snf-cyclades-app/synnefo/logic/management/commands/server-show.py
1
# Copyright 2012 GRNET S.A. All rights reserved.
1
# Copyright 2012-2014 GRNET S.A. All rights reserved.
2 2
#
3 3
# Redistribution and use in source and binary forms, with or
4 4
# without modification, are permitted provided that the following
......
33 33

  
34 34
from django.core.management.base import CommandError
35 35
from snf_django.management.commands import SynnefoCommand
36
from synnefo.management.common import (format_vm_state, get_vm,
36
from synnefo.management.common import (format_vm_state, get_resource,
37 37
                                       get_image)
38 38
from snf_django.lib.astakos import UserCache
39 39
from synnefo.settings import (CYCLADES_SERVICE_TOKEN as ASTAKOS_TOKEN,
......
49 49
        if len(args) != 1:
50 50
            raise CommandError("Please provide a server ID")
51 51

  
52
        server = get_vm(args[0])
52
        server = get_resource("server", args[0])
53 53

  
54 54
        flavor = '%s (%s)' % (server.flavor.id, server.flavor.name)
55 55
        userid = server.userid

Also available in: Unified diff