Francesco Romani has posted comments on this change.
Change subject: faqemu: move hook logic out of vdsm
......................................................................
Patch Set 1: Code-Review-1
(2 comments)
I'm concerned about the proper way to get the vdsm root (what is usually, but not
necessarily, /usr/share/vdsm). -1 for visibility.
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')
I think this should be filled by make somehow.
Or maybe expose the vdsm root from hooking?
Line 31: import caps
Line 32: import hooking
Line 33: from vdsm.config import config
Line 34:
Line 32: import hooking
Line 33: from vdsm.config import config
Line 34:
Line 35:
Line 36: def fake_caps(c, target_arch):
a single-letter identifier is probably too terse :)
Line 37: c['kvmEnabled'] = 'True'
Line 38: cpu_info = caps.CpuInfo()
Line 39: if target_arch == caps.Architecture.X86_64:
Line 40: c['cpuModel'] = 'Intel(Fake) CPU'
--
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: 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