Revision a6e6fe48 snf-cyclades-app/synnefo/logic/management/commands/reconcile-servers.py

b/snf-cyclades-app/synnefo/logic/management/commands/reconcile-servers.py
1
# Copyright 2011-2013 GRNET S.A. All rights reserved.
1
# Copyright 2011-2014 GRNET S.A. All rights reserved.
2 2
#
3 3
# Redistribution and use in source and binary forms, with or without
4 4
# modification, are permitted provided that the following conditions
......
39 39
import subprocess
40 40
from optparse import make_option
41 41
from django.core.management.base import BaseCommand
42
from synnefo.management.common import get_backend
42
from synnefo.management.common import get_resource
43 43
from synnefo.logic import reconciliation
44 44
from snf_django.management.utils import parse_bool
45 45

  
......
87 87
    def handle(self, **options):
88 88
        backend_id = options['backend-id']
89 89
        if backend_id:
90
            backends = [get_backend(backend_id)]
90
            backends = [get_resource("backend", backend_id)]
91 91
        else:
92 92
            backends = reconciliation.get_online_backends()
93 93

  

Also available in: Unified diff