Revision d30f29aa snf-cyclades-app/synnefo/logic/management/commands/network_reconcile.py

b/snf-cyclades-app/synnefo/logic/management/commands/network_reconcile.py
42 42
from django.core.management.base import BaseCommand, CommandError
43 43

  
44 44
from synnefo.db.models import Backend, Network, BackendNetwork
45
from synnefo.logic import reconciliation, backend
45
from synnefo.logic import reconciliation, backend, utils
46 46

  
47 47

  
48 48
class Command(BaseCommand):
......
163 163
                #XXX:Move this to backend
164 164
                for id in orphans:
165 165
                    out.write('Disconnecting and deleting network %d\n' % id)
166
                    network = '%s%s' % (settings.BACKEND_PREFIX_ID, str(id))
166
                    network = utils.id_to_network_name(id)
167 167
                    for group in client.GetGroups():
168 168
                        client.DisconnectNetwork(network, group)
169 169
                        client.DeleteNetwork(network)

Also available in: Unified diff