예제 #1
0
 def delete_servicechain_node(self, context, servicechain_node_id):
     with db_api.CONTEXT_WRITER.using(context):
         node_db = self._get_servicechain_node(context,
                                               servicechain_node_id)
         if node_db.specs:
             raise schain.ServiceChainNodeInUse(
                 node_id=servicechain_node_id)
         context.session.delete(node_db)
 def delete_servicechain_node(self, context, servicechain_node_id):
     with context.session.begin(subtransactions=True):
         node_db = self._get_servicechain_node(context,
                                               servicechain_node_id)
         if node_db.specs:
             raise schain.ServiceChainNodeInUse(
                 node_id=servicechain_node_id)
         context.session.delete(node_db)
예제 #3
0
 def delete_servicechain_node(self, context, servicechain_node_id):
     with db_api.context_manager.writer.using(context):
         node_db = self._get_servicechain_node(context,
                                               servicechain_node_id)
         if node_db.specs:
             raise schain.ServiceChainNodeInUse(
                                 node_id=servicechain_node_id)
         context.session.delete(node_db)