Change in vdsm[master]: Move host stats dict creation from API.py to host module
fromani at redhat.com
fromani at redhat.com
Thu May 5 09:42:53 UTC 2016
Francesco Romani has posted comments on this change.
Change subject: Move host stats dict creation from API.py to host module
......................................................................
Patch Set 6:
(1 comment)
https://gerrit.ovirt.org/#/c/56874/6/lib/vdsm/host.py
File lib/vdsm/host.py:
Line 74:
Line 75: return host_UUID
Line 76:
Line 77:
Line 78: def getStats(irs, cif, haClient):
> I'm not talking of improving it, I'm saying that moving it here is not over
Moving the code out of API.py is a good change.
I also tend to believe it doesn't belong here, even though is obviously host related.
The steps are:
1 gather the data (efficiently, so not using the format Engine requires, perhaps)
2 format the data the way the schema/Engine requires
3 orchestrate the two steps above
I think it is OK/expected to do step #3 in API.py
the step 1 should be done in hoststats.py
the step 2 is where we disagree. I dont't think belongs here in host.py (surely it doesn't belong in API.py).
So maybe add a new module? maybe make host a subpackage?
so we can have
- lib/vdsm/host/
+- __init__.py (empty)
+- info.py (this module renamed)
+- stats.py (lib/vdsm/virt/hoststats.py renamed)
+- api.py (any better name? does formatting step #2 above)
and everything seems nice and clean (and easy to do, mostly git mv)
Line 79: """
Line 80: Retreive host internal statistics
Line 81: """
Line 82: hooks.before_get_stats()
--
To view, visit https://gerrit.ovirt.org/56874
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I626a673c429d486ac78b309c2f31cb58af8852b2
Gerrit-PatchSet: 6
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Irit Goihman <igoihman at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Polednik <mpolednik at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczewski at gmail.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>
Gerrit-HasComments: Yes
More information about the vdsm-patches
mailing list