From 14132a2c06bc6b6431f5be90cecf303132d94103 Mon Sep 17 00:00:00 2001 From: Xiaohua Zhang Date: Tue, 9 Apr 2019 10:30:44 +0000 Subject: Fix bugs for infra_workload APIs Change-Id: Ieda8b2f7f68911bc348613cf7b18b40ea800b1e2 Issue-ID: MULTICLOUD-541 Signed-off-by: Xiaohua Zhang --- share/starlingx_base/registration/registration.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'share/starlingx_base/registration/registration.py') diff --git a/share/starlingx_base/registration/registration.py b/share/starlingx_base/registration/registration.py index 507f0fbf..cf0281f7 100644 --- a/share/starlingx_base/registration/registration.py +++ b/share/starlingx_base/registration/registration.py @@ -58,7 +58,7 @@ class APIv0Registry(newton_registration.Registry): backlog_item = { "id": vimid, "worker": worker_self.azcap_audit, - "payload": (worker_self, vimid, specified_project_idorname), + "payload": (vimid, specified_project_idorname), "repeat": 10*1000000, # repeat every 10 seconds } gAZCapAuditThread.add(backlog_item) @@ -88,6 +88,9 @@ class APIv1Registry(newton_registration.Registry): % (cloud_owner, cloud_region_id)) try: + # Get the specified tenant id + specified_project_idorname = request.META.get("Project", None) + vimid = extsys.encode_vim_id(cloud_owner, cloud_region_id) # vim registration will trigger the start the audit of AZ capacity @@ -98,7 +101,7 @@ class APIv1Registry(newton_registration.Registry): backlog_item = { "id": vimid, "worker": worker_self.azcap_audit, - "payload": (worker_self, vimid), + "payload": (vimid, specified_project_idorname), "repeat": 5 * 1000000, # repeat every 5 seconds } gAZCapAuditThread.add(backlog_item) -- cgit 1.2.3-korg