Revision 6176e251

b/snf-cyclades-app/synnefo/logic/backend.py
503 503
                 network.id, network.mac_prefix, network.link)
504 504
        network.deleted = True
505 505
        network.state = "DELETED"
506
        # Undrain the network, otherwise the network state will remain
507
        # as 'SNF:DRAINED'
508
        network.drained = False
506 509
        if network.mac_prefix:
507 510
            if network.FLAVORS[network.flavor]["mac_prefix"] == "pool":
508 511
                release_resource(res_type="mac_prefix",
b/snf-cyclades-app/synnefo/logic/networks.py
147 147
    network.action = "DESTROY"
148 148
    # Mark network as drained to prevent automatic allocation of
149 149
    # public/floating IPs while the network is being deleted
150
    network.drained = True
150
    if network.public:
151
        network.drained = True
151 152
    network.save()
152 153

  
153 154
    # Delete network to all backends that exists

Also available in: Unified diff