Revision 8a4a931d snf-cyclades-app/synnefo/logic/backend.py

b/snf-cyclades-app/synnefo/logic/backend.py
41 41
from synnefo.db.models import (Backend, VirtualMachine, Network,
42 42
                               BackendNetwork, BACKEND_STATUSES)
43 43
from synnefo.logic import utils, ippool
44
from synnefo.api.faults import ServiceUnavailable
44
from synnefo.api.faults import OverLimit
45 45
from synnefo.util.rapi import GanetiRapiClient
46 46

  
47 47
log = getLogger('synnefo.logic')
......
281 281
    try:
282 282
        address = pool.get_free_address()
283 283
    except ippool.IPPool.IPPoolExhausted:
284
        raise ServiceUnavailable('Network is full')
284
        raise OverLimit("Can not allocate IP for new machine."
285
                        " Public network is full.")
285 286
    pool.save()
286 287

  
287 288
    nic = {'ip': address, 'network': settings.GANETI_PUBLIC_NETWORK}

Also available in: Unified diff