components/openstack/neutron/files/evs/db/l3nat.py
changeset 3524 ad6a9e0880b9
parent 1944 56ac2df1785b
equal deleted inserted replaced
3521:958ebf9deed1 3524:ad6a9e0880b9
   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'])