summaryrefslogtreecommitdiffstats
path: root/nova/tests/conductor
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/tests/conductor
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/tests/conductor')
-rw-r--r--nova/tests/conductor/test_conductor.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/nova/tests/conductor/test_conductor.py b/nova/tests/conductor/test_conductor.py
index 1c675ec61..f4c6dde61 100644
--- a/nova/tests/conductor/test_conductor.py
+++ b/nova/tests/conductor/test_conductor.py
@@ -399,13 +399,16 @@ class _BaseTestCase(object):
def test_vol_usage_update(self):
self.mox.StubOutWithMock(db, 'vol_usage_update')
db.vol_usage_update(self.context, 'fake-vol', 'rd-req', 'rd-bytes',
- 'wr-req', 'wr-bytes', 'fake-id', 'fake-refr',
+ 'wr-req', 'wr-bytes', 'fake-id',
+ 'fake-project_id', 'fake-user_id', 'fake-refr',
'fake-bool')
self.mox.ReplayAll()
self.conductor.vol_usage_update(self.context, 'fake-vol', 'rd-req',
'rd-bytes', 'wr-req', 'wr-bytes',
- {'uuid': 'fake-id'}, 'fake-refr',
- 'fake-bool')
+ {'uuid': 'fake-id',
+ 'project_id': 'fake-project_id',
+ 'user_id': 'fake-user_id'},
+ 'fake-refr', 'fake-bool')
def test_ping(self):
result = self.conductor.ping(self.context, 'foo')