From e105c53e67febefc0ae7e78baf53020d2b29c298 Mon Sep 17 00:00:00 2001 From: Josh Kearney Date: Mon, 14 Nov 2011 15:30:14 -0600 Subject: Log the URL to an image_ref and not just the ID. Change-Id: Iaae6b969d9ef3cd0f50dd3297d4b0bb51f61f5c9 --- nova/utils.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'nova/utils.py') diff --git a/nova/utils.py b/nova/utils.py index ad0d5725d..7723837c9 100644 --- a/nova/utils.py +++ b/nova/utils.py @@ -337,6 +337,9 @@ def current_audit_period(unit=None): def usage_from_instance(instance_ref, **kw): + image_ref_url = "%s/images/%s" % (generate_glance_url(), + instance_ref['image_ref']) + usage_info = dict( tenant_id=instance_ref['project_id'], user_id=instance_ref['user_id'], @@ -347,7 +350,7 @@ def usage_from_instance(instance_ref, **kw): created_at=str(instance_ref['created_at']), launched_at=str(instance_ref['launched_at']) \ if instance_ref['launched_at'] else '', - image_ref=instance_ref['image_ref'], + image_ref_url=image_ref_url, state=instance_ref['vm_state'], state_description=instance_ref['task_state'] \ if instance_ref['task_state'] else '', -- cgit