Change in vdsm[master]: virt: stats: simplify the getStatsInternal flow

2014-05-09 Thread fromani
Francesco Romani has abandoned this change.

Change subject: virt: stats: simplify the getStatsInternal flow
..


Abandoned

no longer useful

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

Gerrit-MessageType: abandon
Gerrit-Change-Id: I22650dc87170a3dbbd0e2552a33ae4209d773183
Gerrit-PatchSet: 5
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani 
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: virt: stats: simplify the getStatsInternal flow

2014-05-05 Thread oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.

Change subject: virt: stats: simplify the getStatsInternal flow
..


Patch Set 5:

Build Successful 

http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/8534/ : SUCCESS

http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit_el/7744/ : SUCCESS

http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit/8661/ : SUCCESS

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I22650dc87170a3dbbd0e2552a33ae4209d773183
Gerrit-PatchSet: 5
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani 
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: virt: stats: simplify the getStatsInternal flow

2014-04-28 Thread oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.

Change subject: virt: stats: simplify the getStatsInternal flow
..


Patch Set 4:

Build Failed 

http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/8346/ : SUCCESS

http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit_el/7555/ : SUCCESS

http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit/8466/ : FAILURE

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I22650dc87170a3dbbd0e2552a33ae4209d773183
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani 
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: virt: stats: simplify the getStatsInternal flow

2014-04-24 Thread oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.

Change subject: virt: stats: simplify the getStatsInternal flow
..


Patch Set 3:

Build Successful 

http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/8298/ : SUCCESS

http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit_el/7507/ : SUCCESS

http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit/8415/ : SUCCESS

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I22650dc87170a3dbbd0e2552a33ae4209d773183
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani 
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: virt: stats: simplify the getStatsInternal flow

2014-04-15 Thread oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.

Change subject: virt: stats: simplify the getStatsInternal flow
..


Patch Set 2:

Build Successful 

http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/8072/ : SUCCESS

http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit/8185/ : SUCCESS

http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit_el/7282/ : SUCCESS

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I22650dc87170a3dbbd0e2552a33ae4209d773183
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani 
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: virt: stats: simplify the getStatsInternal flow

2014-04-08 Thread oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.

Change subject: virt: stats: simplify the getStatsInternal flow
..


Patch Set 1:

Build Successful 

http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/7917/ : SUCCESS

http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit_el/7127/ : SUCCESS

http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/8029/ : SUCCESS

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I22650dc87170a3dbbd0e2552a33ae4209d773183
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani 
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: virt: stats: simplify the getStatsInternal flow

2014-04-08 Thread fromani
Francesco Romani has uploaded a new change for review.

Change subject: virt: stats: simplify the getStatsInternal flow
..

virt: stats: simplify the getStatsInternal flow

this patch simplifies the flow in getStatsInternal
to make room for future changes. No functional changes
intended.

Change-Id: I22650dc87170a3dbbd0e2552a33ae4209d773183
Signed-off-by: Francesco Romani 
---
M vdsm/virt/vm.py
1 file changed, 20 insertions(+), 21 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/53/26553/1

diff --git a/vdsm/virt/vm.py b/vdsm/virt/vm.py
index 7c424a6..922595e 100644
--- a/vdsm/virt/vm.py
+++ b/vdsm/virt/vm.py
@@ -2405,29 +2405,28 @@
 
 def _getStatsInternal(self):
 # used by API.Vm.getStats
-
-if self.lastStatus == vmstatus.DOWN:
-stats = {}
-self._addExitedVmStats(stats)
-return stats
-
 stats = {}
-self._addStaticVmStats(stats)
-self._addDynamicVmStats(stats)
-self._addVmStatusStats(stats)
+if self.lastStatus == vmstatus.DOWN:
+self._addExitedVmStats(stats)
+else:
+self._addStaticVmStats(stats)
+self._addDynamicVmStats(stats)
+self._addVmStatusStats(stats)
 
-try:
-stats.update(self.guestAgent.getGuestInfo())
-except Exception:
-return stats
-memUsage = 0
-realMemUsage = int(stats['memUsage'])
-if realMemUsage != 0:
-memUsage = (100 - float(realMemUsage) /
-int(self.conf['memSize']) * 100)
-stats['memUsage'] = utils.convertToStr(int(memUsage))
-stats['balloonInfo'] = self._getBalloonInfo()
-self._addMigrationVmStats(stats)
+try:
+stats.update(self.guestAgent.getGuestInfo())
+except Exception:
+return stats
+memUsage = 0
+realMemUsage = int(stats['memUsage'])
+if realMemUsage != 0:
+memUsage = (100 - float(realMemUsage) /
+int(self.conf['memSize']) * 100)
+stats['memUsage'] = utils.convertToStr(int(memUsage))
+
+stats['balloonInfo'] = self._getBalloonInfo()
+
+self._addMigrationVmStats(stats)
 return stats
 
 def _addExitedVmStats(self, stats):


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I22650dc87170a3dbbd0e2552a33ae4209d773183
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani 
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches