def _get_port(self, context, id):
     core_plugin = directory.get_plugin()
     try:
         return core_plugin.get_port(context, id)
     except n_exc.PortNotFound:
         raise sfc_ext.PortPairPortNotFound(id=id)
示例#2
0
 def _get_port(self, context, id):
     try:
         return self._get_by_id(context, models_v2.Port, id)
     except exc.NoResultFound:
         raise ext_sfc.PortPairPortNotFound(id=id)