Replace 'tenant' by 'project'

This patch replaces the occurence of 'tenant' by 'project'. There
are still some places 'tenant' have to be used. Will try remove them
when possible and necessary.

Change-Id: I37d8c2545c3086d44bb3d8bd88053fc02e00c947
This commit is contained in:
tengqm
2015-04-02 23:32:25 -04:00
parent b172e7ea1e
commit c794e7e9ed
44 changed files with 534 additions and 553 deletions

View File

@@ -102,14 +102,14 @@ class Event(object):
@classmethod
def load_all(cls, context, filters=None, limit=None, marker=None,
sort_keys=None, sort_dir=None, tenant_safe=True,
sort_keys=None, sort_dir=None, project_safe=True,
show_deleted=False):
'''Retrieve all events from database.'''
records = db_api.event_get_all(context, limit=limit, marker=marker,
sort_keys=sort_keys, sort_dir=sort_dir,
filters=filters,
tenant_safe=tenant_safe,
project_safe=project_safe,
show_deleted=show_deleted)
for record in records:
@@ -201,7 +201,7 @@ def info(context, entity, action, status=None, status_reason=None,
timestamp = timestamp or datetime.datetime.utcnow()
event = Event(timestamp, logging.INFO, entity,
action=action, status=status, status_reason=status_reason,
user=context.user_id, project=context.project_id)
user=context.user, project=context.project)
event.store(context)
LOG.info(_LI('%(name)s[%(id)s] %(action)s - %(status)s: %(reason)s') %
{'name': entity.name, 'id': entity.id, 'action': action,