Change in vdsm[master]: hooks: Add hook for fake VM stats

ybronhei at redhat.com ybronhei at redhat.com
Thu Mar 20 10:05:21 UTC 2014


Yaniv Bronhaim has posted comments on this change.

Change subject: hooks: Add hook for fake VM stats
......................................................................


Patch Set 2: Code-Review-1

(5 comments)

http://gerrit.ovirt.org/#/c/25927/2/vdsm.spec.in
File vdsm.spec.in:

Line 431: VDSM hook which allows to connect a vNIC to a libvirt network that is managed
Line 432: outside of oVirt, such as an openvswitch network.
Line 433: 
Line 434: %package hook-fakevmstats
Line 435: Summary:	Generate random VM statistics
remove tabs
Line 436: BuildArch:	noarch
Line 437: 
Line 438: %description hook-fakevmstats
Line 439: Hook intercepts VM's stats and randomizes various fields.


Line 1341: %defattr(-, root, root, -)
Line 1342: %{_libexecdir}/%{vdsm_name}/hooks/before_device_create/50_vmfex
Line 1343: %{_libexecdir}/%{vdsm_name}/hooks/before_device_migrate_destination/50_vmfex
Line 1344: %{_libexecdir}/%{vdsm_name}/hooks/before_nic_hotplug/50_vmfex
Line 1345: 
remove
Line 1346: %endif
Line 1347: 
Line 1348: %files debug-plugin
Line 1349: %defattr(-, root, root, -)


http://gerrit.ovirt.org/#/c/25927/2/vdsm/hooks.py
File vdsm/hooks.py:

Line 339:                         raiseError=False, hookType=_JSON_HOOK)
Line 340: 
Line 341: 
Line 342: def before_vm_stats():
Line 343:     pass
you don't need to add stub here
Line 344: 
Line 345: 
Line 346: def after_vm_stats(stats):
Line 347:     return _runHooksDir(stats, 'after_vm_stats', raiseError=False,


Line 346: after_vm_stats
i'd call it after_get_vm_stats, although this is the only vm_stats operation. just to be more specific


http://gerrit.ovirt.org/#/c/25927/2/vdsm_hooks/fakevmstats/after_vm_stats.py
File vdsm_hooks/fakevmstats/after_vm_stats.py:

Line 1: #!/usr/bin/python
add copywrite to file
Line 2: import hooking
Line 3: import random
Line 4: 
Line 5: 


-- 
To view, visit http://gerrit.ovirt.org/25927
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I6a6d13f43495170a5cb86ae0b0efc1ae85ef05ab
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dima Kuznetsov <dkuznets at redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi at redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list