Adam Litke has uploaded a new change for review.

Change subject: virt: Filter internal data for getVMList API
......................................................................

virt: Filter internal data for getVMList API

Filter out all keys that begin with '_' when returning detailed VM
information via the getVMList API.  This is needed by live merge which
will persist block job information in a '_blockJobs' key.  We don't want
that data to be made public

Change-Id: I39ac6935e5b95912eed42f16871566722316515a
Signed-off-by: Adam Litke <[email protected]>
---
M vdsm/virt/vm.py
1 file changed, 6 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/32/28532/1

diff --git a/vdsm/virt/vm.py b/vdsm/virt/vm.py
index 766f146..32369a4 100644
--- a/vdsm/virt/vm.py
+++ b/vdsm/virt/vm.py
@@ -2535,7 +2535,12 @@
     def status(self):
         # used by API.Global.getVMList
         self.conf['status'] = self.lastStatus
-        return self.conf
+        ret = deepcopy(self.conf)
+        # Filter out any internal keys
+        for k in ret.keys():
+            if k.startswith('_'):
+                del ret[k]
+        return ret
 
     def getStats(self):
         stats = self._getStatsInternal()


-- 
To view, visit http://gerrit.ovirt.org/28532
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I39ac6935e5b95912eed42f16871566722316515a
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Adam Litke <[email protected]>
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to