From 2d4c06a44aa72b836a2c2e0058fd6dab7e9bf58e Mon Sep 17 00:00:00 2001 From: Cristian A Sanchez Date: Wed, 23 Apr 2014 15:07:39 -0300 Subject: [PATCH] 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 --- climate/notification/api.py | 2 +- climate/tests/manager/test_service.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/climate/notification/api.py b/climate/notification/api.py index 66602767..2684df57 100644 --- a/climate/notification/api.py +++ b/climate/notification/api.py @@ -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'] } diff --git a/climate/tests/manager/test_service.py b/climate/tests/manager/test_service.py index 96fca78c..ac8cfa4a 100644 --- a/climate/tests/manager/test_service.py +++ b/climate/tests/manager/test_service.py @@ -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',