Revision a6e6fe48 snf-cyclades-app/synnefo/logic/management/commands/server-list.py
b/snf-cyclades-app/synnefo/logic/management/commands/server-list.py | ||
---|---|---|
1 |
# Copyright 2012-2013 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 |
... | ... | |
36 | 36 |
|
37 | 37 |
from snf_django.management.commands import ListCommand |
38 | 38 |
from synnefo.db.models import VirtualMachine |
39 |
from synnefo.management.common import get_backend
|
|
39 |
from synnefo.management.common import get_resource
|
|
40 | 40 |
from synnefo.api.util import get_image |
41 | 41 |
from synnefo.settings import (CYCLADES_SERVICE_TOKEN as ASTAKOS_TOKEN, |
42 | 42 |
ASTAKOS_AUTH_URL) |
... | ... | |
120 | 120 |
self.filters["suspended"] = True |
121 | 121 |
|
122 | 122 |
if options["backend_id"]: |
123 |
backend = get_backend(options["backend_id"])
|
|
123 |
backend = get_resource("backend", options["backend_id"])
|
|
124 | 124 |
self.filters["backend"] = backend.id |
125 | 125 |
|
126 | 126 |
if options["build"]: |
Also available in: Unified diff