Resolved issue with services table

Change-Id: Ib7176510885388217e8898d62576b7adb8008707
This commit is contained in:
Serg Melikyan 2013-06-18 10:04:55 +04:00
parent f7d275ad3b
commit 0158eae6e3
1 changed files with 10 additions and 0 deletions

View File

@ -227,6 +227,16 @@ def service_get(request, environment_id, service_id):
if instance:
service_data = instance[0]
if service_data['id'] == service_id:
reports = muranoclient(request).sessions.reports(
environment_id, Session.get(request, environment_id),
service_data['id'])
if reports:
last_operation = str(reports[-1].text)
else:
last_operation = ''
service_data['operation'] = last_operation
service_data['environment_id'] = environment_id
return bunch.bunchify(service_data)