Revision 3f18f035 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 |
msg = ("Can not allocate floating IP from network %s. Network is" |
|
161 |
" not a floating IP pool." % network) |
|
162 |
raise faults.Conflict(msg) |
|
160 |
msg = ("Can not allocate floating IP. Network %s is" |
|
161 |
" not a floating IP pool.") |
|
162 |
raise faults.Conflict(msg % network.id) |
|
163 |
if network.action == "DESTROY": |
|
164 |
msg = "Can not allocate floating IP. Network %s is being deleted." |
|
165 |
raise faults.Conflict(msg % network.id) |
|
163 | 166 |
|
164 | 167 |
address = api.utils.get_attribute(floating_ip_dict, |
165 | 168 |
"floating_ip_address", |
Also available in: Unified diff