Revision a6e6fe48 snf-cyclades-app/synnefo/tools/add_unique_name_to_nics

b/snf-cyclades-app/synnefo/tools/add_unique_name_to_nics
29 29

  
30 30
from django.db import close_connection
31 31
from synnefo.db.models import Backend, pooled_rapi_client
32
from synnefo.management.common import get_backend
32
from synnefo.management.common import get_resource
33 33

  
34 34
import logging
35 35
logger = logging.getLogger("migrate_nics")
......
67 67
    options, args = parser.parse_args()
68 68

  
69 69
    if options.backend_id:
70
        backends = [get_backend(options.backend_id)]
70
        backends = [get_resource("backend", options.backend_id)]
71 71
    else:
72 72
        if Backend.objects.filter(offline=True).exists():
73 73
            msg = "Can not update intances. An 'offline' backend exists."

Also available in: Unified diff