Revision a3b8aaf6 snf-cyclades-app/synnefo/api/ports.py
b/snf-cyclades-app/synnefo/api/ports.py | ||
---|---|---|
108 | 108 |
net_id = api.utils.get_attribute(port_dict, "network_id") |
109 | 109 |
dev_id = api.utils.get_attribute(port_dict, "device_id") |
110 | 110 |
|
111 |
network = util.get_network(net_id, request.user_uniq) |
|
111 |
network = util.get_network(net_id, request.user_uniq, non_deleted=True) |
|
112 |
|
|
113 |
if network.public: |
|
114 |
raise api.faults.Forbidden('forbidden') |
|
115 |
|
|
116 |
if network.state != 'ACTIVE': |
|
117 |
raise api.faults.Conflict('Network build in process') |
|
112 | 118 |
|
113 | 119 |
vm = util.get_vm(dev_id, request.user_uniq) |
114 | 120 |
|
Also available in: Unified diff