Hi,
I think we should add created_at and updated_at fields to our resource
objects.
With these fields, we can:
1. order the output according to the update_at and then created_at order
2. benefit our sync algorithm.
our dhcp agent and l3 agent have to sync resource with quantum server.
currently,
we just fetch all of these resources from quantum server. This is not
efficient.
with these fields, we can device more efficient sync algorithm and it is
important in large scale deployment.
3. nova has this one, it seems add created_at and updated_at is a good
practice.
class NovaBase(object):
"""Base class for Nova Models."""
__table_args__ = {'mysql_engine': 'InnoDB'}
__table_initialized__ = False
created_at = Column(DateTime, default=timeutils.utcnow)
updated_at = Column(DateTime, onupdate=timeutils.utcnow)
deleted_at = Column(DateTime)
deleted = Column(Boolean, default=False)
metadata = None
I cannot imagine the usage of deleted_at in our quantum project.
any Ideas?
Yong Sheng Gong
--
Mailing list: https://launchpad.net/~quantum-core
Post to : [email protected]
Unsubscribe : https://launchpad.net/~quantum-core
More help : https://help.launchpad.net/ListHelp