bp model-timestamps

Currently Project, Domain, Role, User, Group models don’t have a timestamp. Although we can get a detailed auditing information via CADF audit event records, we may need a simple way to determine when these resources were created and when they were last modified.

We don’t want to make one specification that fixes all models. So, this specification will only implement timestamps for assignment models: Project, Domain, Role.

Because LDAP assignment backend will be deprecated in next cycle and be removed in the future, we only implement this in SQL backend.

According to the Reseller specification, the Domains and Projects will become one resource type, so this specification only implements timestamp for Project and Role.

Problem Description

  • For auditing, we may need a simple way to know how many projects were created or modified at a time interval.

  • For administration, we may need a simple way to know when a project was created or last modified.

Proposed Change

Actually, oslo.db has provided a TimestampMixin object for timestamp models. The only thing we need to do is to make Project, Role inherit from TimestampMixin and then add a database migration script.



Security Impact


Notifications Impact


Other End User Impact


Performance Impact


Other Deployer Impact


Developer Impact




Primary assignee:

w-wanghong (wanghong <>)

Work Items

  • Update Project, Role model to inherit TimestampMixin

  • Ensure timestamps are filtered before data is serialized to JSON

  • Write a database migration script

  • Add tests


oslo.db, but it is already a dependency.

Documentation Impact

Update the Projects and Roles sections of documentation.