@db_api.retry_if_session_inactive()
def provisioning_complete(context, object_id, object_type, entity):
 log_dict = {'oid': object_id, 'entity': entity, 'otype': object_type}
 if context.session.is_active:
  raise RuntimeError(_LE('Must not be called in a transaction'))
 standard_attr_id = _get_standard_attr_id(context, object_id, object_type)
 if (not standard_attr_id):
  return
 if remove_provisioning_component(context, object_id, object_type, entity, standard_attr_id):
  LOG.debug('Provisioning for %(otype)s %(oid)s completed by entity %(entity)s.', log_dict)
 records = context.session.query(pb_model.ProvisioningBlock).filter_by(standard_attr_id=standard_attr_id).count()
 if (not records):
  LOG.debug('Provisioning complete for %(otype)s %(oid)s triggered by entity %(entity)s.', log_dict)
  registry.notify(object_type, PROVISIONING_COMPLETE, 'neutron.db.provisioning_blocks', context=context, object_id=object_id)

@ db_api . retry_if_session_inactive ( ) def provisioning_complete ( context , object_id , object_type , entity ) : log_dict = { 'oid' : object_id , 'entity' : entity , 'otype' : object_type } if context . session . is_active : raise RuntimeError ( _LE ( 'Must not be called in a transaction' ) ) standard_attr_id = _get_standard_attr_id ( context , object_id , object_type ) if ( not standard_attr_id ) : return if remove_provisioning_component ( context , object_id , object_type , entity , standard_attr_id ) : LOG . debug ( 'Provisioning for %(otype)s %(oid)s completed by entity %(entity)s.' , log_dict ) records = context . session . query ( pb_model . ProvisioningBlock ) . filter_by ( standard_attr_id = standard_attr_id ) . count ( ) if ( not records ) : LOG . debug ( 'Provisioning complete for %(otype)s %(oid)s triggered by entity %(entity)s.' , log_dict ) registry . notify ( object_type , PROVISIONING_COMPLETE , 'neutron.db.provisioning_blocks' , context = context , object_id = object_id )
mark that the provisioning for object_id has been completed by entity .