From: yehia-beyh Date: Wed, 23 Jul 2014 18:39:38 +0000 (-0400) Subject: Add storageHost content to volume messages. X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=6767b7e5d52798a9177bb16d2a9726fc73c047dc;p=openstack-build%2Fcinder-build.git Add storageHost content to volume messages. Implements: Volume notification Storage Host entry in the payload Closes-Bug: 1333273 Change-Id: I370eaeaafd8fd4a8888f8250b49dffcbffb3a876 --- diff --git a/cinder/tests/test_volume.py b/cinder/tests/test_volume.py index 57851d4ec..c72178dc0 100644 --- a/cinder/tests/test_volume.py +++ b/cinder/tests/test_volume.py @@ -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', diff --git a/cinder/volume/utils.py b/cinder/volume/utils.py index cb4c40de5..f423a4164 100644 --- a/cinder/volume/utils.py +++ b/cinder/volume/utils.py @@ -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'],