From 5c3653372871d4462fde9ead41931c7a3c1cbc6b Mon Sep 17 00:00:00 2001 From: Jason Dillaman Date: Mon, 22 Jul 2019 11:04:53 -0400 Subject: [PATCH] pybind/mgr: rbd tasks now provide a dict to the progress events This dict will include an origin key fixed to 'rbd_support' as well as pool and image references. Signed-off-by: Jason Dillaman (cherry picked from commit e87aff5a90e115cbe7108e0dc89f60092fbe7d64) --- src/pybind/mgr/rbd_support/module.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/pybind/mgr/rbd_support/module.py b/src/pybind/mgr/rbd_support/module.py index 15c0e14ff05c3..a95377ff82d4d 100644 --- a/src/pybind/mgr/rbd_support/module.py +++ b/src/pybind/mgr/rbd_support/module.py @@ -935,9 +935,11 @@ class TaskHandler: def update_progress(self, task, progress): self.log.debug("update_progress: task={}, progress={}".format(str(task), progress)) try: + refs = {"origin": "rbd_support"} + refs.update(task.refs) + self.module.remote("progress", "update", task.task_id, - task.message, progress, - ["rbd_support"]) + task.message, progress, refs) except ImportError: # progress module is disabled pass -- 2.39.5