summaryrefslogtreecommitdiffstats
path: root/nova/db/sqlalchemy/models.py
diff options
context:
space:
mode:
authorMichael Kerrin <michael.kerrin@hp.com>2013-03-29 10:19:31 +0000
committerMichael Kerrin <michael.kerrin@hp.com>2013-04-30 12:55:00 +0000
commit2cf1f39d9ea7a9436708c5458d42d4dd75717e16 (patch)
tree515b207787481341a750894b5c2ab40f5f626754 /nova/db/sqlalchemy/models.py
parent83f6fc8469255ba629ef1f9b8e357a5c87c6ed5a (diff)
downloadnova-2cf1f39d9ea7a9436708c5458d42d4dd75717e16.tar.gz
nova-2cf1f39d9ea7a9436708c5458d42d4dd75717e16.tar.xz
nova-2cf1f39d9ea7a9436708c5458d42d4dd75717e16.zip
Add the availability_zone to the volume.usage notifications
The volume.usage notifications are used to enable traffic based billing on volumes. The availability_zone of the instance is an important piece of information that can enable more specialized billing of customers. This makes the volume.usage events consistent with the volume.create.start/end snapshot.create.start/end, etc. emitted from cinder, which contain the availability_zone field. Change-Id: I9b6b03174cd03235d0e6cf01e34a6da13bd9bb70
Diffstat (limited to 'nova/db/sqlalchemy/models.py')
-rw-r--r--nova/db/sqlalchemy/models.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/nova/db/sqlalchemy/models.py b/nova/db/sqlalchemy/models.py
index 85a13c028..c4a22f4c5 100644
--- a/nova/db/sqlalchemy/models.py
+++ b/nova/db/sqlalchemy/models.py
@@ -893,6 +893,7 @@ class VolumeUsage(BASE, NovaBase):
instance_uuid = Column(String(36))
project_id = Column(String(36))
user_id = Column(String(36))
+ availability_zone = Column(String(255))
tot_last_refreshed = Column(DateTime)
tot_reads = Column(BigInteger, default=0)
tot_read_bytes = Column(BigInteger, default=0)