← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1416015] [NEW] Add 'user_id' to REST os-simple-tenant-usage output

 

Public bug reported:

Hi,

Request to add 'user_id' to os-simple-tenant-usage REST output. Purpose
is to give tenants a bit more auditing capability as to which user
created and terminated instances. If there is not a better way to
accomplish this, I believe the patch below will do the trick.

Thanks,
-Steve

--- nova/api/openstack/compute/contrib/simple_tenant_usage.py	2015-01-29 02:05:53.322814055 +0000
+++ nova/api/openstack/compute/contrib/simple_tenant_usage.py.patch	2015-01-29 02:02:04.136577506 +0000
@@ -164,6 +164,7 @@ class SimpleTenantUsageController(object
             info['vcpus'] = instance.vcpus
 
             info['tenant_id'] = instance.project_id
+            info['user_id'] = instance.user_id
 
             # NOTE(mriedem): We need to normalize the start/end times back
             # to timezone-naive so the response doesn't change after the

** Affects: nova
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1416015

Title:
  Add 'user_id' to REST os-simple-tenant-usage output

Status in OpenStack Compute (Nova):
  New

Bug description:
  Hi,

  Request to add 'user_id' to os-simple-tenant-usage REST output.
  Purpose is to give tenants a bit more auditing capability as to which
  user created and terminated instances. If there is not a better way to
  accomplish this, I believe the patch below will do the trick.

  Thanks,
  -Steve

  --- nova/api/openstack/compute/contrib/simple_tenant_usage.py	2015-01-29 02:05:53.322814055 +0000
  +++ nova/api/openstack/compute/contrib/simple_tenant_usage.py.patch	2015-01-29 02:02:04.136577506 +0000
  @@ -164,6 +164,7 @@ class SimpleTenantUsageController(object
               info['vcpus'] = instance.vcpus
   
               info['tenant_id'] = instance.project_id
  +            info['user_id'] = instance.user_id
   
               # NOTE(mriedem): We need to normalize the start/end times back
               # to timezone-naive so the response doesn't change after the

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1416015/+subscriptions


Follow ups

References