Change in vdsm[master]: hostdev: add after_hostdev_list_by_caps hook

mpolednik at redhat.com mpolednik at redhat.com
Wed Mar 18 15:37:24 UTC 2015


Martin Polednik has uploaded a new change for review.

Change subject: hostdev: add after_hostdev_list_by_caps hook
......................................................................

hostdev: add after_hostdev_list_by_caps hook

Change-Id: I4ab6b3fee49cea83266c77dbfcd8c08ed69c630e
Signed-off-by: Martin Polednik <mpolednik at redhat.com>
---
M vdsm/hooks.py
M vdsm/hostdev.py
2 files changed, 8 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/84/38884/1

diff --git a/vdsm/hooks.py b/vdsm/hooks.py
index 5b1b457..9f0e40c 100644
--- a/vdsm/hooks.py
+++ b/vdsm/hooks.py
@@ -370,6 +370,11 @@
                         hookType=_JSON_HOOK)
 
 
+def after_hostdev_list_by_caps(devices):
+    return _runHooksDir(devices, 'after_hostdev_list_by_caps',
+                        raiseError=False, hookType=_JSON_HOOK)
+
+
 def _getScriptInfo(path):
     try:
         with open(path) as f:
diff --git a/vdsm/hostdev.py b/vdsm/hostdev.py
index 11301ef..07f5d9a 100644
--- a/vdsm/hostdev.py
+++ b/vdsm/hostdev.py
@@ -18,6 +18,8 @@
 # Refer to the README and COPYING files for full details of the license
 #
 
+import hooks
+
 import xml.etree.ElementTree as etree
 
 from vdsm import libvirtconnection
@@ -179,6 +181,7 @@
         if devName in device_to_vm:
             devices[devName]['vmId'] = device_to_vm[devName]
 
+    hooks.after_hostdev_list_by_caps(devices)
     return devices
 
 


-- 
To view, visit https://gerrit.ovirt.org/38884
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4ab6b3fee49cea83266c77dbfcd8c08ed69c630e
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Polednik <mpolednik at redhat.com>


More information about the vdsm-patches mailing list