summaryrefslogtreecommitdiffstats
path: root/nova/db/sqlalchemy/models.py
diff options
context:
space:
mode:
authorOllie Leahy <oliver.leahy@hp.com>2013-03-21 13:16:05 +0000
committerOllie Leahy <oliver.leahy@hp.com>2013-04-09 18:11:57 +0000
commita993b2b969bad0785aad02dc2a6f04ac0c675f8d (patch)
treefb475e4af66ca378ba32a600402b31198d5aa0fd /nova/db/sqlalchemy/models.py
parent86f303f511ac2570ad630a393eda692e58370113 (diff)
downloadnova-a993b2b969bad0785aad02dc2a6f04ac0c675f8d.tar.gz
nova-a993b2b969bad0785aad02dc2a6f04ac0c675f8d.tar.xz
nova-a993b2b969bad0785aad02dc2a6f04ac0c675f8d.zip
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
Diffstat (limited to 'nova/db/sqlalchemy/models.py')
-rw-r--r--nova/db/sqlalchemy/models.py4
1 files changed, 3 insertions, 1 deletions
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)