From a993b2b969bad0785aad02dc2a6f04ac0c675f8d Mon Sep 17 00:00:00 2001 From: Ollie Leahy Date: Thu, 21 Mar 2013 13:16:05 +0000 Subject: Add tenant/ user id to volume usage notifications Volume usage notifications are generated to enable traffic based billing on volumes. Include tenant id and user id to make these notifications more useful to billing systems. Fixes bug # 1158292 Change-Id: Ic71c10f0fc5d9e8c5a0e2f538de072e7ccca20ee --- nova/db/sqlalchemy/models.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'nova/db/sqlalchemy/models.py') diff --git a/nova/db/sqlalchemy/models.py b/nova/db/sqlalchemy/models.py index ce5f84578..016563c37 100644 --- a/nova/db/sqlalchemy/models.py +++ b/nova/db/sqlalchemy/models.py @@ -888,7 +888,9 @@ class VolumeUsage(BASE, NovaBase): __tablename__ = 'volume_usage_cache' id = Column(Integer, primary_key=True, nullable=False) volume_id = Column(String(36), nullable=False) - instance_id = Column(Integer) + instance_uuid = Column(String(36)) + project_id = Column(String(36)) + user_id = Column(String(36)) tot_last_refreshed = Column(DateTime) tot_reads = Column(BigInteger, default=0) tot_read_bytes = Column(BigInteger, default=0) -- cgit