Dan Kenigsberg has posted comments on this change.
Change subject: faqemu: move hook logic out of vdsm
......................................................................
Patch Set 1:
(2 comments)
http://gerrit.ovirt.org/#/c/27705/1/vdsm/caps.py
File vdsm/caps.py:
Line 294: return AutoNumaBalancingStatus.UNKNOWN
Line 295:
Line 296:
Line 297: @utils.memoized
Line 298: def getEmulatedMachines(arch, capabilities=None):
A more picky man would say that these two name changes are not
material to
The only motivation of making this public, is the hook. If the hook is
rejected, I'd like to keep this function private. Hence it belongs to this commit.
Line 299: if capabilities is None:
Line 300: capabilities = _getCapsXMLStr()
Line 301: caps = minidom.parseString(capabilities)
Line 302:
http://gerrit.ovirt.org/#/c/27705/1/vdsm_hooks/faqemu/after_get_caps.py
File vdsm_hooks/faqemu/after_get_caps.py:
Line 26: # using vdsm internals in a hook is dangerous and frowned upon,
Line 27: # as internal APIs may change without notice.
Line 28: # However, faqemu is a bit different, as it is not expected to be ever used in
Line 29: # production.
Line 30: sys.path.append('/usr/share/vdsm')
even better would be if we could move it into the vdsm pkg, then no
such ha
But I do not WANT to make vdsm internal available to hooks. It's
dangerous, since if a hook is deployed and vdsm upgrades, there is no promise that the
internals would be maintained.
I explained in my comment why I think that the case of faqemu is different. And in any
case, I must add a requirement for the specific vdsm version.
If you think that "Special cases aren't special enough to break the rules",
we'll have to think about a different approach (I do not know which it would be).
Line 31: import caps
Line 32: import hooking
Line 33: from vdsm.config import config
Line 34:
--
To view, visit
http://gerrit.ovirt.org/27705
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I46d0079491f707b0abd3fbbe2d47f63697dac9c5
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani(a)redhat.com>
Gerrit-Reviewer: Vinzenz Feenstra <vfeenstr(a)redhat.com>
Gerrit-Reviewer: automation(a)ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes