コード例 #1
0
ファイル: sfc_db.py プロジェクト: fzyitt/networking-sfc
 def delete_port_pair_group(self, context, id):
     try:
         with db_api.context_manager.writer.using(context):
             pg = self._get_port_pair_group(context, id)
             if pg.chain_group_associations:
                 raise ext_sfc.PortPairGroupInUse(id=id)
             context.session.delete(pg)
     except ext_sfc.PortPairGroupNotFound:
         LOG.info("Deleting a non-existing port pair group.")
コード例 #2
0
 def delete_port_pair_group(self, context, id):
     try:
         with context.session.begin(subtransactions=True):
             pg = self._get_port_pair_group(context, id)
             if pg.chain_group_associations:
                 raise ext_sfc.PortPairGroupInUse(id=id)
             context.session.delete(pg)
     except ext_sfc.PortPairGroupNotFound:
         LOG.info(_LI("Deleting a non-existing port pair group."))