Revision e57893cd snf-cyclades-app/synnefo/api/management/commands/network-remove.py

b/snf-cyclades-app/synnefo/api/management/commands/network-remove.py
51 51
        self.stdout.write('Trying to remove network: %s\n' % str(network))
52 52

  
53 53
        if network.machines.exists():
54
            raise CommandError('Network is not empty. Can not delete')
54
            raise CommandError('Can not delete: Network has connected VMs.')
55
        if network.floating_ips.filter(deleted=False).exists():
56
            raise CommandError("Can not delete: Network has reserved floating"
57
                               " IP addresses.")
55 58

  
56 59
        network.action = 'DESTROY'
57 60
        network.save()

Also available in: Unified diff