]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Add storageHost content to volume messages.
authoryehia-beyh <yehia.beyh@hp.com>
Wed, 23 Jul 2014 18:39:38 +0000 (14:39 -0400)
committeryehia-beyh <yehia.beyh@hp.com>
Thu, 24 Jul 2014 21:14:14 +0000 (21:14 +0000)
Implements: Volume notification Storage Host entry in the payload

Closes-Bug: 1333273
Change-Id: I370eaeaafd8fd4a8888f8250b49dffcbffb3a876

cinder/tests/test_volume.py
cinder/volume/utils.py

index 57851d4ecd1b8e758c523dfb78a7e2c15e4cd6f7..c72178dc0fd65c2e1794839ae57c81f871f3a311 100644 (file)
@@ -343,6 +343,7 @@ class VolumeTestCase(BaseVolumeTestCase):
         self.assertEqual(msg['event_type'], 'volume.create.start')
         expected = {
             'status': 'creating',
+            'host': socket.gethostname(),
             'display_name': 'test_volume',
             'availability_zone': 'nova',
             'tenant_id': 'fake',
index cb4c40de5e11527995f51df2ceb465afd3644f76..f423a4164d8f05c05870538bca1ef023d7a0251d 100644 (file)
@@ -41,6 +41,7 @@ def null_safe_str(s):
 
 def _usage_from_volume(context, volume_ref, **kw):
     usage_info = dict(tenant_id=volume_ref['project_id'],
+                      host=volume_ref['host'],
                       user_id=volume_ref['user_id'],
                       instance_uuid=volume_ref['instance_uuid'],
                       availability_zone=volume_ref['availability_zone'],