Change in vdsm[master]: numa: move numa related functionality to sitelib
fromani at redhat.com
fromani at redhat.com
Mon Feb 29 16:52:56 UTC 2016
Francesco Romani has posted comments on this change.
Change subject: numa: move numa related functionality to sitelib
......................................................................
Patch Set 7: Code-Review-1
(2 comments)
looks fine, but we should take some (very cheap) preventive action about a nasty bug we have hidden in libvirtconnection.py
-1 for visibility only, it will be +2 once this is done
https://gerrit.ovirt.org/#/c/53286/7/lib/vdsm/numa.py
File lib/vdsm/numa.py:
Line 27: from . import libvirtconnection
Line 28:
Line 29:
Line 30: def _get_libvirt_caps():
Line 31: return libvirtconnection.get().getCapabilities()
we have a bug lurking in libvirtconnection.py, and I don't really like this style anyway, so let's use a few more vertical space. Please always use
conn = libvirtconnection.get()
return conn.getCapabilities()
here and in the rest of this module
Line 32:
Line 33:
Line 34: @utils.memoized
Line 35: def topology(capabilities=None):
Line 56: :param cell: the index of numa node
Line 57: :type cell: int
Line 58: :return: dict like {'total': '49141', 'free': '46783'}
Line 59: """
Line 60: meminfo = libvirtconnection.get().getMemoryStats(index, 0)
see comment in line 31
Line 61: meminfo['total'] = str(meminfo['total'] / 1024)
Line 62: meminfo['free'] = str(meminfo['free'] / 1024)
Line 63: return meminfo
Line 64:
--
To view, visit https://gerrit.ovirt.org/53286
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I2dffad8663ca50a67f117b1c74d4459e667d9f43
Gerrit-PatchSet: 7
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Polednik <mpolednik at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>
Gerrit-HasComments: Yes
More information about the vdsm-patches
mailing list