Fixes the problem of tenant_id key error

Before sending a notification, Climate creates a payload
using tenant_id, which is no longer available after this
patch set: https://review.openstack.org/#/c/82192/

Change-Id: I380d7ce8088fe25ab603ad822c048f09c39c05d3
Closes-Bug: #1311806
This commit is contained in:
Cristian A Sanchez 2014-04-23 15:07:39 -03:00
parent 1d1ad49da0
commit 2d4c06a44a
2 changed files with 3 additions and 3 deletions

View File

@ -26,7 +26,7 @@ def format_lease_payload(lease):
return {
'lease_id': lease['id'],
'user_id': lease['user_id'],
'tenant_id': lease['tenant_id'],
'project_id': lease['project_id'],
'start_date': lease['start_date'],
'end_date': lease['end_date']
}

View File

@ -97,10 +97,10 @@ class ServiceTestCase(tests.TestCase):
self.lease_id = '11-22-33'
self.user_id = '123'
self.tenant_id = '555'
self.project_id = '555'
self.lease = {'id': self.lease_id,
'user_id': self.user_id,
'tenant_id': self.tenant_id,
'project_id': self.project_id,
'reservations': [{'id': '111',
'resource_id': '111',
'resource_type': 'virtual:instance',