equal
deleted
inserted
replaced
252 some ports for L3 are not intended to be deleted directly via a |
252 some ports for L3 are not intended to be deleted directly via a |
253 DELETE to /ports, but rather via other API calls that perform the |
253 DELETE to /ports, but rather via other API calls that perform the |
254 proper deletion checks. |
254 proper deletion checks. |
255 """ |
255 """ |
256 port = self.get_port(context, port_id) |
256 port = self.get_port(context, port_id) |
|
257 if not port: |
|
258 return |
257 if port['device_owner'] in [DEVICE_OWNER_ROUTER_INTF, |
259 if port['device_owner'] in [DEVICE_OWNER_ROUTER_INTF, |
258 DEVICE_OWNER_ROUTER_GW, |
260 DEVICE_OWNER_ROUTER_GW, |
259 DEVICE_OWNER_FLOATINGIP]: |
261 DEVICE_OWNER_FLOATINGIP]: |
260 raise l3.L3PortInUse(port_id=port_id, |
262 raise l3.L3PortInUse(port_id=port_id, |
261 device_owner=port['device_owner']) |
263 device_owner=port['device_owner']) |