Francesco Romani has posted comments on this change.
Change subject: caps: Collect numa information
......................................................................
Patch Set 7:
(2 comments)
I think we can improve the code even more by get rid of some function arguments, if -as
code suggests- they are used only for testing.
http://gerrit.ovirt.org/#/c/23703/7/vdsm/caps.py
File vdsm/caps.py:
Line 164: return topology
Line 165:
Line 166:
Line 167: @utils.memoized
Line 168: def _getNumaTopology(capabilities=None):
I think you can get rid of this argument by using more monkeypatch, by replacing
_getCapsXMLStr() in the tests.
Line 169: if capabilities is None:
Line 170: capabilities = _getCapsXMLStr()
Line 171: caps = minidom.parseString(capabilities)
Line 172: host = caps.getElementsByTagName('host')[0]
Line 185: return cellsInfo
Line 186:
Line 187:
Line 188: @utils.memoized
Line 189: def _getMemoryStatsByNumaCell(cell, flags=0):
and get rid of the flags argument here (seems unused both here and in the tests).
Probably this one-line method can be dropped as well. I'm ok with keeping it if this
helps testing, though.
Line 190: return libvirtconnection.get().getMemoryStats(int(cell), flags)
Line 191:
Line 192:
Line 193: @utils.memoized
--
To view, visit
http://gerrit.ovirt.org/23703
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I63eeb697ab986c3b9cad0dc44f41924f329e52cd
Gerrit-PatchSet: 7
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Xiaolei Shi <xiao-lei.shi(a)hp.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani(a)redhat.com>
Gerrit-Reviewer: Gustavo Frederico Temple Pedrosa <gustavo.pedrosa(a)eldorado.org.br>
Gerrit-Reviewer: Leonardo Bianconi <leonardo.bianconi(a)eldorado.org.br>
Gerrit-Reviewer: Martin Sivák <msivak(a)redhat.com>
Gerrit-Reviewer: Michal Skrivanek <michal.skrivanek(a)redhat.com>
Gerrit-Reviewer: Vitor de Lima <vitor.lima(a)eldorado.org.br>
Gerrit-Reviewer: Xiaolei Shi <xiao-lei.shi(a)hp.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei(a)redhat.com>
Gerrit-Reviewer: Yeela Kaplan <ykaplan(a)redhat.com>
Gerrit-Reviewer: automation(a)ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes