Revision 7421d45e snf-cyclades-app/synnefo/api/floating_ips.py

b/snf-cyclades-app/synnefo/api/floating_ips.py
157 157
        network = util.get_network(network_id, userid, for_update=True,
158 158
                                   non_deleted=True)
159 159
        if not network.floating_ip_pool:
160
            # TODO: Maybe 409 ??
161
            # Check that it is a floating IP pool
162
            raise faults.ItemNotFound("Floating IP pool %s does not exist." %
163
                                      network_id)
160
            msg = ("Can not allocate floating IP from network %s. Network is"
161
                   " not a floating IP pool." % network)
162
            raise faults.Conflict(msg)
164 163

  
165 164
        address = api.utils.get_attribute(floating_ip_dict,
166 165
                                          "floating_ip_address",

Also available in: Unified diff